Unless you're one of the small-and-shrinking fraction of U.S. workers in line for a defined-benefit pension, you're going to need to invest ambitiously for your retirement. Fail to build a big enough nest egg, and you're probably guaranteeing yourself some financial struggle once your career comes to a close.

Social Security benefits, though helpful, will only replace about 40% of your pre-retirement income, and that assumes you're an average earner. If your earnings are above average, your monthly payments will replace an even smaller percentage of your former income. Most seniors, however, need 70% of their previous earnings at a minimum to live comfortably, which is where your investments will come in handy.

But new data from insurance agency Haven Life reveals that 49% of Americans aged 22 to 45 are putting off saving and investing for retirement for one big reason: They're carrying student debt. That's particularly bad news because it means they're missing out on years or decades of the compound growth that can really enhance the size of a nest egg.

Graduation cap sitting on a pile of hundred-dollar bills

IMAGE SOURCE: GETTY IMAGES.

The importance of starting early

Juggling student loan payments and retirement plan contributions is often difficult. But if you don't start making an effort to build long-term savings while you're relatively young, you're increasing your risk of falling short when you're older.

Imagine your goal is to retire with $1 million. If at 22 you start setting aside $300 a month in an IRA or 401(k) that generates an average annual return of 7% (a reasonable assumption for a stock-heavy portfolio), and keep doing so for 45 years until you're 67 (full retirement age for Social Security purposes) then you'll actually wind up with just over $1 million.

However, if you wait until 42 to start saving, you'd need to contribute $1,350 a month to your tax-advantaged retirement accounts to achieve a similar result -- a much harder sum to manage on an ongoing basis.

Instead, let's postulate that at 42 you start setting aside the same $300 a month for retirement we started this exercise with, and do so for 25 years. You'd have about $228,000 when you were 67. That's certainly better than having no savings at all. But it's far from a $1 million, and when viewed as the cushion that's got to carry you through multiple decades of retirement, it's not a huge sum of money at all.

So, if you're one of the millions of younger workers who have been prioritizing their college loans and ignoring the next time they'll be called "seniors," it's time to start thinking long term. Tighten up your monthly budget until you're able to swing student loan payments and retirement plan contributions simultaneously. You may need to cut back on some luxuries like travel, takeout meals, entertainment, and subscription boxes, but if you're willing to limit your spending in these areas until your earnings increase, you'll be doing your future self a major favor.

Another option? Get yourself a second job to boost your income. That way, you'll have an easier time keeping up with your loan payments and funding your retirement plan without having to sacrifice too much.

Remember, too, that when you put money into a traditional IRA or 401(k), as opposed to a Roth savings plan, you get a tax break on your contributions, thereby making them easier to work into your budget. And if you have a 401(k) with an employer match, contributing to that account nets you some free money for your retirement nest egg -- and free money isn't something to be passed up no matter what your age.