Being able to retire comfortably is a goal many people still have to struggle to attain. And it's easy to see why.

Over the past couple of years especially, inflation has wreaked havoc on consumers' finances, forcing them to scale back their 401(k) and IRA contributions to do things like pay the mortgage and put food on the table. And so it's not surprising to learn that in a recent CNBC survey, 56% of respondents say they're not on track to retire in a comfortable fashion.

Obviously, that news isn't great. But if that's how you feel, here are some steps you can take to change your financial picture and outlook.

A person with a serious expression at a laptop.

Image source: Getty Images.

1. Boost your income with a side hustle

The ability to contribute more toward retirement might hinge on a boosted income. And turning to the gig economy is a great way to grow your earnings.

While it's true that side hustles aren't as popular among older Americans as they are among younger workers, a good 36% of Gen Xers and 22% of baby boomers work a second gig, according to data from Zapier. And joining their ranks could be your ticket to freeing up more cash for long-term savings.

Also, if you're feeling iffy about your ability to cover your expenses in retirement, then picking up some sort of side gig could mean setting yourself up to continue working once your primary career has to end. The result? More ongoing income for you.

2. Take advantage of catch-up contributions

Once you turn 50, you get the option to contribute an extra $7,500 a year to a 401(k) plan or an extra $1,000 to an IRA. And that's based on the contribution limits for 2023. There's a good chance that in future years, these limits will rise.

The more money you're able to pump into a 401(k) or an IRA, the more of your current income you can shield from taxes, assuming you're funding a traditional retirement plan. And even if you're saving for retirement in a Roth account and therefore aren't getting an up-front tax break, there are still huge benefits to making catch-up contributions if you can.

3. Invest in stocks while you still have time on your side

If you're within a few years of retirement, then shifting away from stocks is advisable. But if retirement is more than 10 years away, then it pays to assess your portfolio and consider going heavier on stocks if the bulk of your assets aren't already in them.

The stock market's average return over the past 50 years has been 10%. So if you're sitting on a $200,000 IRA now and are 15 years away from retirement, scoring a 7% average-annual return during that time (which accounts for a shift toward safer investments halfway through that window) will help your balance grow to a little more than $550,000 even if you don't actually contribute another dime.

It's important to feel good about the idea of retiring. If that's not the case, make these moves for a much-needed mindset shift.