The best way to get a good deal on a mortgage is by comparing different quotes, but you have to know what you're looking for when weighing the different offers.

The loan's annual percentage rate (APR) can give you a good idea of the overall cost of a mortgage because it factors in loan fees and the interest rate. However, you don't just want to chase the lowest rate — APRs are based on the full life of the loan (usually 30 years), and most borrowers won't keep their mortgage for that long. "As soon as you refinance ... your APR is different," says Gordon Miller, president of North Carolina-based Miller Lending Group. "It starts climbing."

CNBC Select explains what numbers you should focus on in your mortgage offer when the advertised APR doesn't reflect how long you're likely to stay in the home.

What your mortgage APR isn't telling you

A mortgage APR is based on the interest rate and lender fees. It's almost always higher than the interest rate because it's meant to show the total borrowing cost. If you keep your mortgage for its full term, which is typically 30 years, then the APR listed on your Closing Disclosure is what you end up paying.

However, if you refinance your mortgage or sell your home before 30 years, "the actual APR would be different ... since any fees you paid would effectively be broken down over a shorter period of time," says Keith Gumbinger, vice president at HSH, a mortgage industry publication.

Very few, if any homeowners will keep a mortgage for the full 30 years. Last year, the average home seller lived in their home for six years, according to the ATTOM Year-End 2022 U.S. Home Sales Report. And homeowners that find their "forever home" are still likely to refinance (i.e. get a new mortgage) at some point. According to the most recent data provided by Black Knight, the average mortgage was held for just over 3.5 years before a rate and term refinance and just over five years before a cash-out refinance.

How getting rid of your mortgage early affects the fees you pay

A simple way to demonstrate how comparing APRs doesn't tell you the whole story is by looking at the monthly cost of fixed upfront fees.

For example, if you take out a 30-year fixed-rate mortgage with $7,000 in lender fees, then roughly $19 a month in fees will be factored into the loan's APR (in addition to the interest you pay) over the full 30 years. However, if you refinance after four years, your loan fees end up averaging about $146 a month.

The original APR that's listed on your mortgage documentation fails to capture the impact fixed upfront fees have when you don't keep your mortgage for its full term.

One way to minimize the headache of paying lender fees on a shortened schedule is by avoiding them in the first place. Ally Bank, for example, doesn't charge any lender fees at all and was ranked by CNBC Select as one of the best mortgage lenders on the market. And Chase Bank provides borrowers with a suite of calculators, educational courses and other tools to help them better understand the terms (and expenses) of any mortgage they take on.

Ally Home

  • Annual Percentage Rate (APR)

    Apply online for personalized rates; fixed-rate and adjustable-rate mortgages included

  • Types of loans

    Conventional loans, HomeReady loan and Jumbo loans

  • Terms

    15 – 30 years

  • Credit needed

    620

  • Minimum down payment

    3% if moving forward with a HomeReady loan

Terms apply.

Chase Bank

  • Annual Percentage Rate (APR)

    Apply online for personalized rates; fixed-rate and adjustable-rate mortgages included

  • Types of loans

    Conventional loans, FHA loans, VA loans, DreaMaker℠ loans and Jumbo loans

  • Terms

    10 – 30 years

  • Credit needed

    620

  • Minimum down payment

    3% if moving forward with a DreaMaker℠ loan

  • Terms apply.

  • Offers first-time homebuyer assistance?

    Yes — click here for details

Focus on the fees

Having a rough estimate of how long you plan on keeping your home loan is important. If you know you'll move out in a few years, focus on keeping your upfront fees lower.

And even if you don't plan on refinancing or selling the home, it could still be prudent to minimize your closing costs for the following reasons:

  • You never know when a job change or a change in life priorities may necessitate a move.
  • Rates constantly fluctuate and at some point, they may be lower than they are today, which means you could save money by refinancing to a lower rate.
  • Even if rates don't bottom out, you may want to do a cash-out refinance to pay for a remodeling project or to get cash for a down payment on a rental property.

Minimizing or eliminating the lender fees has another benefit — it makes shopping for a mortgage easier because if there aren't lender fees, then comparing interest rates becomes far more useful. A 2008 study by the Urban Institute showed that borrowers with "no-cost" FHA loans paid $1,200 less (a 35% reduction in fees) than those who paid upfront lender fees. According to the study, "loans with simpler terms are less expensive," in part because "consumers have a tougher time comparing alternatives when trade-offs are involved."

When you're looking at mortgage quotes be sure you're comparing apples to apples. When offering mortgages without any upfront fees, lenders typically either roll that cost into the mortgage balance or charge you a higher interest rate. Ask lenders what types of loans and fee structures they offer and then you can weigh the trade-offs between a higher loan balance, higher interest rate or paying fees.

Bottom line

A mortgage's APR is meant to show the borrower the actual cost of the loan because it includes interest and certain fees. However, mortgage APRs are calculated over the life of the loan (usually 30 years) and borrowers rarely hold onto a mortgage that long.

So an APR fails to show the effect upfront fees have, especially in the short term.

When you're comparing mortgage quotes, pay attention to both the interest rate and the fees. One way to simplify the comparison is to ask your lender about "no-cost" loans where you have no out-of-pocket lender fees. With a "no-cost" loan, you can shop around based solely on the interest rate instead of needing to analyze the tradeoff between rates and fees.

Editorial Note: Opinions, analyses, reviews or recommendations expressed in this article are those of the Select editorial staff’s alone, and have not been reviewed, approved or otherwise endorsed by any third party.