America is a nation of borrowers, with around eight in 10 households reporting they were in debt when responding to a Pew Charitable Trusts survey. Mortgages were the most common liability for those who borrowed, but other types of debt are common as well. For example, close to four in 10 adults have unpaid credit card balances and car loans, while just over one in five Americans has student loans. 

Borrowing isn't a choice for most of us, which explains why around 70% of Americans believe debt is a necessity. After all, paying cash for a house, an education, or even a car is out of reach for most families. Still, most would prefer not to be in debt, and the older you get, the more owing money affects your feelings of financial security. 

If you're one of the millions of Americans who is in debt but doesn't want to be, you have a decision to make: Should you pay off your debt aggressively by making extra payments, or should you use your spare cash to save and invest? 

Dog sitting on a pile of money

Image source: Getty Images.

You always need to pay the minimum balance on debt 

When deciding between paying off debt or saving or investing money, the decision is always what to do with extra cash. You must make minimum debt payments before allocating money toward any other goal, including saving an emergency fund or investing for retirement. This is true even if you have to forego an employer match in your 401(k) because you don't have enough to both invest and pay debt.

Not making a required debt payment, or paying late, can be a financial catastrophe. You could damage your credit score, which would make borrowing in the future difficult or impossible. You could also incur substantial late fees and, in some cases, trigger penalty interest rates that substantially increase repayment costs. You could even face foreclosure or repossession if you don't pay your bills. 

Once you've paid the minimum payments on debt, that's when you must decide if it's smarter to make larger payments to quickly pay off what you owe, or if you should instead use spare cash to:

Accomplishing these financial goals may be very important to you, but you may also want to become debt-free ASAP. That's what makes it so difficult to decide where to send your extra dollars. 

You must have extra money to allocate to investing, saving or debt

As many as three in four Americans live paycheck to paycheck with no extra money. This is a problem because you can't improve your financial situation if you have no money to use to become debt-free or save for your future. If you're in this situation, you'll need to either increase your income, or cut spending to accomplish financial goals. 

Increasing income could involve asking for a raise or taking on a side hustle. As far as cutting spending, you have many options. You could make big lifestyle changes, such as downsizing to a less expensive home and vehicle, or getting rid of your car altogether if you live in a walkable area. You could also set up a detailed budget and make smaller changes such as cutting coupons and meal planning to save on groceries, turning your thermostat up or down to save on utilities, or spending less on clothing, dining out, and entertainment. 

Saving, investing, and paying extra on debt are all better uses of your money than purchases that won't increase your net worth over the long run. Make the changes you need so you have some money to use for these purposes. 

The type of saving and investing matters

Speaking of making big changes, it's important to prioritize a key type of savings so you don't find yourself falling back into debt every time an unexpected expense arises. That type of savings is an emergency fund.

The importance of breaking the debt cycle is a big reason some financial experts believe saving for an emergency fund should take priority even over extra debt payments, even on your highest interest debts. That's because emergencies inevitably happen. If you have no money to cover them, you have no choice but to put surprise expenses on credit. This creates a situation where you're constantly in and out of debt and never really improving your situation. It could also kill any motivation for debt repayment. 

Because saving an emergency fund also helps you protect your health -- you'll be able to pay medical bills instead of delaying treatment -- and protect your home from foreclosure or your car from repossession, having emergency savings is very important.  

Typically, you should have between three and six months of living expenses in an emergency fund. If you have high-interest debt you want to repay ASAP, you may want to begin with a "starter' emergency fund of around $1,000 to $2,000. Save this amount as quickly as possible, then shift to aggressive debt repayment. Once the high-interest debt is paid, go back to working on emergency savings. 

If you have access to a 401(k) at work and your employer matches contributions, you may also prioritize investing at least enough money to get the match -- even if you have high-interest debt.

Math and psychology both matter when deciding whether to save or invest

While there may be some types of savings that it's smart to prioritize, there are still some complications associated with deciding where your spare cash should go.

One big issue is that not all debt is the same, so you may need to make different decisions depending what you owe. Second, and perhaps more importantly, most people don't behave 100% rationally when it comes to their money.

While it may make financial sense to put aside extra cash for investing, you may be more passionate about becoming debt-free and less motivated to save for retirement since it seems so far off. If that's the case, you'll be more willing to make sacrifices to pay back debt. On the other hand, if you're excited about retiring early, it may be easier to live on a tight budget and invest for that goal than to live frugally to pay off a car loan early. 

Do the math to see whether investing or early debt payment is the smarter financial choice by comparing interest you're paying on debt versus the interest you could potentially earn on savings or investments (we'll show you how in more detail later). If the approach that makes numerical sense doesn't match the approach you'd be most excited about, look for ways to change your mindset, such as setting clear written savings goals with deadlines so you can score some wins.

