Your 50s are a pivotal time on the road to retirement. Chances are, you'll be earning more money in your 50s than you did earlier on in your career, which means you'll have more financial flexibility than ever before. On the other hand, you may have more expenses to deal with, like your kids' college tuition bills. Still, if you want to retire comfortably, you'll need to spend your 50s focusing on goals that can help make that happen. Here are a few to target.

1. Build a fully loaded emergency fund

Without a solid level of savings, you risk racking up debt the next time an unplanned expense comes your way. And taking on debt in the years leading up to retirement increases your risk of carrying that financial burden into your golden years and struggling for it. A better bet? Amass a healthy emergency fund -- ideally, one with enough money to cover up to six months' worth of living expenses. This will help you avoid debt if you lose your job, encounter a whopping home repair, or get hit with unusually high medical bills.

Middle-aged man sitting on stairs wearing gray sweatshirt over yellow t-shirt

Image source: Getty Images.

2. Boost your nest egg

Once you turn 50, you have a prime opportunity to catch up on retirement savings. That's because IRA and 401(k) contribution limits are higher for workers 50 and over. Currently, you can contribute up to $7,000 a year to the former, and $25,000 a year to the latter. Capitalizing on catch-up contributions can boost your savings in a meaningful way. If you're 57 today and want to retire at 67, setting aside $25,000 a year between now and then will leave you with an extra $345,000 in your nest egg, assuming your investments generate an average annual 7% return during that time. Even if you can't max out a 401(k), aim to ramp up your retirement plan contributions during your 50s so you're sitting on extra income once your golden years roll around.

3. Fund a health savings account

Healthcare is one of retirees' greatest ongoing expenses. That's why it's smart to contribute to a health savings account, or HSA, during your 50s. The money you contribute (on a tax-free basis at that) can be invested so that it grows into a larger sum, and as long as you use that money for qualified medical expenses, you can take withdrawals tax-free. To be eligible for an HSA, you must be enrolled in a high-deductible insurance health plan (meaning, an annual deductible of $1,350 or more for single coverage and $2,700 or more for family coverage). You can contribute up to $3,500 to an HSA as an individual this year, or up to $7,000 for a family, and if you're 55 or older, you get a $1,000 catch-up contribution to boot.

4. Pay off your mortgage

Right up there with healthcare, housing is another expense that tends to eat up a large chunk of retirees' income. Therefore, if you're able to pay off your mortgage in time for your senior years, you'll have one less monthly bill to worry about. One relatively painless way to chip away at your mortgage is to take your monthly payment, divide it in half, and pay that amount every two weeks. In doing so, you'll make an extra mortgage payment each year. Uphold that practice for your entire 50s, and there's a good chance you'll be housing-debt free by the time your career closes out.

5. Buy long-term care insurance

It's estimated that 70% of seniors 65 and over wind up needing some form of long-term care. And without insurance, the costs can be astronomical -- think $48,000 a year, on average, to reside in an assisted living facility, and roughly $90,000 to $100,000 a year, on average, for nursing home care, depending on whether you get a private room. Without long-term care insurance, you'll be on your own to cover these costs, since Medicare won't pick up the tab, so rather than run that risk, apply. The best time to do so is your early to mid-50s. At that point, you're not paying premiums too prematurely, but you're also more likely to lock in a favorable premium rate based on your age and health. The cost of your policy will depend on a number of factors, such as the coverage amount you're looking to secure, so shop around and see what options are available to you.

Though your 50s are a time to continue focusing on your career, they're also a time to start thinking seriously about your golden years. Make these smart moves, and you'll set the stage for a financially secure retirement.