Editorial Note: This content is not provided or commissioned by any financial institution. Any opinions, analyses, reviews or recommendations expressed in this article are those of the author’s alone, and may not have been reviewed, approved or otherwise endorsed by the financial institution.

We’ve covered how student loans can affect your credit score on Student Loan Hero before. But recently, I was left with a question: What is the impact on my credit score from paying off student loans early?

I had just gotten a notification that one of my credit accounts had closed, and there was a slight decrease in my credit score — but I had just paid off one of my student loans. Something that I felt so good about suddenly seemed like a mixed blessing, and it made me curious about how this had happened.

Does paying off student loans help your credit score?

Overall, student loans has positively affected my credit score. Up until two years ago, my student loans were my only source of credit — and thanks to my on-time, in-full payments, they led to a good score of 720.

But I was a little worried when my credit score went down slightly after I paid off one of my student loans. After I did some research, I found out that paying off your student loans could actually impact your credit score, even if only moderately.

But why?

Why paying off your student loans early can hurt your credit score

You may be scratching your head wondering why on earth would your credit score go down when you’ve achieved this difficult financial goal. Shouldn’t paying off your student loans help your credit score rather than hurt it?

It comes down to this: Your student loans are considered installment loans, and these can add variety to the mix of your credit portfolio. Installment loans are different from credit cards, which are considered revolving credit.

Having a mix of accounts can help your credit score. The idea is that this proves your ability to manage different types of credit. So if you don’t have other installment loans, such as a mortgage or a car loan, your credit mix will show less variety once the student loans are removed. And your credit mix accounts for 10% of your FICO score.

While 10% may not be a lot in the big picture, if you don’t have a lot of other credit history or a diverse mix of credit, you may see a slight decrease in your credit score. In other words, although paying off your student loans early makes financial sense, it can sometimes come with a small ding to your credit score.

But that doesn’t mean that you should hold on to student loans for the sake of your credit. Knocking out your student loans can free up your extra money and lower your debt-to-income ratio, which also benefits your financial situation. All in all, retiring your student debt is still a good move.

“Paying off a student loan, like any other loan, is a positive step in building a strong credit history. Doing so demonstrates you are responsible in managing your debts, which is essential to qualifying for new credit accounts,” said Rod Griffin, director of Public Education at Experian, one of the three national credit bureaus.

What will happen to my credit score?

When I saw that my credit score had dropped a little from paying off just one loan, I wondered what would happen to my credit score once all my student loans were gone. Should I expect an even steeper drop, or would my credit score remain as is?

Unfortunately, there’s no easy way to project exactly what will happen to your credit score once you’re done paying off your student loans.

“It’s impossible to say if or how much repaying student loans will affect your credit score. It depends on the individual’s unique credit history and the particular scoring model being used,” Griffin said.

He noted that there are many variables that go into calculating your credit score. Your FICO score is comprised of your payment history (35%), amounts owed (30%), new credit (10%), length of credit history (15%), and the mix of credit in use (10%).

As you can see, your payment history accounts for the largest part of your FICO credit score. If you’ve made on-time payments on your student loans, that will reflect positively on your credit score, even if you also pay off those loans and no longer have an installment loan in your credit portfolio.

Bottom line: Timely student loan repayment is key

Paying off your student loans as soon as possible makes a lot of financial sense, but be aware of how it may affect your credit score. You could potentially see a slight drop in your credit score, but probably not a significant one — and without your student debt weighing you down, you’ll be able to make other positive financial decisions that could improve it in the long run.

The best thing you can do to maintain a positive credit score is to pay your student loans on time. Paying off your student loans will result in some closed credit accounts, but that positive payment history will still be there and show lenders that you are a responsible borrower.

Also remember to regularly check your credit report and monitor your credit score. You can get your free credit report from the three major agencies at AnnualCreditReport.com, and can monitor your score using various free online services.

Jamie Cattanach contributed to this report.

 This piece originally appeared on Student Loan Hero.