While many Americans today say they plan to keep working up to—or even long past—traditional retirement age, that isn’t always possible.

Health problems, family obligations, an employer’s downsizing or other unexpected crises can disrupt even the best-laid retirement plans.

In fact, there’s “a big gap between when active workers expect to retire and retirees say they actually did,” according to the 2017 Retirement Confidence Survey from the Employee Benefit Research Institute. It found that while workers say they expect to retire at a median age of 65, retirees report doing so at an actual median age of 62. And while 68 percent of workers expect to earn income in retirement, just 26 percent of retirees are actually employed for pay, notes the EBRI 2018 Retirement Confidence Survey.

What can you do if you’re forced into retirement sooner than expected, as a lot of us will be? Here are four suggestions.

1. Tote Up Your Income

If you expected to keep working, you probably planned to continue adding to your 401(k) or other work-based retirement accounts. But if your job has come to an end, your retirement contributions may have as well. The question now is: Do you have enough saved up?

Financial planners often invoke the 4 Percent Rule to estimate how much you could safely take out of your retirement accounts without depleting them before the end of your life. While the rule is sometimes criticized as either overly optimistic or unduly pessimistic, it is at least a starting point.

The 4 Percent Rule assumes you can withdraw 4 percent in your first year of retirement and that amount plus an inflation adjustment each succeeding year. So multiply what you have now by 4 percent and ask yourself if you could live on that annual income, possibly supplemented by Social Security and any traditional pension benefits you might have coming to you.

If it looks like enough, you could be fine. If not, you may have to consider scaling back your lifestyle and/or finding another income source, such as a part-time job. Bear in mind, too, that if you haven’t reached age 59½ yet, your retirement plan withdrawals will generally be subject to an additional 10 percent penalty tax.

One further complication: The 4 Percent Rule is based on the assumption that your retirement will last about 30 years. If you retire at 60 and live to 100, that could be a problem. So the younger you are, the more conservative (in other words, lower) a percentage you may want to consider withdrawing.

2. Estimate Your Social Security

If you’re eligible for Social Security benefits, you can start to take them as early as age 62. However, if you do, your monthly benefits will be permanently reduced. They could be as much as 30 percent lower, according to the Social Security Administration, if you start collecting at 62 rather than waiting until your “normal” retirement age (which ranges from 66 for anyone born between 1943 and 1954 up to 67 for those born after 1960).

What’s more, you can earn “delayed retirement credits” by postponing your benefits past normal retirement age. If you were born in 1943 or later, that’s an extra 8 percent for each year you put it off, up to age 70, when there’s no further incentive to delay.

Not everyone has the luxury to delay, of course. A 2015 analysis by the Center for Retirement Research at Boston College reported that 48 percent of women and 42 percent of men claimed benefits at age 62, while only 4 percent of women and 2 percent of men waited until age 70. Still, if you’re fortunate enough to have the financial means, it could pay to wait.

You can run the numbers for retiring at different ages, using the Social Security Retirement Estimator.

3. Figure Out Your Health Insurance

Losing your job can also mean losing your health insurance, though not necessarily immediately. You might be able to stay on your employer’s health plan for a period of time, under a federal law commonly known as COBRA (for Consolidated Omnibus Budget Reconciliation Act).

If you’re eligible for COBRA, you may have an option to extend your health coverage for as long as 36 months, but it can be costly. Typically, you’ll have to pay both your share and your employer’s former share of your premium, plus an additional 2 percent administrative fee. You can learn more about COBRA on the U.S. Department of Labor’s website.

Another, possibly less expensive option if you have a working spouse is to join his or her health plan. Losing your job is considered a “qualifying life event” that generally makes you eligible for coverage, even if you’re joining outside of the plan’s normal open enrollment window.

Similarly, job loss is considered a “special enrollment” event in the Affordable Care Act’s Health Insurance Marketplace, allowing you to purchase coverage after the open enrollment period for the year has ended. Healthcare.gov, the government’s website for the ACA, explains how to qualify for special enrollment.

Finally, if you paid into the Medicare system during your working years, you should be eligible for Medicare health coverage once you turn 65. To learn more, see Getting started with Medicare.

4. Dust Off Your Résumé

Finding a new job after a certain age often isn’t easy, though in the current economy your odds are likely better than they were a few years ago. But if you’re capable of working, even part-time, it can be worthwhile. Not only will you reap the social and health benefits of remaining active and engaged, but every dollar you bring home is that much less you’ll need to take from your retirement funds. Getting a job also could solve the problem of health insurance coverage until you’re eligible for Medicare at age 65.