When a bank lends you money to buy a home, it does not simply divide the loan by the number of months. If it did, it would earn no interest. Instead, your monthly payment is carefully set so that every payment covers that month's interest plus a slice of the loan itself — and the final payment lands exactly on zero. That balancing act is what the mortgage formula does, and once you see its four inputs, you can calculate any mortgage payment by hand.
The mortgage payment formula
The standard formula for a fixed-rate mortgage is:
M = P × [r(1 + r)^n] ÷ [(1 + r)^n − 1]
Four inputs feed it. P is the loan amount — the home price minus your down payment, not the full price. r is the monthly interest rate: take the annual rate, divide by 12, and divide by 100 if the rate is written as a percentage. n is the total number of monthly payments: years × 12. M, the answer, is your fixed monthly payment for principal and interest. The formula works because the (1 + r)^n terms account for interest compounding month after month over the whole term.
Worked example: $300,000 over 30 years
Take a loan of $300,000 at an example annual rate of 6% over 30 years. This rate is only an illustration for the arithmetic — check current rates from lenders before making any real decision.
Step 1: convert the rate. r = 6 ÷ 12 ÷ 100 = 0.005 per month. Step 2: count the payments. n = 30 × 12 = 360 months. Step 3: raise (1 + r) to the power of n. (1.005)^360 is about 6.0226. Step 4: build the fraction. The top is 0.005 × 6.0226 = 0.030113; the bottom is 6.0226 − 1 = 5.0226; dividing gives about 0.0059955. Step 5: multiply by the loan. $300,000 × 0.0059955 = about $1,798.65 per month.
Now look at the lifetime cost, because it surprises most buyers. $1,798.65 × 360 payments = $647,515 in total, which means $347,515 of that is interest — more than the amount borrowed. That is the price of spreading a large loan over three decades, and it is why the term you choose matters so much. Try your own numbers in our free Mortgage Calculator — it runs the same formula instantly.
Why your balance barely falls at first
Many new homeowners check their statement after a year and feel cheated: the balance has hardly moved. This is normal, and it is called amortization. Each payment first pays that month's interest, and only what is left reduces the balance. In the example above, the first month's interest is $300,000 × 0.005 = $1,500, so only $298.65 of the $1,798.65 payment touches the principal. Month by month the balance shrinks, so the interest slice shrinks and the principal slice grows.
15 years vs 30 years: the trade-off
Run the same $300,000 loan at the same example 6% rate over 15 years instead. Now n = 180, (1.005)^180 is about 2.454, and the formula gives a monthly payment of about $2,531.57 — roughly $733 more per month. But the total paid is only $455,683, with $155,683 in interest. Compared with the 30-year loan, you save about $191,832 in interest. The shorter term costs more each month but far less overall — pick the term you can comfortably afford, since a strained payment is risky even if it saves interest.
What changes your payment
Three levers move the result. A bigger down payment shrinks P directly — borrow less and every part of the formula gets smaller. A lower interest rate helps even more than most people expect, because the rate compounds over hundreds of payments — so check current rates and compare offers. A shorter term raises the monthly payment but cuts total interest sharply, as the example above shows. Extra payments help too: any amount you pay above the scheduled payment goes straight to principal, which shrinks every future interest charge — but confirm with your lender that extra payments are applied to principal and carry no prepayment penalty.
What the formula leaves out
The formula covers principal and interest only, so it is not your full monthly housing bill. Property tax, homeowner's insurance, and any HOA fees sit on top, and if your down payment is under 20%, lenders usually add private mortgage insurance (PMI) until you build enough equity. Adjustable-rate mortgages are another gap: the formula assumes one fixed rate, but if your rate resets, your payment is recalculated at the new rate. Closing costs and fees are also excluded — they are paid upfront, not folded into the monthly figure. Add all of these to the formula's answer for the real number you will pay each month.
Try your own numbers
The fastest way to build intuition is to move the inputs around. In our Mortgage Calculator, try the same loan at 15 and 30 years side by side, then try raising the down payment and watch the payment fall. As a sanity check, lenders generally like your total housing payment, including tax and insurance, to stay under about 28% of your gross monthly income.