by Rodney Brooks, USA TODAY, USATODAY

by Rodney Brooks, USA TODAY, USATODAY

You're all set for retirement. You've been planning and saving for years. You're just two years away from the big day, and everything's on track.

Then, boom! Something happens. An unexpected legal or medical expense. A grown child moving back home after a divorce. If it happens when you're about to retire or are already retired, it can throw your well thought-out retirement plan into chaos.

So, what should you do? Some financial advisers say an emergency plan should always be part of your retirement planning.

Kent Caldwell-Meeks, senior director of investment and fiduciary services at Wells Fargo Wealth Management Group, says even in retirement, you must have an emergency fund.

"Most people think an IRA and Social Security are enough," he says. But they aren't. "They should have an emergency fund that covers their expenses for three to six months. That's both pre-retirement and in retirement. Those are dollars that are not part of your budget. It is to mitigate that unexpected shock."

Here are some retirement "shocks" or surprises, and how to plan for them if you're not yet retired; or how to deal with them if you are retired.

â?¢ Job loss/loss of benefits. "What if something weird happens, like if they lose a job," says John Gajkowski, financial planner at Money Managers Financial Group in Chicago. "What cripples them is loss of benefits. All of sudden they are 62 and their wife is 62 and you have no medical insurance. What you used to pay $500 a month for is now $2,500 and with fewer benefits. How do you plan for that? You need to stockpile money away."

Curt Knotick, investment adviser at Accurate Solutions Group in the Pittsburgh area, says his clients who were union members come in expecting the health care coverage for life that was negotiated by the union will last forever. "So many have lost some or all of these benefits that they thought would always be there," he says. "And they did not plan for that expense." One recent client said his monthly expenses rose by $800 as a result.

"You need to take that into consideration now," he says. "When budgeting for income needs in retirement, allow for an additional $500 to $1,000 a month of fixed expenses to offset this threat."

â?¢ Unexpected medical expenses. "I think one of the four most significant shocks that I've seen that devastate people in retirement is unanticipated medical expenses or health issues," says Caldwell-Meeks.

"For health-care-related shocks, as part of the overall plan, individuals need to consider that people are in retirement longer, 20 to 40 years. They have to go in to their planning accounting for that period of time. And they need to start saving early."

"In order to prepare for a medical-type shock, they should review certain types of insurance planning," he says. "Long-term care may be important. You may have a medical situation that is more grave. You may have to extend that long-term care policy or get a broader policy."

â?¢ You end up raising your grandchildren. "So many of my clients who are grandparents are taking care of grandkids," said Knotick. "Most of time it is unexpected. You expect you are an empty nester, and you think you will travel. All of sudden the family of two is a family of four because you have two grandchildren. That can run up utility costs and household expenses."

It also can mean day care costs, college tuition or even grade school tuition.

"That has a dramatic impact," Knotick says. "Over an 18-year period, that could be $100,000 or $150,000. We have one client who has gone back to work part time. That's hard to plan for. We have to be nimble and plan."

â?¢ Your adult children come back home.Or your sister and brother-in-law move in because they lost their jobs. "Kids coming home can be a shock. You could be pre-retirement, and they got out of college and can't get a job," says Lynnette Khalfani-Cox, founder of AskTheMoneyCoach.com.

"It's not unheard of for Baby Boomers and retirees to have kids of their own," she says. "Or second-family issues. All of that can leave people retired and faced with extra people in their homes. There is the financial cost, but there are emotional entanglements that go along with it as well."

"First, if you have a financial plan," says Scott Dixon, executive vice president for financial advisers at SunTrust Investment Services, "if it was based on certain income levels, that needs to be revisited."

Several of the advisers suggest that with grown children or other adults there needs to be an agreement on cost-sharing and length of stay.

"I think that you have to draw some lines and limits," says Khalfani-Cox. "Nobody has an infinite amount of cash."

â?¢ The market drops and so does you retirement savings. Make sure you are diversified, says Caldwell-Meeks. "Because most retired persons are taking income from their investment portfolio, what you want to do is mitigate any volatility related to market shocks," he says. "You want a diversified plan so you are less subject to the volatility of the market.

"One of the biggest mistakes people make in retirement is getting out of the market after a market downturn," says Caldwell-Meeks. "They sell their stocks when the market sells down. ... They hurt their long-term prospects."

The key to surviving any of these shocks to your retirement savings, says SunTrust's Dixon, is to have a financial plan to start with.

"The plan is the map," he says. "There may be times we have to change things. But having that plan helps you focus on your goals and objectives and prioritize."