How is a mortgage or loan payment calculated?

A loan payment comes from one formula with an exponent in it: M = Pi / (1 − (1 + i)⁻ⁿ). The exponent counts how many months interest has to build on the balance. Early payments go mostly to interest and later ones mostly to the loan, so paying a little extra early saves a lot.

paid off in 4 years 10 months$305.74/monthyou repay$17,721.9385% loan15% interest
Monthly payment
$255.74
Total interest
$2,721.93
Total paid
$17,721.93
Interest saved by paying extra
$691.00

Challenge: Save at least $10,000 in interest by paying extra each month.

$
%
More settings
$
Paying extra goes straight to the balance, so less interest builds up.

Play

Drag the rate up by one point on a 30-year loan. Watch how much the interest block grows.

Challenge: Save at least $10,000 in interest by paying extra each month. The box under the picture turns green when you get it.

Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”

Understand

M=P i1−(1+i)−nM = \frac{P\,i}{1 - (1 + i)^{-n}}

Each month the lender adds interest to what you still owe, then subtracts your payment. The payment is set so that after exactly nn months the balance lands on zero. Solving for that payment gives a formula with an exponent:

M=P i1−(1+i)−nM = \frac{P\,i}{1 - (1 + i)^{-n}}

The term (1+i)−n(1 + i)^{-n} is how much a dollar paid nn months from now is worth today. It is compound interest run backwards, the same exponent as in savings.

The curve shows your balance. It falls slowly at first, because early payments mostly cover interest, then drops faster. The bar on the right splits everything you repay into the loan (blue) and interest (orange).

Use

Every input has a unit menu, so you can type values in the units you already have. Results follow your units.

Show the work

  1. Monthly rate and number of paymentsi = \frac{r}{12} = 0.005833,\quad n = 12t = 72
  2. Payment formulaM = \frac{P\,i}{1 - (1 + i)^{-n}}
  3. With your numbersM = \frac{15{,}000\cdot\frac{0.07}{12}}{1 - \left(1 + \frac{0.07}{12}\right)^{-72}}
  4. ResultM = \$255.74
  5. Total interest72 \times \$255.74 - \$15{,}000 = \$3412.93

Export

Export PDF

Enter the amount, the APR, and the length. Open "More settings" to add an extra monthly payment and see the new payoff date and the interest saved.

  • This is principal and interest only. Mortgage payments usually include property tax and insurance too.
  • It assumes a fixed rate. Adjustable-rate loans change the payment when the rate resets.
  • Lenders round to the cent each month, so their schedule can differ from this one by a few dollars.

For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.

Cheat card

M=P i1−(1+i)−nM = \frac{P\,i}{1 - (1 + i)^{-n}}
i=r12,n=12ti = \frac{r}{12},\quad n = 12t
total interest=nM−P\text{total interest} = nM - P
SymbolMeaningUnit
MMmonthly payment$
PPamount borrowed$
rryearly rate as a decimal (APR)
iimonthly rate
nnnumber of monthly payments
  • A 15-year loan has a higher payment but often less than half the total interest of a 30-year loan.
  • Extra payments go straight to the balance, so they skip all the interest that balance would have grown.
  • Taxes, insurance, and HOA fees are not in this formula. Lenders add them on top of a mortgage payment.

Print this card

Where it’s used

  • Finance & Business
    Banks use this formula to set every fixed-rate mortgage, car loan, and student loan payment.
  • Money & Shopping
    Compare a 15-year and 30-year mortgage, or see what an extra $100 a month does.
  • Home Projects
    Estimate the monthly cost of a home before you talk to a lender.

Questions people ask

How do you calculate a monthly mortgage payment?

Divide the yearly rate by 12 to get the monthly rate i, and multiply the years by 12 to get n payments. Then M = Pi / (1 − (1 + i)⁻ⁿ). At 6% for 30 years, $200,000 costs $1,199.10 a month.

Why is so much of my early payment interest?

Interest is charged on the balance you still owe. At the start the balance is biggest, so most of the payment covers interest. As the balance shrinks, more of each payment goes to the loan itself.

Is it worth paying extra on a mortgage?

Extra payments cut the balance right away, so that money stops growing interest. On $300,000 at 6.5% for 30 years, $200 extra a month pays it off years early and saves tens of thousands in interest. Check first that your loan has no prepayment penalty.

What is APR?

The annual percentage rate, the yearly cost of borrowing. For a fixed-rate loan, divide it by 12 for the monthly rate. Official APR figures also fold in some fees, so they can be a little higher than the note rate.