Mortgage formula

How to calculate mortgage payment amounts: the formula, step by step

How to calculate mortgage payment amounts: divide the annual rate by 12 (r), multiply the years by 12 (n), and apply P × r × (1 + r)n ÷ ((1 + r)n − 1). For $300,000 at 7.11% over 30 years, r = 0.005925, n = 360 and the payment is $2,018.12 a month.

HELOC Payment Calculator editorial teamUpdated 4 sources

Worked formula

Mortgage payment, step by step

Every intermediate number of the formula

$
%
years
Monthly principal and interest$2,018.12$300,000 over 360 payments
First payment: interest$1,777.50balance × monthly rate
First payment: principal$240.62payment − interest
Total interest$426,523$726,523 paid in all
The formula, step by step
Monthly rate r = annual rate ÷ 120.005925
Number of payments n = years × 12360
(1 + r)n8.387192
P × r × (1 + r)n14,908.23
(1 + r)n − 17.387192
Payment = the two lines above divided$2,018.12

How it is calculated. M = P × r × (1 + r)n ÷ ((1 + r)n − 1), the same as P × r ÷ (1 − (1 + r)−n). r = annual rate ÷ 12; n = years × 12.

The mortgage payment formula

A fixed-rate mortgage payment is the level monthly amount that pays each month's interest and retires the whole balance on the last payment. It depends on only three numbers: the loan amount, the monthly interest rate and the number of payments.

M = P × r × (1 + r)n ÷ ((1 + r)n − 1)M = monthly payment · P = loan amount · r = annual rate ÷ 12 (as a decimal) · n = years × 12

What each symbol means
SymbolMeaningExample
PAmount borrowed (price − down payment)$300,000
rMonthly rate = annual rate ÷ 100 ÷ 127.11 ÷ 1,200 = 0.005925
nNumber of monthly payments = years × 1230 × 12 = 360
MMonthly principal and interest$2,018.12

Step-by-step example

Here is the calculation for $300,000 at 7.11%, the 30-year average in Freddie Mac's survey on Nov 12, 2026.[1] Carry at least six decimal places; rounding r early is the most common reason a hand calculation is off by a few dollars.

  1. Monthly rate. r = 7.11 ÷ 100 ÷ 12 = 0.005925.
  2. Number of payments. n = 30 × 12 = 360.
  3. Growth factor. (1 + r)n = 1.005925360 = 8.3872.
  4. Numerator. P × r × (1 + r)n = $300,000 × 0.005925 × 8.3872 = 14,908.23.
  5. Denominator. (1 + r)n − 1 = 7.3872.
  6. Payment. 14,908.23 ÷ 7.3872 = $2,018.12.

Over 360 payments you pay $726,523, of which $426,523 is interest. The calculator above shows every intermediate number for your own loan, and the mortgage payment calculator adds taxes, insurance and PMI to it.

Check the formula against an official example

You can test any calculator, including this one, against the CFPB's completed sample Loan Estimate: a $162,000 loan at 3.875% for 30 years shows monthly principal and interest of $761.78.[2] The formula gives $761.78: r = 0.00322917, n = 360.

How each payment splits into interest and principal

Each month's interest is the balance times r; the rest of the payment reduces the balance. Because the balance falls, interest falls and principal rises every month even though the payment stays the same.

Interest this month = balance × r$300,000 × 0.005925 = $1,777.50

First three payments on $300,000 at 7.11%
PaymentStarting balanceInterestPrincipalEnding balance
Month 1$300,000.00$1,777.50$240.62$299,759.38
Month 2$299,759.38$1,776.07$242.04$299,517.34
Month 3$299,517.34$1,774.64$243.48$299,273.86

In the first payment only $240.62 of $2,018.12 goes to principal. That is why extra payments made early save the most interest, and why a recast after a lump sum lowers the payment.

The formula in a spreadsheet

Spreadsheets have the formula built in. Rates and payments must use the same period, so divide the annual rate by 12:

Spreadsheet functions (Excel, Google Sheets, LibreOffice)
What you wantFormulaResult for this example
Monthly payment=PMT(7.11%/12, 360, -300000)$2,018.12
Interest in month 1=IPMT(7.11%/12, 1, 360, -300000)$1,777.50
Principal in month 1=PPMT(7.11%/12, 1, 360, -300000)$240.62

The minus sign before the loan amount makes the payment come out positive. The result is principal and interest only.

Rates, terms and the payment

The payment rises with the rate and falls with the term, but a longer term costs more interest in total:

Monthly payment on $300,000
Rate15 years20 years30 years
5.5%$2,451$2,064$1,703
6%$2,532$2,149$1,799
6.5%$2,613$2,237$1,896
7%$2,696$2,326$1,996
7.5%$2,781$2,417$2,098

When the formula does not apply

The level-payment formula assumes a fixed rate and equal monthly payments. Other loans are calculated differently:

  • Interest-only periods charge only balance × r until amortization starts; see the interest-only mortgage calculator.
  • Adjustable-rate loans re-run the formula on the remaining balance and term each time the rate resets.
  • HELOCs are open-end credit: the balance changes as you draw and repay,[3] and the draw period is commonly interest-only with principal optional.[4] The HELOC payment calculator handles both phases.

Principal and interest is not the whole paymentLenders usually collect property tax and insurance with the payment, and PMI if you put down less than 20%. Use the home mortgage calculator for the full monthly cost of owning.

Frequently asked questions

What is the formula for a monthly mortgage payment?

M = P × r × (1 + r)n ÷ ((1 + r)n − 1), where P is the loan amount, r is the annual rate divided by 12 and n is the number of monthly payments.

How do you calculate the interest on a mortgage payment?

Multiply the balance owed by the monthly rate. On $300,000 at 7.11%, the first month's interest is $1,777.50; the rest of the payment reduces the balance.

How do I calculate my mortgage payment in Excel?

Use =PMT(rate/12, years*12, -loan). For this example: =PMT(7.11%/12, 360, -300000) returns $2,018.12.

Why is my lender's payment different from my calculation?

Usually because the lender's figure includes taxes, insurance and mortgage insurance, or because the rate or loan amount you used differs slightly (for example, points or a financed fee). Principal and interest alone should match the formula to the cent.

Sources

  1. Primary Mortgage Market Survey (PMMS) · Freddie Mac, week of November 12, 2026
  2. Loan Estimate: fixed rate loan sample (form H-24(B)) · Consumer Financial Protection Bureau, sample dated February 7, 2014
  3. Regulation Z § 1026.2, Definitions (open-end and closed-end credit) · Consumer Financial Protection Bureau, current as of November 10, 2026
  4. Comptroller's Handbook: Residential Real Estate Lending (home equity lines and loans) · Office of the Comptroller of the Currency, Version 1.2, January 2017