As always, The Motley Fool cannot and does not provide personalized investing or financial advice. This information is for informational and educational purposes only and is not a substitute for professional financial advice. Always seek the guidance of a qualified financial advisor for any questions regarding your personal financial situation. If you'd like to submit your question for feedback, you can do so here.

It's an unfortunate thing that many older workers end up falling victim to age discrimination. It's illegal to fire someone on the basis of age. But it's also tough to prove, so companies tend to get away with forcing older workers out of their jobs.

A person at a laptop.

Image source: Getty Images.

It's something this Reddit poster (RDDT 1.61%) is worried about. And so he's trying to take steps to plan for it. He has a $500,000 balance in a 401(k) at 44 years old, and he plans to continue funding that account steadily for the next bunch of years.

My retirement plan if I get the boot at 55
byu/bigmacher1980 inpersonalfinance

The poster is expecting an inheritance, too, but doesn't want to count on it. His goal is to boost his nest egg until age 55, and at that point take an easier job as needed to close out his career so he doesn't have to touch his savings until age 60 to 65.

The poster wants to know if his plan works. The answer? It could. But he may want to make a few tweaks.

Planning for the worst

It's not a bad thing that the poster is anticipating an unwanted layoff in his mid-50s. He's probably seen it happen enough times for it to spook him.

The poster earns $130,000 a year and may need around 70% of that salary to live comfortably in retirement. This is just an estimate based on typical retiree needs, but it's a reasonable one to work with. So it's fair to assume the poster will want a $90,000 annual retirement income.

A good chunk of that may come from Social Security. The average monthly benefit for retired workers today is about $2,000 , but with such a high salary, the poster's monthly benefit could easily be 1.5 times that amount, which would give him $36,000 a year.

Based on this, the poster's nest egg would need to give him $54,000 a year. Is that doable?

If he contributes $1,300 a month to his 401(k) for another 11 years, which is consistent with his current savings rate, and his portfolio gives him an 8% yearly return, he could end up with $1.425 million. (The poster also gets an employer match, but let's exclude that since it's not set in stone).

If the poster uses the 4% rule to manage his nest egg, he gets $57,000 a year out of his savings. So in that case, it looks like the numbers -- and his plan -- work. But there's something else the poster may want to do.

Save even more in case things go awry

While the poster is smart to save aggressively for the possibility of losing his job at 55, he may want to increase his savings rate even more in the coming years, if possible. His plan assumes he'll be able to keep his job until 55. But what if he's laid off at 52, or 50?

Another thing the poster should do is make sure he has a solid emergency fund in case he's let go and needs to live off of savings for a period of time. Tapping a 401(k) before age 59 1/2 can lead to costly early withdrawal penalties. The poster may have an emergency fund, but he doesn't mention it. If not, that's definitely something to focus on.

Finally, the poster may want to work on boosting his job skills to position himself to get hired elsewhere if he is indeed let go, or to make himself more valuable at his current job. That could give him more staying power, allowing him to hang onto his higher salary for longer.