The basic mortgage payment formula
A mortgage payment has a formula, and you can work it out yourself with a calculator. The formula is:
M = P [ r(1 + r)^n ] / [ (1 + r)^n – 1 ]
In this formula, M is your monthly payment, P is the loan amount (called the principal), r is your monthly interest rate, and n is the total number of payments you will make. The ^ symbol means "to the power of" — so (1 + r)^n means you multiply (1 + r) by itself n times.
This formula works for any fixed-rate loan where the payment stays the same every month. It accounts for the fact that early payments go mostly toward interest, while later payments go mostly toward principal. The formula balances those two things so you pay the same amount each month.
Key Takeaways
- The mortgage payment formula uses your loan amount, monthly interest rate, and number of payments to calculate one fixed monthly payment.
- You must convert your annual interest rate to a monthly rate by dividing by 12, and convert years to months by multiplying by 12.
- A spreadsheet or online calculator will do the math faster and with fewer errors than working through the formula by hand.
- The formula only works for fixed-rate mortgages where your payment stays the same; adjustable-rate mortgages change over time and need different math.
- Knowing how the formula works helps you understand why a higher interest rate or longer loan term changes your payment so much.
Converting your numbers to the right format
Before you use the formula, you need to convert your numbers into the format it expects. Most people have an annual interest rate, not a monthly one, and a loan term in years, not months.
To get your monthly interest rate, take your annual rate and divide by 12. If your rate is 6.5% per year, your monthly rate is 6.5 ÷ 12 = 0.542% per month. But the formula needs this as a decimal, not a percentage. So 0.542% becomes 0.00542 (divide the percentage by 100).
To get your number of payments, multiply your loan term in years by 12. A 30-year mortgage has 30 × 12 = 360 payments. A 15-year mortgage has 15 × 12 = 180 payments.
Once you have these three numbers in the right format, you can plug them into the formula.
Working through a real example
Let's say you have a $300,000 loan at 6.5% annual interest over 30 years. Here is how you would work through the formula step by step.
First, convert your numbers. Your monthly interest rate is 6.5 ÷ 12 ÷ 100 = 0.005417 (rounded). Your number of payments is 30 × 12 = 360.
Now plug into the formula: M = 300,000 [ 0.005417(1 + 0.005417)^360 ] / [ (1 + 0.005417)^360 – 1 ]
Work from the inside out. First, calculate (1 + 0.005417) = 1.005417. Then raise it to the 360th power: 1.005417^360 = 6.898. Multiply that by your monthly rate: 0.005417 × 6.898 = 0.03735. Subtract 1 from 6.898: 6.898 – 1 = 5.898. Divide: 0.03735 ÷ 5.898 = 0.006333. Finally, multiply by your principal: 300,000 × 0.006333 = $1,900.
Your monthly payment would be about $1,900 (not counting property taxes, insurance, or other costs that often get added to your actual bill).
Why use a spreadsheet or calculator instead
The formula is mathematically sound, but doing it by hand is slow and straightforward to mess up. One small rounding error early on can throw off your final answer by tens of dollars.
A spreadsheet like Excel or Google Sheets has a built-in function called PMT that does this math for you. You type =PMT(0.005417, 360, -300000) and it gives you the answer when ready. The negative sign on the loan amount is just how the function works — it tells the spreadsheet you are borrowing money, not lending it.
Online mortgage calculators do the same thing behind the scenes. You enter your loan amount, rate, and term, and the calculator runs the formula and shows you the result. These tools are useful for comparing different loan terms or rates without doing the math yourself.
What the formula does not include
The basic mortgage payment formula calculates only the principal and interest portion of your payment. It does not include property taxes, homeowners insurance, or mortgage insurance (PMI), which are often rolled into your actual monthly bill.
The formula also assumes your interest rate never changes. It works perfectly for fixed-rate mortgages, where your rate is locked in for the entire loan. If you have an adjustable-rate mortgage (ARM), your rate changes at set times, so your payment changes too. The formula would need to be recalculated each time your rate adjusts.
Similarly, the formula assumes you make one payment per month. Some mortgages allow bi-weekly payments or other schedules, which would change how the math works.
How small changes in rate or term affect your payment
One reason to understand the formula is to see how sensitive your payment is to changes in interest rate or loan term. A difference of 0.5% in your interest rate does not sound like much, but it changes your payment significantly.
Using the same $300,000 loan over 30 years, a rate of 6.0% instead of 6.5% gives you a payment of about $1,799 instead of $1,900 — a savings of $101 per month, or $36,360 over the life of the loan. Raising the rate to 7.0% raises your payment to about $1,996 — an extra $96 per month.
Stretching the loan from 30 years to 40 years lowers your monthly payment but increases the total interest you pay over the life of the loan. The formula shows you the trade-off: lower monthly payment now, but more money out of your pocket in the long run.
Frequently Asked Questions
Can I use this formula for a loan that is not a mortgage?
Yes. The formula works for any fixed-rate loan where you make equal monthly payments — car loans, personal loans, student loans. The only difference is the numbers you plug in. As long as your interest rate does not change and your payment stays the same, the formula applies.
Why does the formula have that complicated exponent part?
The exponent part accounts for the fact that you are making many payments over many years. It calculates how much interest you will pay in total, then spreads that interest across all your payments so each one is the same size. Without that part, the math would not balance.
What if I want to pay off my mortgage early?
The formula tells you what your regular monthly payment is. If you pay extra each month, you will pay off the loan faster and pay less interest overall. The formula itself does not change — it just tells you what you owe if you stick to the regular schedule.
Does this formula work if I have a balloon payment at the end?
No. A balloon mortgage has a large lump sum due at the end, which changes the math. You would need a different formula or a calculator designed for balloon loans. Talk to your lender about how they calculate payments on a balloon mortgage.
What if my interest rate is variable or adjusts over time?
This formula only works when your rate stays the same for the entire loan. If your rate changes, you would need to recalculate the formula each time it changes, using the new rate and the remaining balance and remaining payments. Most lenders do this automatically and send you a new payment amount when your rate adjusts.