NEW YORK — Doris Ranzman had followed the expert advice, planning ahead in case she wound up unable to care for herself one day. But when a nursing-home bill tops $14,000 a month, the best-laid plans get tossed aside.

Even with insurance and Social Security, Ranzman still had to come up with around $4,000 every month to cover her care in the Amsterdam Nursing Home in Manhattan. “An awful situation,” said her daughter, Sharon Goldblum.

Like others faced with the cost of elderly care in the U.S., Goldblum did the math and realized that her mother could easily outlive her savings. So she pulled her out of the home.

For the two-thirds of Americans over 65 who are expected to need some long-term care, the costs are increasingly beyond reach. The cost of staying in a nursing home has climbed at twice the rate of overall inflation over the last five years, according to the insurer Genworth Financial. One year in a private room now runs a median $91,000 a year, while one year of visits from home-health aides runs $45,760.

Goldblum estimates that she and her mother spent at least $300,000 over the last two years for care that insurance didn’t cover.

“If you have any money, you’re going to use all of that money,” Goldblum said. “Just watch how fast it goes.”

How do people manage the widening gap between their savings and the high cost of caring for the elderly? Medicare doesn’t cover long-term stays, so a large swath of elderly people wind up on the government’s health insurance program for the poor, Medicaid. For those in the middle class, however, the answer isn’t so simple. They have too much money to apply for Medicaid but not enough to cover the typical three years of care.

Some 60 percent of Americans nearing retirement have retirement accounts, according to the Employee Benefit Research Institute. The median balance is $104,000.

Combined with other savings and income, that amount might provide some retirees with all they need for decades. But everything changes when, for instance, an aging father struggling with dementia requires more help than his wife and children can manage.

Plans that looked solid on paper are no match for their bills.

“Within the first year most people are tapped out,” said Joe Caldwell, director of long-term services at the National Council on Aging. “Middle-class families just aren’t prepared for these costs.”

Many who can afford it buy insurance to help pay for long-term care years in advance, when insurers are less likely to reject them. But even those with insurance, like Ranzman, come up short. Forced to improvise, they sell the house and lean on family. They move in with their adult children, or arrange for their children to move in with them.

Some can save money by switching to different facilities. On average, a shared room in a nursing home runs nearly $11,000 a year less than a private room, and a room in an adult-family home runs cheaper still.

Still, there’s not a lot of room for creativity, said Liz Taylor, a self-employed geriatric care manager in Lopez Island, Washington. “The amount of care you need dictates the price,” she said, “and there aren’t that many ways around it.”

Hiring an aide to spend the day with an elderly parent living at home is often the cheapest option, with aides paid $20 an hour in some parts of the country. But hiring them to work around the clock is often the most expensive, Taylor said. “Needing help to get out of bed to use the bathroom in the middle of the night means you need a nursing home,” she said.

Greg Crist, a spokesman for the American Health Care Association, the country’s largest trade group for nursing homes, said many of the same trends driving health care costs higher have pushed up nursing home bills.

Americans are living longer though not always healthier, he said, so residents are more likely to arrive with chronic ailments that require more attention. Facilities have also expanded the range of services they offer.

“The cost is an element that may seem overwhelming at first,” Crist said, “but when you consider all the services — 24 hours, seven-days-a-week care, with full room and board — it sheds some light on it.”

EVICTED

To Roslyn Duffy, it seemed that her mother, Evelyn Nappa, had everything she needed. After a stroke made it difficult to live alone, Nappa moved from Arizona to Seattle to be near her daughter and soon settled into The Stratford, an assisted-living facility, where she quickly made friends of fellow residents and the staff. “The care was great,” Duffy said. “We loved that facility.”

With the sale of the house in Arizona, Nappa’s savings appeared sufficient to cover 10 years at The Stratford, enough to last until she reached 100. Duffy said that the home’s directors told her not to worry about her mother running out of money and winding up on Medicaid, even though the government program pays just a portion of what many facilities charge. After all, many of the same homes that refuse to admit seniors on Medicaid will keep those who spend all their savings and wind up on the program. “‘We will keep her here’ — that’s what they said,” Duffy recalls. “But I didn’t get that in writing.”

A representative from the nursing home declined to comment.

As Nappa’s dementia progressed, she needed more attention. That meant moving her from an independent unit that cost $3,000 a month, to a dementia unit that cost $6,000. Trips to the emergency room, hearing aids and other costs that Medicare didn’t cover added up. Soon enough, the money that was supposed to last 10 years was gone in two.

Duffy enrolled her mother in Medicaid, confident that The Stratford’s management would keep its promises.

Two months later, she received a letter saying her mother had 30 days to find a new home. Duffy protested, writing letters to the management and local newspapers, and succeeded in keeping her mother at the Stratford for two months until social workers helped line up an adult family home willing to take Medicaid payments.

But the stress and the change of surroundings strained her mother’s health, Duffy said. Six weeks after moving, she was dead.

“She declined so quickly,” Duffy said. “Being in familiar surroundings is hugely important for dementia patients. There’s no doubt in my mind that the move hastened her death. It was devastating, just devastating.”

NEW HOME

Ranzman’s story has a happier ending. Her daughter pulled her out of the Amsterdam Nursing Home and rented a house in Smithtown, Long Island, with a patio and a backyard full of azaleas and trees. It was Ranzman’s own space. She had round-the-clock aides, a large window and plenty of sunlight. Her daughter, Goldblum, noticed that Ranzman’s memory improved quickly. Her mother seemed happier and more alert.

“It was less than half the cost of a nursing home and a million times nicer,” Goldblum said. “She showed such improvement.”

Goldblum paid $36,000 a year for the house and her mother’s long-term care insurance paid the home-health aides. The move saved around $250,000 a year in expenses.

What’s more important to Goldblum is that her mother seemed content when she died in April at age 86, lying in bed and surrounded by family. “It was a wonderful ending,” she said.