It's never easy to contemplate our own mortality, but estimating our life expectancy is something all of us need to do in the course of our retirement planning. In the absence of a crystal ball, it's impossible to predict how long any of us will live, but according to new data from the Society of Actuaries, both pre-retirees and retirees alike expect to live to the median age of 85.

This data is fairly consistent with that of the Social Security Administration (SSA), which states that the average 65-year-old man today will live until 84.3, while the average 65-year-old woman will live until 86.6. But what the SSA also notes is that 25% of today's 65-year-olds will live past the age of 90, while 10% will live past 95. And those are the folks who risk running out of money by not planning appropriately.

Two old men with canes, sitting on a bench talking and laughing

IMAGE SOURCE: GETTY IMAGES.

How will your savings stack up?

As you get closer to retirement, you're apt to get a better sense of what you'll spend on living expenses, and from there, you can see if you're saving adequately in theory. Imagine you expect to spend $5,000 a month, or $60,000 a year, as a senior, of which $32,000 will come from Social Security. This means your savings will need to provide $28,000 of income per year.

Now if you're planning to work until age 65, and you think you'll live until 85, that means you'll need $28,000 in income per year for 20 years, or a total nest egg of $560,000 (assuming your savings are housed in a Roth account; with a traditional retirement account, your withdrawals are subject to taxes, which means that if you have $560,000 in savings, the IRS gets a portion, thereby leaving you with less). But what happens if you're among the 25% of seniors who wind up living until age 90? Suddenly, you're potentially $140,000 short. Ouch.

And that's precisely why you're generally better off doing one of two things: working longer, or planning for a longer retirement. Imagine that instead of retiring at 65, you push yourself to work until age 70. Not only will you avoid dipping into your savings sooner, but you'll get a chance to grow your Social Security benefits in the process. Then, when you retire at 70, there's a better chance your 20 years' worth of income will suffice.

Smiling older woman

IMAGE SOURCE: GETTY IMAGES.

Similarly, you can ramp up your savings rate later on in your career to amass more in your nest egg. Instead of saving the $560,000 we talked about above, save $700,000 (or more). Or, take a hybrid approach. Extend your career for a couple of years, and boost your savings during its latter stage to support a longer retirement.

Is there a chance you'll wind up with excess money at the end of your life? Yes. Is that a horrible situation to be in? No. If you have family members who could use the money, gifting your surplus savings to them toward the end of your life is a great way to continue your legacy.

Of course, if your health starts to fail later on in your career, and you have reason to believe you won't live as long as your peers, then much of the aforementioned advice doesn't apply. But if you don't have a pressing reason to think you won't live a long life, then by all means, err on the side of optimism.

Remember, none of us can predict the future, but you can take steps to avoid depleting your nest egg prematurely by planning for a longer retirement rather than a shorter one. It's a far better bet than risking the opposite scenario and winding up cash-strapped when you're old and vulnerable.

The Motley Fool has a disclosure policy.