How to Calculate a Mortgage Payment Step by Step

The formula your lender uses, a full worked example with real arithmetic, and an amortization schedule you can check line by line.

→ Use the free Mortgage Calculator

If you want to know how to calculate mortgage payments, start with the formula your lender uses every time: three inputs, one equation, and a result you can verify yourself. Your lender hands you a quote — $1,517 a month for 30 years — you nod, sign the papers, and move on. But somewhere in the back of your mind, you wonder how they got to that exact number. Once you see how the three inputs connect, the calculation becomes completely readable.

The three variables your payment depends on

Every fixed-rate mortgage payment comes down to three inputs: P, r, and n.

  • P is your loan principal — the amount you actually borrowed after your down payment.
  • r is your monthly interest rate — your annual rate divided by 12.
  • n is the total number of monthly payments — your loan term in years multiplied by 12.

For a concrete starting point: a $300,000 loan at 6% for 30 years gives you P = 300,000, r = 0.005 (6% divided by 12), and n = 360 (30 years times 12 months). Those three numbers are everything the formula needs.

The mortgage payment formula

M = P × [r(1 + r)n] ÷ [(1 + r)n − 1]
Where M = monthly principal and interest, P = loan principal, r = monthly interest rate, and n = total number of monthly payments.

The numerator handles the cost of borrowing: it scales the principal by the interest rate and compounds it across the full loan term. The denominator stretches that cost across every payment so you pay a fixed amount each month rather than a lump sum. You may also see this written as M = Pr / [1 − (1+r)−n], which is algebraically equivalent — spreadsheets and some finance textbooks prefer that version, but the result is identical.

Worked example: a $240,000 loan at 6.5%

Here's a realistic scenario: you're buying a home priced at $300,000, putting 20% down ($60,000), and financing the remaining $240,000 at a 6.5% annual interest rate on a 30-year term. Converting to formula inputs: P = 240,000, r = 0.065 ÷ 12 = 0.005417, and n = 30 × 12 = 360.

The 6.5% rate here is intentionally illustrative and keeps the arithmetic clean — for context, the average 30-year fixed rate was approximately 7.09% as of late September 2026.

Solving step by step:

  1. Calculate (1+r)n: 1.005417 raised to the 360th power ≈ 6.9913.
  2. Multiply by r for the numerator: 0.005417 × 6.9913 = 0.03787.
  3. Subtract 1 from 6.9913 for the denominator: 5.9913.
  4. Divide numerator by denominator: 0.03787 ÷ 5.9913 = 0.006322.
  5. Multiply by P: 0.006322 × 240,000 ≈ $1,517 per month in principal and interest.

CalculatePilot's mortgage calculator runs this same formula and shows the methodology alongside your result, so you can check every line against your own work rather than accept a number on faith.

How amortization splits each payment

In month one, your lender calculates interest on the full outstanding balance. For $240,000 at a monthly rate of 0.5417%, that's $240,000 × 0.005417 ≈ $1,300 in interest. The remaining $217 of the $1,517 payment reduces the principal. As the balance shrinks, each month's interest charge drops slightly and a larger slice of the fixed payment goes to principal — slowly at first, then faster in the loan's later years.

MonthBeginning balanceInterest portionPrincipal portionEnding balance
1$240,000.00$1,300.00$217.00$239,783.00
2$239,783.00$1,298.82$218.18$239,564.82
3$239,564.82$1,297.63$219.37$239,345.45
4$239,345.45$1,296.44$220.56$239,124.89

Reading this schedule tells you exactly when you're building equity and when refinancing might make mathematical sense — use the refinance calculator to test that trade-off once rates move.

How rate, term and down payment change your total cost

On a $300,000 loan at 6%, the 30-year payment is about $1,799/month with $370,682 in total interest over the life of the loan. The 15-year version costs $2,532/month but generates only $155,682 in total interest — roughly $215,000 less interest for about $733 more per month. That's a cash-flow decision more than a math one: if the extra payment would strain your budget, the 30-year term can still make sense even knowing the long-term cost.

Reducing your principal by $20,000 does more than lower your monthly payment by a modest amount — it reduces the balance on which interest compounds every month for the next 30 years. Every extra dollar of down payment is a dollar you'll never pay interest on. Down payment size also affects whether you owe private mortgage insurance: putting down less than 20% typically triggers PMI, generally running 0.46%–1.50% of the loan amount annually (on a $240,000 loan at 0.8%, that's about $160/month). Run the numbers for different down payments with the house affordability calculator before you set a target price.

What the basic formula leaves out

The mortgage payment formula calculates principal and interest only. Your actual monthly housing cost layers on property taxes, homeowners insurance, HOA dues if applicable, and PMI if your down payment is under 20%:

Full payment = (Principal + Interest) + Monthly property tax + Monthly insurance + HOA + PMI

Lenders typically collect taxes and insurance in escrow and pay those bills for you. Building a budget on the formula alone will understate your actual housing cost.

Interest rate vs. APR: which one to use

The interest rate is the number that feeds into the mortgage payment formula — it determines how much interest accrues on your balance and sets your monthly principal-and-interest payment. APR wraps in lender fees, origination charges and discount points, making it higher than the stated rate and more reflective of total borrowing cost. Use the interest rate to calculate or verify your monthly payment; use APR when comparing two loan offers side by side. Plugging APR into the formula instead of the rate produces a payment estimate that's higher than your actual payment, which leads to real budgeting errors.

Put the formula to work

Every fixed-rate mortgage payment comes from three inputs — P, r and n — run through the same formula every time. Amortization determines how each payment splits between interest and principal, with interest dominating early and principal accelerating later. Changing your rate or term by even a small amount moves total interest paid by six figures over a 30-year loan. Understanding the formula, not just the output, is what lets you catch errors in lender quotes and compare scenarios intelligently.

Related guides & tools

For the 15- vs 30-year decision explained in words rather than arithmetic, read the mortgage calculator guide. The same principal-times-rate-over-time logic behind compounding is explained in how to calculate compound interest. To size a realistic price range before you shop, use the house affordability calculator, then compare borrowing costs with the loan calculator.

Frequently asked questions

What is the mortgage payment formula?

M = P × [r(1+r)n] ÷ [(1+r)n − 1], where P is the loan principal, r is the monthly interest rate (annual rate ÷ 12), and n is the total number of monthly payments (loan term in years × 12).

Why is my first mortgage payment mostly interest?

Interest is calculated on the full outstanding balance each month. Early on the balance is highest, so interest takes the largest share of the fixed payment; as the balance shrinks, a growing share goes to principal.

Should I use the interest rate or APR to calculate my payment?

Use the interest rate. APR includes lender fees and points, so it's useful for comparing offers, but plugging it into the formula instead of the rate overstates your actual monthly payment.

How much does the loan term change the total interest paid?

Substantially. On a $300,000 loan at 6%, a 30-year term totals about $370,682 in interest versus about $155,682 for a 15-year term — roughly $215,000 less for about $733 more per month.

Calculate your mortgage payment →