If you are going to be paying off your student loan debt for years to come, you should not forget about planning for retirement. Although you want to get that debt off your back, you do not want to sacrifice your future. The best time to save for retirement is now while you still can work.

According to research conducted by the Center for Retirement Research at Boston College, “college graduates who have student debt have about 50 percent less in retirement plan assets by the time they reach age 30 compared to those who have no loans.” One of the most startling findings was that the amount of student debt was not a big factor. No matter what the size of your student loan debt was, it had an impact on the size of retirement savings these individuals were putting away.

The research found that “this result suggests that young graduates consider the simple existence of a student loan — rather than its size — to be a constraint on their 401(k) saving.” It is important to establish your financial priorities so that you don’t fail to put enough money away for your future.

Saving for Retirement or Paying Off Student Loans?

According to Christine Benz, director of personal finance at Morningstar, she said that new graduates should be doing a combination of both—paying down their student debt and saving for retirement. Make your regular payments on your student loans, but if you have an employee match for retirement, then you should be meeting the minimum to receive that benefit.

One method that Christine Benz recommends you to follow is to compare the interest rate of your debt versus what you expect to make on your investments. She said, “Debt pay down is guaranteed…if you pay more on your debt, that means that you will be able to retire that interest rate that much sooner.”

Other things that you should also consider is any tax advantages you may receive from investing. Depending on what kind of plan you may have, you may get certain tax breaks when the money either goes in or out. Moreover, you may also get certain deductions regarding your student loans. You can deduct $2,500 of your student loan interest if you qualify. But if you are a high-income earner, you probably won’t qualify, which would make it more beneficial to pay down the debt instead.

Lastly, consider refinancing to get a lower interest rate on your student loans. This may come with certain risks if you have federal loans, which have discussed in a previous article here. This can help you, in the long run, pay off the debt quicker, but make sure you weight the pros and cons thoroughly before going forward with it.

In sum, you should be putting money away for retirement as well as paying off your student land debt. However, after comparing your interest rate on loans versus your investment returns, what sort of tax benefits you may get, and if refinancing is a good move for you, you can decide how much of your earnings should be devoted to one or the other.