Mortgage Payment Formula Explained With Examples
What every letter in the mortgage payment formula means, how to use it, and three worked examples with 15-year and 30-year loans, so you can check any lender's quote.
What Is the Mortgage Payment Formula?
The mortgage payment formula is the equation lenders use to turn a loan into a fixed monthly payment. It guarantees that after the last payment, the balance is exactly zero. For a fixed-rate loan it is:
M = P [ r(1+r)^n ] / [ (1+r)^n − 1 ]
It looks heavy, but there are only four values. If you want a shorter walk-through with a cheat sheet, see our guide on how to calculate a mortgage payment by hand.
What Each Variable Means
| Letter | Name | Example (6% loan, 30 years, $250,000) |
|---|---|---|
| M | Monthly payment | What we are solving for |
| P | Principal (loan amount) | $250,000 |
| r | Monthly interest rate | 6% ÷ 12 = 0.005 |
| n | Number of payments | 30 × 12 = 360 |
Why does the formula use (1+r)^n?
Interest compounds monthly. (1+r)^n tells you how much one dollar grows over the full loan. The fraction then divides the loan into equal payments that exactly pay off both the principal and the interest that builds up along the way.
Example 1: $300,000 at 6.5% for 30 Years
- r = 0.065 ÷ 12 = 0.0054167
- n = 30 × 12 = 360
- (1+r)^n = (1.0054167)^360 ≈ 6.9919
- M = 300,000 × (0.0054167 × 6.9919) ÷ (6.9919 − 1) ≈ 300,000 × 0.0063207
M ≈ $1,896.20 per month
Total paid: $682,633 (interest: $382,633)
Example 2: $250,000 at 6% — 15 Years vs 30 Years
Here the monthly rate is 0.005. Running the formula for both terms shows the trade-off clearly.
| 15-year loan | 30-year loan | |
|---|---|---|
| Number of payments (n) | 180 | 360 |
| Monthly payment | $2,109.64 | $1,498.88 |
| Total interest | $129,736 | $289,595 |
| Total cost | $379,736 | $539,595 |
The shorter loan costs about $611 more every month, but saves roughly $160,000 in interest. The longer loan keeps the payment lower and gives you more room in your monthly budget.
Example 3: $400,000 at 7% for 30 Years
r = 0.07 ÷ 12 = 0.0058333 n = 360
M ≈ $2,661.21 per month
Total interest ≈ $558,036
At a higher rate, interest on a 30-year loan can exceed the amount you borrowed. This is the clearest reason to compare rates and terms before you commit.
How a Mortgage Payment Splits Between Interest and Principal
The payment is constant, but the split moves. This table uses Example 1 ($300,000, 6.5%, 30 years):
| Payment # | Interest | Principal | Remaining balance |
|---|---|---|---|
| 1 | $1,625.00 | $271.20 | $299,728.80 |
| 60 (year 5) | $1,523.20 | $373.01 | $280,832.93 |
| 180 (year 15) | $1,182.95 | $713.25 | $217,677.42 |
| 360 (year 30) | $10.22 | $1,885.99 | $0 |
After 15 years you have paid half the payments but still owe about 73% of the original loan. That is amortization at work, and it is why extra payments early in the loan have the biggest effect.
What Happens If You Pay Extra Each Month?
The formula gives the minimum payment. Any extra you send goes straight to principal, which lowers the balance that next month's interest is charged on. On Example 1 ($300,000, 6.5%, 30 years), extra monthly payments have a large effect:
| Extra per month | Loan paid off in | Interest saved (approx.) |
|---|---|---|
| $0 | 30 years | $0 |
| $100 | 26 years | $61,000 |
| $200 | 23 years | $103,000 |
| $500 | 17.5 years | $180,000 |
Check that your lender does not charge a prepayment penalty and that extra money is applied to principal, not to next month's payment.
Fixed-Rate vs Adjustable-Rate: Does the Formula Still Work?
For a fixed-rate loan, one calculation gives you the payment for the whole term. An adjustable-rate mortgage (ARM) works differently. During the initial fixed period you can use the formula as normal. When the rate resets, the lender runs the formula again using your remaining balance, the new rate and the number of payments left. The new payment can be higher or lower, so budget for a rate increase if you take an ARM.
How to Calculate It in Excel or Google Sheets
You don't need to type the formula out. Spreadsheets have a built-in function:
=PMT(annual_rate/12, years*12, -loan_amount)
=PMT(0.065/12, 360, -300000) → 1,896.20
The minus sign in front of the loan amount makes the answer come out as a positive payment.
What the Formula Leaves Out
- •Property tax, homeowners insurance and any private mortgage insurance (PMI).
- •HOA fees and maintenance costs.
- •Closing costs and lender fees.
- •Rate changes on adjustable-rate mortgages after the fixed period.
Ways to Lower Your Mortgage Payment
- •Make a larger down payment to reduce P.
- •Shop several lenders for a lower rate, since r is the most powerful variable.
- •Choose a longer term, accepting more total interest.
- •Improve your credit score before applying to qualify for better rates.
- •Refinance later if rates fall enough to cover the costs.
Self-employed buyers should also keep their paperwork tidy; consistent, professional freelance invoices help document your income when you apply.
Mortgage Formula FAQs
What is the formula for a mortgage payment?
M = P[r(1+r)^n] / [(1+r)^n − 1], where M is the monthly payment, P is the loan amount, r is the monthly interest rate (annual rate divided by 12) and n is the number of monthly payments.
Why is the monthly interest rate the annual rate divided by 12?
Because mortgage interest is charged monthly. A 6% annual rate becomes 0.5% per month (0.06 ÷ 12 = 0.005), and that monthly rate is applied to your outstanding balance each month.
How do I calculate a mortgage payment in Excel or Google Sheets?
Use the PMT function: =PMT(annual_rate/12, years*12, -loan_amount). For $300,000 at 6.5% over 30 years, =PMT(0.065/12, 360, -300000) returns about $1,896.20.
Does the formula include property tax and insurance?
No. It gives principal and interest only. Lenders usually add property tax, homeowners insurance and any mortgage insurance on top, often through an escrow account.
Why do I pay mostly interest at the start of a mortgage?
Interest is charged on the outstanding balance, which is highest at the beginning. The payment is fixed, so a large share goes to interest early on and more goes to principal as the balance falls.
Is a 15-year or 30-year mortgage better?
A 15-year loan has a higher monthly payment but much lower total interest. A 30-year loan has a lower payment and more flexibility but costs more overall. The right choice depends on your budget and goals.
Summary
The formula M = P[r(1+r)^n] / [(1+r)^n − 1] converts a loan, a monthly rate and a number of payments into an equal monthly payment. Knowing how it works lets you check any quote, compare terms and see how much interest you really pay.