How to Calculate a Mortgage Payment
To calculate a mortgage payment, use the amortization formula M = P × r(1+r)n ÷ ((1+r)n − 1), where P is the loan amount, r is the monthly rate, and n is the number of payments. For example, a $400,000 loan at 6.5% over 30 years costs $2,528.27 per month. Run your numbers with our free mortgage calculator.
- The short answer
- What each part of the formula means
- Worked example: $400,000 at 6.5% for 30 years
- Where your first payment actually goes
- 15-year vs 30-year: the real math
- What the formula leaves out: PITI
- The one extra-payment trick that actually works
- Three mistakes that break the calculation
- Adjustable rates and why the formula changes
- Calculate yours in one click
The short answer
A mortgage payment is not a guess and it is not simple interest — it is the fixed monthly amount that pays off your loan exactly, interest included, by the last payment. The formula is M = P × r(1+r)n ÷ ((1+r)n − 1). P is the amount you borrow, r is the monthly interest rate (annual rate divided by 12), and n is the total number of monthly payments (years times 12). Plug in the three numbers and you get M, the monthly principal-and-interest payment. Everything else on a mortgage statement — taxes, insurance, PMI — gets added on top of this number, which is why the formula's answer and your actual check can differ.
What each part of the formula means
P is straightforward: the loan amount after your down payment. Borrow $400,000 and P = 400,000. The rate r is where most hand calculations go wrong — it must be the monthly rate, not the annual one. A 6.5% annual rate means r = 0.065 ÷ 12 = 0.0054167 per month. Using 0.065 directly would compute a payment twelve times too large, which is the single most common error. The exponent n is the number of payments, not years: 30 years means n = 360, 15 years means n = 180. The (1+r)n terms capture compounding — each month's unpaid interest grows the balance slightly before your payment knocks it back down. The formula balances those two forces so the balance hits exactly zero after payment n.
Worked example: $400,000 at 6.5% for 30 years
Let us run the full calculation. P = 400,000, annual rate 6.5% so r = 0.065 ÷ 12 = 0.00541667, and n = 360. First compute (1+r)n = 1.00541667360 ≈ 7.015. The numerator is P × r × 7.015 = 400,000 × 0.00541667 × 7.015 ≈ 15,199. The denominator is 7.015 − 1 = 6.015. Divide: 15,199 ÷ 6.015 ≈ $2,528.27 per month. That is the exact principal-and-interest payment — verified against standard amortization math. Over 360 payments you will pay $910,177.95 total, which means $510,177.95 of it is interest: on a 30-year loan at this rate, interest costs more than the house itself.
Where your first payment actually goes
Here is the part that surprises every first-time buyer: your early payments are almost entirely interest. Payment one on our example loan breaks down as $2,166.67 of interest and only $361.61 of principal — the interest is simply the balance times the monthly rate (400,000 × 0.00541667). You paid $2,528.27 and your loan balance fell by just $361.61. This is not a trick; it is how amortization works. Interest is always charged on the full outstanding balance, so when the balance is largest — at the start — interest dominates. Each payment shaves a little principal, the balance shrinks, and the interest slice of the next payment shrinks with it. By the final years the ratio flips: nearly the whole payment attacks principal. That slow tilt is the entire shape of a mortgage.
15-year vs 30-year: the real math
Shortening the term changes the numbers dramatically. Keep the $400,000 loan at 6.5% but pay it over 15 years (n = 180): the formula gives $3,484.43 per month — about $956 more than the 30-year payment. Total interest over the life of the loan falls to $227,197.30, versus $510,177.95 on the 30-year schedule. You save roughly $283,000 in interest by paying about 38% more each month. There is no free lunch, though: the higher payment is mandatory, not optional, so a job loss or emergency hits harder with less budget cushion. The honest way to compare is not just the interest saved but whether you can sustain the higher payment through a rough year — many buyers split the difference with a 30-year loan plus voluntary extra payments.
What the formula leaves out: PITI
The formula computes principal and interest only — lenders call the full monthly check PITI: principal, interest, taxes, and insurance. Property taxes are typically collected monthly into an escrow account (a $6,000 annual bill adds $500 a month), and homeowner's insurance is escrowed the same way. If your down payment is under 20% on a conventional loan, expect PMI — private mortgage insurance — often 0.5% to 1% of the loan per year until your equity reaches 20%, adding roughly $167 to $333 a month on our example. HOA dues sit outside PITI but come out of the same paycheck. So a $2,528 formula payment can easily mean a $3,200 to $3,500 actual monthly housing cost. Always budget PITI, never just P&I.
The one extra-payment trick that actually works
You do not need to refinance to a 15-year loan to capture most of its savings — extra principal payments do the same job voluntarily. Add just $100 a month to our $400,000 example: the loan pays off in 322 months instead of 360 (about 26.8 years), and total interest drops by $63,917.25. That is $63,917 saved for $100 a month you can stop paying any time, unlike the locked-in 15-year payment. The mechanism is simple: extra money goes straight to principal, which shrinks every future interest charge. One caution: confirm your loan has no prepayment penalty (most modern US mortgages do not), and make sure the extra is applied to principal — some servicers need explicit instruction, otherwise it just sits as a credit toward next month.
Three mistakes that break the calculation
First, using the annual rate as r. Dividing by 12 is not optional — forgetting it produces a payment in the tens of thousands and a brief panic. Second, using years instead of months for n. With n = 30 instead of 360 the formula computes the payment on a 30-payment loan, which is wildly wrong. Third, calculating on the purchase price instead of the loan amount. A $500,000 house with 20% down means P = $400,000, not $500,000 — the down payment never accrues interest. A subtler fourth: comparing lenders by monthly payment alone. Two quotes can show similar payments with very different rates once points, fees, and PMI are included — always compare the APR and the total cash to close alongside the monthly figure.
Adjustable rates and why the formula changes
Everything above assumes a fixed rate. Adjustable-rate mortgages (ARMs) use the same formula but re-run it every time the rate resets — typically after an initial fixed period of 5, 7, or 10 years. A 5/1 ARM at 5.5% on $400,000 computes to about $2,271 a month for the first five years; at reset, the lender plugs the new rate and the remaining balance into the formula with the remaining term. Rate caps limit how far each adjustment can move, but the payment can still jump hundreds of dollars. The formula itself never changes — what changes is that you must recompute it at every reset, which is exactly why ARM borrowers should model the worst-case capped payment before signing, not the teaser rate.
Calculate yours in one click
Hand math builds intuition, but nobody should run 360-payment amortization by hand. Our free mortgage calculator computes your exact monthly payment, total interest, payoff date, and a year-by-year amortization table — then models extra payments so you can see the savings instantly. Everything runs in your browser; nothing is uploaded. Brushing up on the math behind rates? See how to calculate a percentage — interest is percentage math. And if you are counting down to a payoff date, here is how many days until any date.
Do it in one click
Get your exact payment, total interest, and payoff date — free, no signup.
Open the Free Tool →