People planning for retirement tend to budget for the fun stuff, like cruises with grandkids or golf trips in the Sunbelt, and ignore the less fun stuff—especially the costs of post-retirement health care.

And when boomers find out how much they’re likely to need to cover those medical costs—typically, about a quarter of a million dollars, the experts say—they might wish they hadn’t asked. “All those plans for cruises go out the window if you don’t have adequate coverage,” said Alexis Abramson, a New York based gerontology expert. But understanding what kinds of costs and calculations lie behind that number can make it less intimidating, and help you prepare.

Fidelity Investments, which oversees some 12 million 401(k) accounts, has been a bellwether in setting expectations on this topic. This spring, for example, it released a study saying that an average 65-year-old couple retiring in 2012 would need to have saved up $240,000 to pay for out-of-pocket health-care costs in retirement.

And that’s $240,000 in today’s dollars, so a couple retiring in 10 years would need the inflated-adjusted equivalent in the year 2022. (In its 11 years of doing this study, Fidelity has found the rate of health-care inflation to average 6% per year; assuming that rate stayed constant, a 2022 retiree would need about $430,000 set aside.)

Some experts aren’t comfortable with using a number like Fidelity’s as a benchmark. A single number can be misleading in this context, said Paul Fronstin, director of the health research and education program at the Employee Benefit Research Institute (EBRI): “If you plan to be average, you have a 1% chance of being right.”

Still, Fronstin and other critics say it helps to have a starting point when it comes to figuring out retirement health-care costs. (EBRI put out its own series of estimates last month that segmented retirees based on their drug expenses.) If nothing else, such numbers drive home the point that Medicare doesn’t cover everything.

In fact, of all the money spent on health care for people 65 and over, Medicare accounts for just 59%, according to an EBRI analysis of actual expenditures; out-of-pocket spending covered 13% and private insurance paid for 14% (the rest was covered by Medicaid and other sources).

Private insurance includes so-called Medigap policies that reduce holders’ out-of-pocket health-care costs; these cost retirees anywhere from roughly $100 to more than $400 a month.

Estimates for retirement health-care costs become more meaningful when you understand the assumptions behind them. Fidelity’s estimates, for example, assume that the retiree couple use traditional Medicare, but not Medicare Advantage, a program offered by private companies contracted with the government, said Sunit Patel, senior vice president of Fidelity’s Benefits Consulting Group.

The study looked at a broad range of health expenses and took the average. Certainly, physical condition influences lifetime health-care costs: A 65-year-old with untreatable cancer will have to save less than someone with a manageable chronic condition. And even a very healthy person might have to budget for medical advances that we can’t even imagine now.

Fidelity’s study also assumes that the couple doesn’t have any employer retiree health benefits—these still exist, especially among the largest companies—and that the man lives to age 82 and the woman to age 85. Here’s a breakdown of where their $240,000 goes: 32% goes to premiums for Medicare Parts B & D, which cover doctor visits and drugs, respectively; 23% goes to prescription drugs expenses not covered by Medicare Part D; and 45% goes toward Medicare cost-sharing provisions, including copayments, deductibles, other services not covered by Medicare, and any optional Medigap policies purchased.

For all their detail, Fidelity and EBRI’s retirement health-care estimates have a whopping exclusion: the cost of long-term care, which could be provided at home or in an assisted living or nursing facility. Medicare doesn’t cover long-term care costs, and Medicaid only covers them for seniors who meet stringent income and asset limitations that vary from state to state. According to projections by the congressional Budget Office, 45% of those who turned 65 in 2010 will eventually need nursing home care for some length of time, and only 9% will need it for five years or more. The median annual cost of nursing home care in the U.S. is $81,030 for a private room, according to insurer Genworth, but here, too, there are big regional variations.

And what about people who live beyond the average life expectancy? After all, both members of Fidelity’s hypothetical couple will be dead by age 85. But a couple that reaches that age faces further out-of-pocket health care costs of $140,000, excluding nursing home care, and $200,000 including nursing home care, according to a 2010 study by the Center for Retirement Research at Boston College.

These numbers seem less overwhelming if you budget for them, advisers say, and thinking of them in annual chunks helps, too. Dan Keady, the director of financial planning for TIAA-CREF, recommends people planning for retirement budget a line item of $5,000 per year per person for out-of-pocket health-care costs.

Abramson, the gerontologist, recommends that people set aside 5% of their annual budget to health-care expenses, even before they stop working. If they’re lucky enough not to need the full amount in any given year, she recommends using the remainder to fund healthy activities, like joining a gym.

To be sure, not everyone recommends budgeting specifically for health care costs in retirement. Mitch Reiner, a financial planner in Atlanta, has observed that as his clients move into old age, they spend less on entertainment and travel. Those funds can be redirected to health-care costs, he said.

Reiner stress tests his clients’ portfolios to see if they can support the cost of long-term care, which he models as nest egg withdrawals of 25% to 50% more than planned. He often recommends long-term care insurance for those who can’t self-insure against the risk of those expenses; he suggests that they start doing so around age 55, since premiums tend to rise as people age.

Bottom line? Most people aren’t socking away enough money for retirement, period, said Robert Frank, research scholar at New York University’s Stern School of Business. So it should come as no surprise that many will fall short in meeting their postwork health care expenses. Those will only rise with age, and good heath today doesn’t guarantee good health tomorrow, Abramson said: “All it takes is a fall.” In other words, budget accordingly.