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 them. Rem and Gelus both did this to save Misa Amane, and Misa inherited their remaining lifespans; however, Rem notes that the lifespan is converted appropriately to the human, presumably as to not cause confusion in the human world.

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 of the Death Note 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.