When you have student loans to pay off, it can be tempting to delay saving for future needs like retirement in order to focus on knocking out those student loans. But, both priorities are important, and delaying retirement savings can be detrimental for your future.

It’s possible to save for retirement while continuing to pay off student loans. Doing so requires a strategy and some financial discipline, but getting out of debt and having a robust retirement account will be worth the effort. If you want to pay off student loans and prepare for your future retirement, follow these four steps.

Always pay at least the minimum loan payments

As with any type of debt, it’s essential to make at least the minimum payment on your student loan each month. If you don’t make minimum payments, you could default on your student loan and end up with additional fees and debt.

If your current minimum payment isn’t feasible for your budget, look into income-based student loan repayment. You may qualify for a payment adjustment based on your income level.

Also, remember that if you make less than $80,000 per year, your student loan payments may be tax-deductible. If so, be sure to claim the tax deduction to save on federal taxes (or get a bigger tax refund). When your refund comes in, consider applying it to your loan balance to pay it down faster.

If at all possible, pay more than the minimum payment each month. That way, you’ll get out of debt faster, save money on interest over time, and have more money available to apply toward other financial goals.

But don’t delay saving for retirement

Even as you’re paying down your student debt, it’s crucial to also save and invest for your retirement. By starting earlier with retirement savings, you can benefit from compounding interest, which is basically earning interest on your interest. That means you can end up with a bigger nest egg without actually contributing as much money to your retirement account.

If you have a 401k or other employer-sponsored retirement plan at work, there is no minimum contribution. So even if you contribute a small amount, contribute something to start building your retirement savings.

If you don’t have a plan at work or want to save even more, open your own Individual Retirement Account (IRA). With a Traditional IRA, you can contribute up to $6,000 in 2020 ($7,000 if you’re over 50), and your contributions are tax-deductible during the year you make them. If you choose a Roth IRA, you pay taxes on the money before you contribute it—and pay no taxes on it (or its earnings) when you withdraw it in retirement.

The money you contribute to your retirement fund will likely yield a higher return than the amount of interest you’re paying on your student loans. For instance, among those who consistently contribute to their 401(k) plans, account balances grew at a compound annual average rate of 14.2 percent over six years, according to a study from the Employee Benefit Research Institute.

On the other hand, average student loan interest rates are around 5 percent. So even though you may be paying 5 percent in interest on your student loan, you could be earning 14 percent on your retirement investments—a net increase of 9 percent. That shows it’s worth your time to work toward both financial goals, saving for retirement and paying off student loan debt.

Look to your employer for assistance

Your employer is likely interested in helping you build a stronger financial future for yourself, as happy, financially secure employees create stronger businesses. For instance, many employers offer matching retirement contributions to employees’ 401k or other retirement plans. If your employer offers a matching contribution, that means they will add to your retirement account the same amount you’re contributing, usually up to a certain percentage of your salary. This is completely free money, so try to contribute enough to get the full match if possible.

Also, growing numbers of employers now offer student loan payoff assistance, such as Gradifi’s Student Loan PayDown. With programs like this, employers can make monthly contributions toward your student loan balance, in addition to your own payment, to help pay off the debt faster. If your employer offers such a program, take advantage of it—and if they don’t offer it yet, ask human resources to consider adding a student loan benefit.

Plan to increase retirement contributions after you’ve paid off your student loans.

Most financial advisors recommend saving at least 10 percent to 20 percent of your income for retirement. If you’re not able to save that much while still working to pay off your student loans, save as much as you can now and commit to boosting your savings as soon as you can.

However, you may be able to save more than you think even while you’re still paying off student debt. For instance, if you have an employer matching contribution to your 401k, that can double the percentage you’re saving. Say your employer will match up to 6 percent of your income. If you contribute 6 percent and your employer matches that with another 6 percent, you’re actually saving 12 percent of your income for retirement. At the same time, you’re able to keep 94 percent of your income, and you can make student loan payments out of that portion.

After you’ve paid off your student loans, make a commitment to increase your retirement savings contributions to build a bigger nest egg. If you increase your 401k contributions to 10 percent of your income and your employer continues to match up to 6 percent, you’ll be saving 16 percent of your income for retirement each year. As your retirement account earns interest, those funds are added to your account as well and you’ll continue to earn interest on the total, year after year.

You don’t have to tackle just one financial goal at a time. It really is feasible to both save for retirement and pay down your student loans. By working toward both goals at the same time, you’ll avoid sacrificing one goal for another and find success in both areas.