The UN usually decides to call off search and rescue attempts between five and seven days after a disaster, once no-one has been saved for a day or two - but people have been known to survive for much longer.
In 1995, Park Seung Hyun was pulled from the wreckage of a collapsed supermarket in Seoul, South Korea, 16 days after it collapsed and in January 2004, Shahr-Banu Mazandarani, an Iranian woman in her 90s was rescued after nine days buried in the rubble of her home after the Bam earthquake.
In one extraordinary case in December 2005, a 40-year-old woman was found buried in what had been her kitchen in Pakistan-administered Kashmir, more than two months after an earthquake hit the region.
Doctors said it was a miracle that Naqsha Bibi had survived so long in a space so small she could not move.
Julie Ryan, a co-ordinator with UK-based group International Rescue Corps (IRC), says that survival largely depends on what happens the moment the quake first hits.
"The ideal situation is you have become trapped and entombed but have some sort of oxygen supply from the outside world, are not injured and also have some sort of access to water," she told the BBC.
"You have usually managed to get yourselves into some sort of void where you are enclosed by the building but it doesn't injure you."
She said an IRC team rescued three boys who had been buried in the ruins of their school for five days after the earthquake in Pakistan in 2005.
"They were laid flat on backs next to each other, with the ceiling touching their noses but totally unhurt," she said. Another boy alongside them had died.
After so long in the dark, rescue teams had to cover the boys' eyes as they pulled them out, to protect them from the strong sunlight.
Dr Tejsrhi Shah of Medecins Sans Frontieres says many of those injured in earthquakes are so badly hurt they would not reach medical care.
But she says that if people are trapped, "just the immobility will reduce your chance of survival".
Being unable to move or having injuries to limbs can lead to crush syndrome, she says, where blood flow to the limbs is disrupted. When the crush is removed, a build-up of toxins floods the body and it is unable to cope.
Earthquake rescue: How survivors are found
"It causes renal damage and shock, people are in agony with the pain and have a high risk of developing renal failure if don't get urgent medical care," she said.
Dr Shah says there are reports of people surviving in rubble even longer than two weeks, but such cases are "incredibly rare".
"The chances of getting someone out alive decreases with each day," she says.
Being trapped in a confined space also means a rising temperature and an increase in carbon dioxide, which, if it reaches too high a level, leads to suffocation.
Search teams monitor for rising levels of CO2 in a building - a rise means someone is trapped inside and breathing. When CO2 levels stop rising, the search is no longer needed.
Graham Payne, chairman and founder of rescue charity Rapid, told the BBC trapped people could go quiet for hours at a time if they passed out or fell asleep but teams never gave up on them.
"You think you've lost them but you carry on. It might be another eight hours, then they start making noise again.
"But if they're trapped and we can hear, then we get them out, we don't give up."
If you are uninjured, have an air supply and are in an adequate space - however small - the next priority is water.
Dr Shah says estimating how long people can survive without water is the "million dollar question", but that the average is between three and seven days.
"It depends on the ambient temperature, how much fluid you're losing through sweat, if you have diarrhoea, how healthy you are, how old you are," she says.
A few fortunate people may find themselves trapped with a clean supply but others will find a trickle of rainwater, condensation or even use water from inside radiators.
Following the South Korean supermarket collapse, IRC rescued a man who had been trapped for 13 days - he had been drinking drops of rainwater and eating cardboard lying around him to stave off hunger.
Some of those rescued in Haiti have spoken of being encouraged by hearing voices around them.
But Ms Ryan says that as time goes on, knowing other people are trapped can be more upsetting than comforting.
"The man trapped in Korea was initially lying with quite a few people but one by one they all stopped talking. So psychologically, it doesn't do any good."
She says the best thing buried survivors can do is stay calm and listen, however hard that may be.
"We use sound location equipment to look for survivors, which picks up tapping. If you hear tapping, tap back, or shout," she says.
But despite the best preparation and advice, rescuers say survival often comes down to "sheer determination".
"It's the will," says Mr Payne.
"Some people just accept they are trapped and it's fate. Others just keep going."
The BBC's Anna Jones examines how people survive in the rubble after an earthquake - and what dictates the duration of search operations.