The population of the planet reached seven billion in October, according to the United Nations. But what's the figure for all those who have lived before us?

It is often said that there are more people alive today than have ever lived - and this "fact" has raised its head again since the UN announcement about the planet's population reaching a new high.

The idea helps fuel fears that the population is expanding too fast.

It is true that if you delve back into the mists of time, the population of Earth was tiny in comparison to today and logically it might seem plausible that the living outnumber the dead.

It is agreed by most demographers that the UN figure for the number alive today is reasonably accurate. The problem is, how do you calculate how many have ever lived, and where do you start?

One group to have done the work is the Population Reference Bureau in Washington.

Wendy Baldwin from the Bureau says that the normal starting point is when Homo sapiens first walked the earth, about 50,000 years ago.

So you have a starting point and an end figure but it's the time in between that causes the problems. "For 99% of that time there is no data," she says.

This means experts have to make an educated guess.

In the 20th Century, the world's birth rate dropped from 40 births per 1,000 people per year to just 31 in 1995, and today it is only 23.

But long ago, humans needed a reproduction rate of about 80 births per 1,000 people per year in order to survive, Wendy Baldwin says, because people didn't live so long and far fewer of those born had children.

"Today, life expectancy is about 75-80 [years] and for most of human history that was not the case," she says.

"We have some estimates for the Middle Ages where life expectancy might have been 10-12, which means many people never made it out of childhood.

"Even if you had a lot of births, many of those never lived to actually bear children themselves."

In other words, it would be easy to underestimate the number of people who were born, lived and died, in the earlier part of human history. That estimate of 80 births per 1,000 people per year looks very high by today's standards - but in fact it is conservative, implying "a very slow population growth, much slower than anything we see today".

Added to this educated guess for the early period is much more accurate data from the modern era.

More or Less: Behind the stats You can listen to More or Less on BBC Radio 4 and the BBC World Service or by downloading the free BBC podcast Download the More or Less podcast

"Once you have written records, once you have censuses, when countries start to collect taxes, you start developing written record," says Wendy Baldwin.

From around 1800, and even a little before that, is where the data becomes much better. "It then becomes plausible to say [around this time] you have a billion people on earth."

This written record means that you can be pretty confident about the final figure for the number of people who have ever lived, she explains.

Population growth has mostly happened in the modern period, she says, when records were kept, so if estimates for the early period are slightly out, this will not drastically change the overall ratio of "ever lived" to "living".

So what are the figures? There are currently seven billion people alive today and the Population Reference Bureau estimates that about 107 billion people have ever lived.

This means that we are nowhere near close to having more alive than dead. In fact, there are 15 dead people for every person living. We surpassed seven billion dead way back between 8000BC and AD1.

Image caption Clarke correctly stated the dead-to-living ratio

Fans of science fiction may be reaching for their copies of Arthur C Clarke's classic, 2001: A Space Odyssey, at this point.

In that book, he makes the assertion: "Behind every man now alive stand 30 ghosts, for that is the ratio by which the dead outnumber the living."

But Ms Baldwin points out he was not wrong.

"He was making his statement in 1968. There were maybe 3.5 billion people currently living on earth so if you use our method, that would be one living person to 29 dead."

And will we ever reach a point where there are more alive than dead?

This would imply a very high rate of population growth.

"Could we imagine a carrying capacity of the Earth of 100-150 billion? I find that quite unimaginable."