Media playback is unsupported on your device Media caption Retired farmer Niu Yubiao: 'When you're old, you're useless.'

Deep in China's countryside a rusty tractor chugs past fields of tobacco. This is Dongzigou village in Henan, one of China's poorest provinces.

Children play in the dirt. Old men and women sit watching. Almost everyone of working age seems to have left.

Outside his rickety, mud-walled house is Niu Yubiao, looking on as his wife boils dumplings. He has lived here all his life, through China's great famine when he ate leaves to survive, through incredible hardship.

"I never thought about what would happen when I got old," he says. "My parents died of starvation. I couldn't even afford coffins for their bodies. My children grew up with no clothes. I had no money for those either."

No safety net

Niu Yubiao is now 79. Life expectancy in China today rivals that in the West - it is one of this country's impressive advances. Except China has not yet built a social safety net to provide pensions, affordable healthcare or homes for all its elderly.

"The house is so old, when it rains it leaks. It could collapse at any time. It's scary living here," Niu Yubiao says.

People aged 65 and over 2010: 110 million

2020: 166 million

2030: 229 million

2040: 317 million

2050: 331 million

2060: 357 million Source: UN Interactive: How fast is China ageing? What it means for government

"We don't get a government pension because I never paid taxes. We don't have any savings," he says.

Because he has children and a wife, he does not qualify for a place in a care home - only those without relatives are eligible.

Of Henan's 8.5 million elderly, just 2% are cared for in nursing homes. So Niu Yubiao and his wife fend for themselves.

The couple have seven grown-up children. But like other young people in the area, they have left home to look for work. Niu Yubiao has no idea where they are.

"Our children are far away now, I don't know how to contact them. If something happens, I guess I will just die in my home and they won't know."

Today, there are 180 million Chinese aged over 60, just over 13% of the population. That will double to 360 million in fewer than 20 years, when China will have more retirees than the entire population of the US.

By the middle of the century, their ranks will soar again to 480 million.

China is ageing so fast that a process that took up to a century in the West will happen in the coming 30 years here. And as the ranks of the elderly swells, the working-age population is starting to shrink.

Cheap labour

Media playback is unsupported on your device Media caption Zhang Ping talks about caring for her husband, Li Wenrui, who has lung cancer

It is to China's huge coastal factories where Niu Yubiao's children and tens of millions of other young Chinese have headed in recent years.

On the production line at Neo-Neon in Gong He town in Guangdong province, in the south of the country, young workers sit in lines welding circuit boards for neon lighting displays. It is repetitive and mind-numbing work.

China's incredible economic growth has been built on its vast, cheap labour supply. But the numbers entering the workforce have started falling. China's birthrate has collapsed - at its peak in the mid-1980s 25 million babies were born every year. Now there are about 15 million births a year. The dramatic drop is the result of a richer, developing society and of the one-child policy.

Li Xiao Yu, from the inland province of Jiangxi, sits on the neon production line. She and her husband both earn 3,000 yuan ($475; £292) a month, and soon they will have to help pay for the retirement of their parents. They already send her grandmother 1,000-2,000 yuan a month, and try to save 1,500 yuan a month.

"For sure the burden is going to be heavy. My parents are getting old. We'll have to support them and pay for my seven-year-old daughter's education at the same time," she says.

Currently, China funds only meagre pensions, and there are six workers paying taxes for each retiree - in 20 years' time, there will be just two workers for every pensioner.

Yet Li Xiao Yu and her generation have growing expectations of what the state should provide.

"I hope I can have a pension when I retire," she says. "I don't know how it works, but I think everyone in my family should be able to get a pension."

Age of innovation

To many, China's economic growth, and the rise of cities such as Shanghai, has looked unstoppable. But a shrinking workforce and soaring numbers of elderly, will inevitably slow China down.

Care should be provided for everyone, not just the rich privileged few Zhang Ping

In the hushed offices of Ctrip, China's biggest online travel agency, 15,000 workers, most in their 30s, sit focused on their computer terminals.

James Liang founded the business little more than a decade ago when he was 30, and it is now worth billions. He worries about the impact of ageing on China's competitiveness.

"In an ageing society," he says, "in addition to having fewer workers, you have fewer younger workers who are naturally better entrepreneurs."

People in their 30s, he says, are more likely to try new ideas, start new firms, generate new wealth. When people enter their forties they start to worry about how they'll support their children or their ageing parents, and end up taking fewer risks.

"Highly innovative and creative young individuals are critical if a country is to move from being a medium-income to a high-income one," he says.

China has moved rapidly into the ranks of middle-income nations, but, James Liang fears, it may get stuck there and never rise to compete with the US and other innovative, wealthy countries.

"China may not be able to move to the top level of the tech ladder. It will make a very big difference where China ends in 20 or 30 years from now."

Ill-prepared

You can glimpse what China faces in 20 or 30 years in one of the few hospices in Beijing. The elderly and dying are lined up in basic wards, some tied to their beds, some hardly moving at all. All have the illnesses of an ageing population.

Image caption Fewer workers may mean China loses some of its competitive edge

In one corner, an attendant is helping Li Wei Zeng, who's 72 and has Parkinson's disease, roll on to his side. Li Wei Zeng bellows in pain, grunts and groans.

By the next bed stands Zhang Ping. Her husband Zhang Shu Xin is 60. He has lung cancer. She feeds him milk, one spoonful at a time.

"The bed here costs 1,900 yuan a month," she says, which is roughly the equivalent of the monthly salary of a new teacher. "The medicine is on top of that. I can't get refunds for any of it from my pension. So we have to pay for everything."

Her only daughter earns a decent wage but can't help because she is also hard-pressed paying school fees.

"I think the government should help with the ageing situation," says Zhang Ping. "Care should be provided for everyone, not just the rich privileged few."

Across the room, lying face down and listening to recorded Buddhist prayers, is Wang Feng Tang. He's 62. He has bowel cancer, and has been in the hospice for six months.

"At night, suddenly you realise the guy in the next bed has died. There was one night when I was the only person left alive in here," he tells me. "I was terrified. I am used to it now."

China's demography is something it can't escape. It's ageing population has been described as like a fast-approaching tsunami. But China appears ill-prepared for the scale and cost of what is to come.

"Being old is sad. Life is miserable when you are old," says Wang Feng Tang. "When you need something at night, no-one is here to help you. Life feels fragile and I want to cry."