The Basic Mortgage Payment Equation
The standard formula for calculating a monthly mortgage payment is:
M = P [ r(1 + r)^n ] / [ (1 + r)^n – 1 ]
In this equation, M is your monthly payment, P is the principal (the amount you borrowed), r is your monthly interest rate (annual rate divided by 12), and n is the total number of payments (years multiplied by 12). This formula accounts for the fact that each payment covers both principal and interest, with the balance shifting over time.
The equation works because a mortgage is an amortizing loan — you pay the same amount each month, but early payments go mostly toward interest while later payments go mostly toward principal. The formula calculates the exact payment that will zero out the loan by the end of the term.
Key Takeaways
- The mortgage payment formula requires four inputs: loan amount, annual interest rate, monthly interest rate (annual divided by 12), and total number of monthly payments.
- The exponent in the formula (1 + r)^n represents how compound interest accumulates over the life of the loan, which is why the payment stays the same each month.
- A small change in interest rate or loan term produces a large change in monthly payment, so testing different scenarios before committing matters.
- Most people use a calculator or spreadsheet rather than solving the equation by hand, because the math involves multiple exponentials and is error-prone without a tool.
Breaking Down Each Variable in the Equation
P (Principal) is the total amount you are borrowing. If you are buying a $300,000 house and putting down $60,000, your P is $240,000. This number does not change during the loan — it is the starting balance.
r (Monthly Interest Rate) is your annual rate divided by 12. If your lender quotes you 6.5% annually, your monthly rate is 0.065 ÷ 12 = 0.00542 (rounded). You must use the decimal form, not the percentage. This is where most hand-calculation errors happen.
n (Number of Payments) is years times 12. A 30-year mortgage has n = 360 payments. A 15-year mortgage has n = 180. The longer the term, the lower your monthly payment but the more total interest you pay over the life of the loan.
M (Monthly Payment) is what you are solving for. This is the amount that appears on your bill each month, and it stays the same for the entire loan (assuming a fixed-rate mortgage, not an adjustable one).
Why the Exponent (1 + r)^n Matters
The exponent is the engine of the formula. It represents how many times your interest compounds — once per month, for the full term. A 30-year loan at 6% has an exponent of (1.005)^360, which equals roughly 6.1. This large multiplier is why the denominator in the formula is so much bigger than the numerator, which is why your monthly payment is much smaller than your total loan amount.
If you increase the interest rate by even 0.5%, the exponent grows noticeably, and your monthly payment rises. If you shorten the term from 30 years to 15 years, the exponent shrinks (because n is smaller), which means your monthly payment rises even more — you are paying off the same principal in half the time. This is why a 15-year mortgage payment is not half the 30-year payment; it is usually 50% to 60% higher.
The denominator, [(1 + r)^n – 1], is always positive and always larger than the numerator. This ensures your payment is always less than the principal divided by the number of years, which makes intuitive sense — you are not paying back the full principal in year one.
Working Through a Real Example
Suppose you borrow $250,000 at 6.5% annual interest for 30 years.
First, convert the annual rate to a monthly rate: 0.065 ÷ 12 = 0.00542 (or 0.542% per month).
Next, calculate n: 30 years × 12 months = 360 payments.
Now plug into the formula:
M = 250,000 [ 0.00542(1.00542)^360 ] / [ (1.00542)^360 – 1 ]
The exponent (1.00542)^360 ≈ 6.118. So the numerator becomes 250,000 × 0.00542 × 6.118 ≈ 8,310. The denominator becomes 6.118 – 1 = 5.118. Dividing: 8,310 ÷ 5.118 ≈ $1,623 per month.
This is your principal and interest payment only — it does not include property taxes, insurance, or HOA fees, which lenders often bundle into an escrow account and add to your bill.
How to Use a Spreadsheet Instead of Solving by Hand
Most people use Excel, Google Sheets, or a mortgage calculator because the exponent calculation is tedious and error-prone by hand. In Excel, the function is =PMT(rate, nper, pv). For the example above, you would type =PMT(0.00542, 360, -250000). The negative sign on the principal tells Excel you are borrowing money, not depositing it.
Google Sheets uses the same syntax. Many online calculators let you enter the loan amount, rate, and term, and they return the payment instantly. The advantage of a spreadsheet is that you can change one number — say, the interest rate — and see the payment recalculate immediately. This lets you test scenarios: what if rates drop to 6%? What if you put down more money? What if you choose a 20-year term instead?
If you want to verify a lender's quoted payment, plug your numbers into a spreadsheet and compare. Lenders are required to disclose the rate and term, so you can always check their math.
What Happens When You Change One Variable
The formula shows why small changes in rate or term have outsized effects on payment. If you increase the interest rate from 6.5% to 7% on a $250,000, 30-year loan, your monthly payment rises from roughly $1,623 to $1,663 — a $40 increase, or 2.5%. Over 30 years, that extra $40 per month costs you nearly $14,400 in additional interest.
If instead you shorten the term from 30 years to 20 years at 6.5%, your payment jumps from $1,623 to $1,954 — a $331 increase, or 20%. You pay off the loan faster, so you pay less total interest, but your monthly obligation rises sharply.
If you increase your down payment from $60,000 to $90,000 (lowering P from $240,000 to $210,000), your payment drops proportionally. The formula scales linearly with principal, so a 12.5% reduction in loan amount produces a 12.5% reduction in payment.
Common Mistakes When Using the Formula
The most frequent error is forgetting to convert the annual interest rate to a monthly rate. If you plug 0.065 (6.5%) directly into the formula instead of 0.00542, your payment will be wildly too high. Always divide the annual rate by 12 first.
Another mistake is using the wrong number of payments. A 30-year loan is 360 months, not 30. If you accidentally use n = 30, your calculated payment will be far too high because the formula thinks you are paying off the entire loan in 30 months.
A third error is entering the principal as a positive number when your spreadsheet function expects a negative one. Different calculators have different conventions, so check the documentation or test with a known example first.
Finally, some people forget that the formula gives you principal and interest only. Your actual monthly bill includes property taxes, homeowners insurance, and possibly mortgage insurance (PMI) or HOA fees. The formula does not account for these, so your real payment will be higher than what the formula returns.
Frequently Asked Questions
Do I need to memorize the mortgage payment formula?
No. Lenders are required to disclose your rate and payment before you sign, and you can verify any quoted payment using a spreadsheet or online calculator. Understanding how the formula works helps you see why rates and terms matter, but you do not need to solve it by hand.
Why does my actual monthly payment differ from what the formula gives me?
The formula calculates principal and interest only. Your lender bill usually includes property taxes, homeowners insurance, and possibly PMI or HOA fees, all bundled into one payment. Ask your lender for an itemized breakdown to see what each piece costs.
What if my interest rate adjusts over time?
The formula assumes a fixed rate for the entire loan. If you have an adjustable-rate mortgage (ARM), the rate changes at set intervals, and your payment recalculates each time. You would use the formula separately for each rate period, starting with the new balance at that time.
How much total interest will I pay over 30 years?
Multiply your monthly payment by 360, then subtract the principal. For the $250,000 loan at 6.5%, that is ($1,623 × 360) – $250,000 = $584,280 – $250,000 = $334,280 in total interest. This is why a shorter term saves money — you pay less interest because you are paying off the principal faster.
Can I use this formula for other types of loans?
Yes. The formula works for any amortizing loan — car loans, personal loans, student loans — as long as the interest rate is fixed and the payment is the same every month. For variable-rate loans, you would recalculate when the rate changes.