Lifespan

A lifespan (寿命, jumyou) is the amount of time that an individual will live for. It also refers to the date (in Shinigami time) visible above a person's head with the Shinigami Eyes. When the date is reached, that person's lifespan is over and they will die.

Appearance
With Shinigami Eyes, the lifespan of a human is visible as written numbers floating above the human's head, as well as the human's name.

Shinigami do not have the power to view the lifespans of other Shinigami. Likewise, humans with Shinigami eyes cannot see the lifespans of Shinigami or the owners of Death Notes.

Purpose
Shinigami use Death Notes to kill humans so they can inherit the remaining lifespan from the human they killed. To know how many years they are taking, they need to be able to see the human's lifespan. Shinigami continue their existence by taking years from humans in this manner.

Unlike Shinigami, humans do not inherit other humans' lifespans after killing victims with a Death Note. However, they can inherit a Shinigami's remaining lifespan if the Shinigami sacrifices itself to save a human. Rem and Gelus both did this to save Misa Amane, and Misa inherited their remaining lifespans.

Lifespan Trade
A human can exchange half of their remaining lifespan in order receive the power of having Shinigami eyes. This is done by the human agreeing to the Shinigami Eye Deal.

Conception
Tsugumi Ohba says "I did create a complicated math equation for Light's Life span when the numbers first appeared above his head. But now I don't even remember the formula. Every other life span number after that was added by Obata-sensei. He chose some nice numbers."

Trivia

 * As the Rules state, Shinigami cannot take the lifespan of a human unless they are at least three years of age; they also cannot take the lifespan of someone over 124 years old.
 * When Shinigami save a human life, their lifespan is given to that human; Gelus and Rem both saved Misa, lengthening her life considerably. (Although, the years of life Misa got from Gelus were halved twice by Rem and Ryuk, since she traded for the Shinigami Eyes.)
 * Though in overview, their efforts were in vain, as Misa ends up committing suicide.
 * Its never revealed if life support can affect a human's lifespan; sufficient care with such means can prolong lives (at least from human perspective.)