If you find you still can't stay on track, it may be better to work toward the financial goal you're most interested in achieving, even if you'd theoretically be better off with different money priorities. A plan you can stick to is always preferable to a plan that's perfect on paper, but that you can't put into practice.  

The type of debt matters

In some cases, the math is clear: Aggressively paying off debt is more important than saving or investing. This is the case when you have high-interest debt that's costing a fortune.

However, many people have low-interest or no-interest loans because they took advantage of special promotional offers. In these circumstances, it may not make sense to put all or even most spare money toward early repayment because you earn money by investing, whereas that kind of debt isn't costing much. 

Many people also have low-interest debt designed to be repaid over a long time, such as mortgages or student loans. Paying back this debt early may not make sense because the interest rates are low, you could be eligible for tax breaks to defray interest costs, and it would take so long to repay these debts -- even with extra payments -- that it would be years before you're able to work toward other financial goals.

Of course, it can sometimes be hard to distinguish between what debt is high interest versus low interest. Typically, if the interest rate on the debt is below the average rate-of-return for the stock market over time -- which is around 7% after adjusting for inflation -- the debt is considered to have a low interest rate, while if the rate's above 10%, it's typically considered high-interest debt. 

Debts you may want to pay off before investing

Dedicating extra money toward repaying high-interest consumer debt could leave you financially better off, even if early repayment delays efforts to save and invest for retirement or other financial goals.

Let's say you owe around $16,048 on a credit card at 15.59% interest -- the average interest rate for cards in 2017 and the average credit card debt for households that carry a balance. If you made a median income of $57,617 and saved 20% of that income, you'd have around $960 per month to put toward financial goals.  

If you paid the entire $960 per month toward your credit card debt, you'd be debt-free in 19 months and pay a total of $2,162 in interest. But, if you paid only $300 monthly toward the credit card, it would take you 92 months -- or 7.66 years -- to become debt-free, and you'd pay $11,547 in interest. 

With the first approach, you'd have to forego investing for 19 months but could redirect the entire $960 toward investments after that. Assuming a 7% return, you'd have around $85,500 saved in a 401(k) by the end of 7.6 years, even with investing nothing for the first 19 months.

With the second approach, you'd be able to invest the entire 7.6 years you were working on debt repayment, but would only be able to invest $660 per month because $300 would go toward your credit card. You'd end up with around $71,000 after 7.6 years. 

In this case, the interest on your debt is higher than returns you're likely to earn by investing. The higher the interest on debt, the bigger the discrepancy between extra interest paid versus investment gains.

But if you have payday loans -- short-term loans intended to last until payday that often have interest rates above 300% -- it's imperative to focus on paying those off first before investing. Payday loans, and other predatory loans such as car title loans, are so expensive, they're designed to force you to continue borrowing forever, so paying them off ASAP should be your top priority.

Debts you may not want to pay off early

There are other debts that are at much lower interest rates. For example, the national average interest rate for 60-month auto loans was 4.21% in 2018, the national average interest rate on a 30-year mortgage was 4.64% as of May 30, 2018 , and the interest rate on Direct Subsidized federal student loans disbursed between July of 2017 and July of 2018 was 4.45%. 

The interest rates on these debts are lower than historical average returns for the stock market. If you opt to pay off these debts early instead of investing, you could end up with a lower overall net worth. 

If you owe $300,000 on a 30-year mortgage at 4.64%, your monthly payment will be around $1,545, and you'll pay $256,241 in interest over 30 years. If you pay an extra $960 per month toward your mortgage on top of your minimum payment, you'd have your mortgage paid off in 13 years and six months and save $152,577.41 in interest. 

This sounds good, except you wouldn't have been able to invest for 13.5 years. If you'd instead paid just your minimum mortgage payment and made $960 monthly 401(k) investments over this time, you'd have $243,197, assuming a 7% return.  After 13.5 years, you'd still owe $212,768.93 on your mortgage. You could pay off the entire mortgage balance with your $243,197 in savings if you wanted to and still have around $30,400 left.

In this case, you're better off investing because the interest rate on your debt is lower than what you could likely earn. 

Converting high-interest debt to low-interest debt

If you don't want to put off investing but are worried that interest on your debt is too high, look into lowering the rate. If you can reduce interest costs, you can stick with paying the minimums on debt so you'll have more money to save and invest. 

You can reduce your interest rate by using a credit card balance transfer. Often, you can get a low promotional interest rate, such as 0% financing. Move your debt from a credit card with a high rate to the new card, and you'll usually have around a year to 18 months of no interest before the promotional rate expires. You'll likely pay a balance transfer fee of around 3% of the transferred balance, but this option could still be far cheaper than paying 15% interest or more on your existing credit card. 

You could also take a home equity loan to pay off high-interest debt, assuming you have enough equity in your home. Unfortunately, this is a risky approach because you turn your debt into secured debt guaranteed by your house. If you become unable to pay, there's a very real risk your home could be foreclosed on.

