Arguably the most difficult part of planning for retirement is estimating how long you're going to live. There are so many genetic and lifestyle factors that play into it that it's impossible to know for sure, which means you'll always be guessing at the length of your retirement and how much money you need.

I was grappling with this when I stumbled across the Living to 100 Life Expectancy Calculator. It asks you 40 questions about your lifestyle and family health history to estimate how long you'll live based on the latest scientific data. Being young and healthy, I expected I'd live until my mid-80s, and I was surprised when it estimated I would live until 93.

Calendar and hourglass

Image source: Getty Images.

There's no way to know how accurate the estimate is, but I realized if it was right, I wasn't planning for a long enough retirement. And as I dug deeper, I realized I'm not alone. Below, I'll explain the dangers of underestimating your life expectancy and how to adjust your retirement plan accordingly.

The problem with underestimating your life expectancy

Your life expectancy is part of the foundation of your retirement plan. It's the number you use to estimate how many years of retirement income you need, and consequently how much money you need to see you through the rest of your life. If you get it wrong, you could end up running out of money in your final years, when you need it the most.

Underestimating life expectancy is a real problem for many Americans. Two in three men underestimate the average life expectancy of a 65-year-old man, according to the Stanford Center on Longevity, and 42% underestimate it by five years or more. Only half of women surveyed underestimated the average life expectancy for a 65-year-old woman, but women were guilty of underestimating by larger margins than the men. In case you're wondering, the average life expectancy is 84 for a 65-year-old man and 86.5 for a 65-year-old woman, according to the Social Security Administration (SSA).

But even this may be a lowball estimate for many. One in three 65-year-olds today can expect to live past 90 and one in seven will live past 95, according to the SSA. If you were planning for a life expectancy of 85 and you live to 95, your retirement savings now has to last you an extra 10 years, and it may not stretch that far. You'll have to rely on your children to support you or look for other ways to cut costs. But this doesn't have to happen.

Planning for a long retirement

You'll never know how accurate your life expectancy estimate is, but it's always better to err on the side of too long than too short. You can use a life expectancy calculator to help you come up with an estimate, as I did, or use the numbers listed above as a jumping-off point and adjust them up or down based on your lifestyle habits and family health history. If you're a reasonably healthy adult, plan on living at least to 90. If you don't live that long, you'll have extra money to leave to your heirs, but if you do, you'll be glad you had the extra savings.

Once you've reevaluated your life expectancy, look over your retirement plan to see if you need to make changes. If you're behind on savings, do what you can to increase your retirement account contributions. Look for areas to cut back spending, like dining out, or pursue promotions so you can free up more cash for retirement. Be sure you're taking advantage of any employer 401(k) match as well.

If you can't make up the difference by adjusting your saving and spending habits, consider delaying retirement. This has the dual effect of reducing how much retirement savings you need and enabling you to save for longer. Alternatively, you could work part time in retirement to reduce how much you need to withdraw from your retirement savings.

You can use your life expectancy estimate to determine the best time for you to start Social Security as well. You can start as early as 62, but then you'll only receive 70% or 75% of your scheduled benefit, depending on whether your full retirement age is 67 or 66, respectively. For every month you delay benefits, your checks increase until they reach 100% at your full retirement age and the maximum benefit at age 70. This is 124% of your scheduled benefit for a full retirement age of 67 or 132% for a full retirement age of 66.

Estimate your scheduled benefit by creating a my Social Security account. Then, use the above information to estimate how much you would get in Social Security benefits over your lifetime if you began taking benefits at given ages. For example, if you're entitled to a $1,000 benefit at your full retirement age of 67 and you intend to live until 90, multiply $1,000 by 12 to get your annual benefit amount of $12,000. Then multiply that by the number of years you're receiving benefits -- in this case 23 years -- and you get $276,000. Compare this to the amount you'd get if you started benefits early or late, keeping in mind that when you start affects the size of your checks, and use this to determine the most advantageous age for you to start claiming benefits.

No matter what you do, you'll never know exactly how accurate your retirement plan is, but by erring on the side of caution and adjusting your savings accordingly, you can give yourself the best shot at a comfortable retirement.