If you want a good deal on a home, here's the credit score you need

The income you need to afford a home in the biggest U.S. cities

Buying a home can be a challenge, especially if it's your first time. But, for some aspiring homeowners, it can be a more daunting task than for others, depending on their credit score.

Credit scores signify your trustworthiness to financial institutions and can determine how easy, or how expensive, it is for you to get a mortgage. To determine your ability to pay, lenders look at your score and they prefer you to have "good" or "excellent" credit — to the point that having "excellent" credit can save you thousands of dollars, according to financial website NerdWallet.

A score of 750 to 850 is considered "excellent"; a score of 700 to 749 is considered "good"; a score of 650 to 699 is "fair"; and a score of 300 to 649 is "poor." Scores range from 300 to 850 based on major scoring systems FICO and VantageScore.

"If somebody has a high score, what that shows us is that they've been good on meeting their obligations, whether it be credit cards, car loans or other home loans," Brian Hoovler, branch operations assistant manager at Bay Equity Home Loans, tells NerdWallet. "It means we're more likely to want to give you a loan, because we know you're going to pay us back."

While it's up to the lender to determine the specific interest-rate parameters attached to your loan, the difference of a few points on your credit score could add up in a big way. If your score falls below 700, you could end up paying a lot more.

Suppose you're looking to buy a home that's worth $300,000 with a 20 percent down payment and you get a 30-year, fixed-rate loan of $240,000. Fixed-rate loans ensure your interest rate stays the same over the entire term of your loan, despite outside market factors. An "excellent" credit score of 780 would have earned you a 3.87 percent rate in October, NerdWallet reported then. (Rates have risen and are higher now.) Before taxes, insurance or homeowners' association fees, that would mean you'd pay about $1,129 a month.

If your score was 100 points lower, at 680, your rate would have been about 4.12 percent, making your monthly payments around $1,163. That would have been an extra $34 a month, $408 a year and a whopping $12,240 over the life of your loan.

So, overall, even the subtleties of your credit score can have a real impact on your bottom line.

Kevin O'Leary says this is the best way to buy a home that will appreciate

"If you have a score of 760 or above, you're pretty much golden," says Hoovler. "From there down, every 20 points you'll start seeing small hits here and there."

The average credit score for an American aged 18-29 is 652, while the average score for someone aged 30-39 is 671. That means most younger people have some room for improvement.

If you're in the market for a home and don't have sterling credit yet, you also have some other options. Some financial institutions may offer a loan to borrowers with credit in the "fair" and "poor" ranges, but "the total cost of borrowing, represented as the interest rate, may be far higher than those with excellent or good credit," according to NerdWallet.

And while credit has a major impact on the type of mortgage you'll be eligible for, other factors, like income, come into play, too. In some instances, your income could determine your eligibility, if it's high enough. In other cases, you could be approved if you can offer a large enough down payment on the home.

Millennials are making a big mistake by not owning their homes, says one financial expert

The type of loan matters, too. Loans insured by the Federal Housing Administration can be approved for borrowers with poor credit who cannot afford large down payments, though other qualifying criteria must be met. And the Department of Veterans Affairs works with lenders to make loans accessible to military veterans and families.

If you're looking for a home, or intend to look in the future, it's wise to try to improve your score now. One way to do that is to consider getting a credit card if you don't already have one. This can help you establish an official line of credit history.

When it comes to your credit card balance and any other loans you may have, including student loans, be sure to make payments in full and on time. Details about your payment history, including late or missed payments, can stay on your credit report for years.

Buying a home requires a lot of financial responsibility, and "one's credit score is a direct indication of how fit an individual is from a money management perspective," writes NerdWallet. If you want to save thousands of dollars in the long-term, work on upping your score now.

Here are some additional tips for first-time homebuyers, and how to decide whether you should rent or buy.

Like this story? Like CNBC Make It on Facebook

Don't miss: Poor credit isn't what makes renting hard—here's the real problem

Video by Mary Stevens and Andrea Kramar

How much more it costs to own vs. rent in your state