Using a personal loan is yet another approach to lowering your interest rate. If you can get a competitive rate on a personal loan that's lower than the interest rate on your credit card, you can use the loan to pay off the card balance. Then, repay the personal loan according to the lender's terms while investing spare money. 

What about the fact that you get a guaranteed return on your investment when you pay off debt early?

For some borrowers, one of the biggest benefits of paying down lower-interest debts such as mortgages and student loans is that the "return on investment" is guaranteed. If you pay off the loan early, you always save on interest. With investing, you could earn a higher rate of return, but it's not guaranteed. 

Unfortunately, the "guaranteed return" from early debt repayment is lower than it appears. While you may think you're saving 4%, or 6%, or whatever your interest rate is, don't forget about inflation and taxes.

If you have a 30-year mortgage, the mortgage gets cheaper over time because $1 today is worth less tomorrow. Because interest savings doesn't begin to accrue until years have passed, any interest savings needs to be discounted. From our example above, your $1,545 monthly payment would be unchanged in 14 years, assuming a fixed-rate mortgage, but it would only cost you $1,021.43 in today's dollars. The $152,577 in interest savings would also start accruing after 13.5 years, so it would be worth less than $100,000 of today's dollars, assuming a 3% inflation rate.  

Since inflation makes the "guaranteed return" very small when paying off low-interest debt early, you could invest conservatively and still get a higher rate of return. This is especially true if you get a tax break for investing, or a 401(k) match from your employer, both of which effectively provide a "guaranteed return" equal to the value of the tax savings or matching money.

Don't forget to consider taxes

There are big tax implications associated with both investing and certain types of debt repayment, and you need to factor those into any calculations. 

  • If you invest in a 401(k) or IRA, you get tax breaks for investing. You can invest up to $18,500 in a 401(k) and $5,500 in a traditional IRA with pre-tax funds in 2018 if you're under age 50 (although if you have a workplace retirement plan and a high income, eligibility to make IRA contributions is phased out). If you're 50 or over, you can make an additional $6,000 401(k) contribution and an additional $1,000 IRA contribution. These tax benefits essentially provide a guaranteed "return" on your investment because you reduce your tax bill. If you made $5,500 in IRA contributions and were in the 22% tax bracket, you'd save as much as $1,210 on your taxes. 
  • If you have mortgage debt, you can deduct the interest paid on up to $750,000 in debt or up to $1 million in debt if your home was purchased before December 16, 2017. The Tax Cuts and Jobs Act, which passed in 2017, changed the threshold for this deduction. You must also itemize to claim the deduction. Since the Tax Cuts and Jobs Act raised the standard deduction from $6,350 for singles and $12,700 for married filing jointly to $12,000 for singles and $24,000 for married filing jointly in 2018, fewer people are likely to claim it going forward. 
  • If you have student loan debt, you can deduct up to $2,500 in student loan interest from your taxes. You don't need to itemize to claim this deduction, but it does phase out for higher earners. 

Because of these tax benefits, it makes even less financial sense to pay off a student loan or mortgage early while foregoing investments in a 401(k) or IRA.

If you could've deducted that entire $152,577.41 in interest you saved by paying your mortgage early from our example above, you'd have received a tax deduction equal to more than $33,500, assuming you were in the 22% tax bracket each year. Meanwhile, if you'd invested $960 monthly in a 401(k) for 13.5 years, you'd have been able to take tax deductions worth around $34,200. You'd have foregone more than $67,700 in tax savings by paying off your mortgage early instead of investing. 

Prepayment penalties can impact your choice

When deciding whether to pay off debt early, you'll also need to factor in any prepayment penalties you might owe. Mortgages, car loans, and personal loans sometimes impose penalties if you repay too early. If that's the case, aggressively paying down debt often makes little sense because much of the money you save on interest is lost when you're forced to pay this penalty. 

Refer to your loan paperwork or call your lender if you're not sure whether you have a prepayment penalty, or what the amount is. Then, factor that into your calculations when determining which financial goals you should pursue.

It doesn't have to be all or nothing

The good thing is, when setting financial goals, you don't have to allocate all of your extra money toward becoming debt-free, nor do you have to put all of your money toward investing. You can divide up your extra money and address both. 

Dividing your efforts makes it harder to score wins and maintain momentum because you won't get your debt paid off as fast, or hit investment milestones as quickly. Still, you can get around these motivation problems by taking steps such as automating debt payments and automating contributions to investment and savings accounts. If payments are automated, you won't have to make the choice to do the right thing every month. 

You can also use other techniques to cut spending, such as writing down your financial goals with clear deadlines for yourself, or paying only cash instead of relying on credit cards. The important thing is to find a way to stay motivated and make informed choices about how to use your extra money so you can end up with the highest net worth in the long run.

The Motley Fool has a disclosure policy.