Thinking about paying off your student loans early? Vanguard says doing so could cost you big time in retirement savings.

Paying off debt early might seem like a smart move, as you save on future interest payments and enjoy the peace of mind that comes with being debt-free. But doing so should depend on the interest rate on your debt, the asset management giant says.

In a recent study, Vanguard said that low-interest debt, in particular, can be costly to pay off early. That’s because a significant number of investors who are paying down their debt ahead of schedule are not taking their full employer 401(k) matches, the firm found.

Here’s the percentage of investors not taking their full match while paying off mortgages, auto loans, and student loans early:

401k match

Vanguard

“The consequences of this mistake are potentially quite large, with prepayers missing out on almost $1,100 per year, on average,” a report from the firm said. “In the long term, prepaying a debt for 10 years while failing to get the full benefit of the match during that time could lead to an estimated $120,000 less at retirement age.”

Andy Reed, Vanguard’s head of behavioral economics research and one of the authors of the report, told Business Insider that missing a 401(k) employer match is harmful in a couple of ways.

“If you’re 25 and you’re giving up free match dollars and you’ve got a 40-year career ahead of you, it’s a long time for not only the match, which is an immediate return if you will, but also the compounding on the match dollars is absolutely massive over an extended time period,” Reed said.

When it comes to paying off a mortgage early instead of taking an employer match, concentration in real-estate in one’s investment portfolio can be another negative consequence, Vanguard said. Investing excess cash in the market, therefore, may be a more prudent approach, the report said.

Pre-payment increases when people are in their 50s and 60, the study showed, as they earn more and near the end of their payment schedule.

Another common money mistake Vanguard sees people make is paying down high-interest debt too slowly. Credit card debt and auto loans tend to have higher interest rates and are usually the type of debt one should focus on first, Reed said, while mortgage and student loans tend to be more manageable.

While each person’s financial situation is different, Reed said that obvious annualized interest rates to try to pay off early are over 20%, while obvious ones to probably not pay off early are under 4%.

In the end, designing a repayment approach depends on the individual, Reed said.

“Maybe I’m seeking peace of mind, right? Living in a paid-off house is a great source of peace of mind, potentially,” Reed told Business Insider. “We just want people to know, hey, there is a cost to that peace of mind, and as long as they’re willing to, to kind of pay the price for the peace of mind, then it could be the right choice for them.”