This article was updated on 4/25/17.

If you are gearing up to buy a home, your credit score could mean the difference between a manageable mortgage payment and one that breaks the bank.

That’s because your credit score is one of the biggest factors lenders use to determine your mortgage interest rate and how much money you’ll have to put into a down payment and pay towards closing costs.

“A credit score really means a lot,” says Donald J. Frommeyer, president of the National Association of Mortgage Professionals. “It gives the lender an opinion—based upon that credit score—about the potential risk they are taking.”

If you have a higher credit score, lenders may view you as less of a credit risk and assume that you will make on-time mortgage payments every month. As a result, a lender may offer you a mortgage at a lower, more competitive interest rate.

The interest paid on a mortgage can add up to hundreds of thousands of dollars over the life of the loan (generally 15 or 30 years). A difference of just one percentage point could mean that you are saving—or spending—a substantial sum of money.

A solid credit score could save you thousands

Scenario 1: FICO® credit score, 700 to 759

Let’s say you are applying for a $250,000 mortgage with a 30-year fixed interest rate, and you have a FICO credit score within the 700 to 759 range. (FICO credit scores start at 300 and go up to 850.)

As of April 2017, according to FICO’s Loan Savings Calculator, which estimates how FICO scores impact the interest rate you pay on a loan, you would qualify for an interest rate of 3.883 percent. A $250,000 loan, at that interest rate would ring in a payment of $1,177, for principal and interest. That is a total of $173,625 in interest over the life of the loan.

At the end of the loan term, you would have paid $423,625—the $250,000 loan amount plus the $173,625 in interest—for your home.

Scenario 2: FICO credit score, 660 to 679

Now, consider what happens if your FICO credit score is instead in the 660 to 679 range and you apply for the exact same mortgage mentioned above.

According to the FICO calculator, in April 2017 your interest rate would rise to 4.274 percent. At that rate, your monthly mortgage payment for principal and interest would jump to $1,233, and you would pay $194,011 in interest over the life of the loan.

It’s important to note that the FICO Score is just one of many credit scoring models used by mortgage lenders. While these calculations may help you estimate how much your credit score could cost you over the life of your loan, there’s no way to completely predict what interest rate you will be offered until you actually apply for a loan.

Other factors that determine your interest rate

While your credit score is important in determining your interest rate, it’s not the only factor considered by lenders. Lenders also look at the size of your down payment and the type of loan you take out.

The size of your down payment. The amount of money you put down will affect your interest rate. If you make a down payment of at least 20 percent of the home’s sale price, lenders may think you’re less of a risk and offer you a lower interest rate.

Your down payment also lowers your loan amount, which can save you money over time because you’ll be paying interest on a smaller loan.

The type of loan you take out. Different types of loans often have different interest rates, and vary based on the length of the loan, the amount of the loan, and whether the loan is conventional or government-backed. Examples of government-backed loans include FHA and VA loans.

Conventional financing options include fixed-rate and adjustable-rate (ARM) mortgages. Typically, the introductory interest rates on ARMs are lower than those offered on fixed-rate mortgages, and 15-year fixed-rate mortgages have lower interest rates than 30-year fixed-rate loans.

What can you do to help improve your credit score?

If you plan to buy a home in the near future, there are steps you can take now in order to improve your credit score over time. Make sure you understand exactly how your credit score is calculated and work on paying down any debt.

Regularly check your credit report so you know where you currently stand, and dispute any inaccurate or outdated information. Over time, positive credit activity can help you improve your credit score and also help you qualify for a better interest rate.

Ilyce Glink is the Publisher of and the Founder/CEO of Best Money Moves, an employee benefit in the financial wellness space.