The average student carries about $32,000 in student debt, according to a 2019 survey by ValuePenguin. Facing a job market that has been decimated by the COVID-19 pandemic, those dealing with student debt find themselves in a difficult position.

Many have been forced to make compromises to pay off their debt, a survey by Student Loan Hero revealed. It found that it kept 31% of respondents from contributing to their retirement accounts; 28% said it prevented them from investing. Only travel, 44%, and going out with friends, 30%, had a higher or similar percentage.

While it may seem like a necessary trade-off for millennials and Generation Zers until the student debt is paid off, delaying contributions to retirement accounts is costly over the long term. The earlier you start saving, the less you have to save per year to retire comfortably. An analysis by Vanguard Group found that $1 invested at age 25 could grow to $4.80 by the time you're 65, based on a 4% return. It goes down the later you start, with $1 at age 30 growing to $3.95 at 65, and so on.

A sticky note pad with the words student debt on it over a sad face. The pad sits atop a pile of change and stack of bills.

Image source: Getty Images.

So, the case for contributing to a retirement account as early as possible is clear, the question is: How do you do save for retirement and pay down student debt at the same time? Here are three ways.

1. Take advantage of the employer match

We've all been there: You get your first job and after paying the rent or mortgage, the car loan, student debt, and the bills to keep the lights on, there is not much left for anything else, including retirement. But most 401(k) plans give you essentially free money if they have an employer match. That means that if you contribute 4% to your plan each month, your employer will give you 4% -- doubling your contribution.

Most plans typically cap the match at 5% or 6%, so if you can max that out, all the better. But even if you can only contribute a little, say 2%, do it, because the match will double your investment. That same Vanguard study also found that $4,500 invested per year in a retirement account would net $1 million in 45 years. And if you have an employer match, your overall investment would be about half that.

This is the best and easiest way to invest in your retirement because the contribution comes out of your paycheck, so while your take-home will be lower, you're not writing a separate check, and you'll find that you adjust and budget to your income accordingly.

2. Use the triple-double rule

No, it has nothing to do with Russell Westbrook's stat line, it is a rule some advisors use to recommend on allocating your after-tax income. There are different variations of this "triple-double" rule: Some call it the 50-30-20 rule, while others recommend 60-20-20. It refers to the percentage of your paycheck that should go to needs, wants, and financial expenses, respectively. The needs are necessities to live -- like housing, your car, insurance, food, utilities, child care, student loans, etc. This would not include healthcare, as that typically comes out of your pay before you get it. Some people may be able to spend 50% on needs, while others may require 60% -- it depends on your situation. If you have high student debt, you may want to bump it up to 60%. 

Wants are non-essential expenses, like going out to bars and restaurants, going to movies, ordering premium cable channels, video game subscriptions, vacations, taking in a game with the kids, etc. Again, depending on your situation and family income (if you have two earners), you may be able to allocate 30% or 20% to this bucket.

The final category is financial expenses -- meaning credit card debt, savings, and retirement contributions. Ideally, this would not include contributions to your 401(k) as that would be deducted from your pay before you get it. After you pay down credit cards, consider using what's left to boost savings, add to an emergency fund, bump up your 401(k) contributions, open an IRA, or invest, even if it's just a little at first.

3. Budget, prioritize and adjust

The above rule is a general guideline to help you budget and prioritize your expenses. Once you start employing it, you may find your percentages are out of whack in one area or another. If your needs expenses exceed the guidelines, you may be paying more than you should for a car or home. If you are spending too much on wants, you may have to budget accordingly.

Furthermore, if you have high credit card debt, that may eat into your ability to save and invest for retirement. But once you start to make the necessary adjustments, you will find that you have less credit card debt and more for savings. Eventually, that student debt will go away, and you will have even more money for either non-essential expenditures or retirement savings.