The basic mortgage payment formula
The standard equation for calculating a monthly mortgage payment is:
M = P [ r(1 + r)^n ] / [ (1 + r)^n – 1 ]
In this formula, M is your monthly payment, P is the principal (the amount you borrowed), r is your monthly interest rate (your annual rate divided by 12), and n is the total number of payments you will make over the life of the loan. This equation accounts for the fact that each payment you make reduces what you owe, so the interest portion shrinks and the principal portion grows with each payment.
The formula looks intimidating, but it solves one specific problem: it tells you what monthly payment will pay off your entire loan, with interest, by the end of the term. Without it, you would have to guess or use trial and error.
Key Takeaways
- The mortgage payment formula uses your loan amount, monthly interest rate, and number of payments to calculate what you owe each month.
- Your monthly interest rate is your annual rate divided by 12, and your number of payments is your loan term in years multiplied by 12.
- You can solve the formula by hand with a calculator, but most people use a spreadsheet, online calculator, or their lender's tools instead.
- The formula produces only your principal and interest payment — property taxes, insurance, and HOA fees are separate and added on top.
Breaking down each part of the equation
P (principal) is the amount of money you are borrowing. If you are buying a $300,000 house and putting down $60,000, your principal is $240,000. This number stays the same throughout the calculation.
r (monthly interest rate) is where many people make mistakes. If your annual interest rate is 6.5%, you cannot plug 6.5 into the formula. You must first convert it to a decimal (0.065) and then divide by 12 to get your monthly rate (0.065 ÷ 12 = 0.00542). This monthly rate is what goes into the formula.
n (number of payments) is the total count of monthly payments you will make. A 30-year mortgage means 30 × 12 = 360 payments. A 15-year mortgage means 15 × 12 = 180 payments. This number changes based on your loan term.
The exponent (the small raised number) in the formula is the same n value used twice. The caret symbol (^) means "to the power of," so (1 + r)^n means you multiply (1 + r) by itself n times. This is where a calculator becomes essential — doing this by hand for a 360-payment loan is impractical.
Walking through a real example
Let's say you borrow $250,000 at 6% annual interest for 30 years. Here is how you set up the formula:
P = $250,000 Annual interest rate = 6% = 0.06 r = 0.06 ÷ 12 = 0.005 n = 30 × 12 = 360
Now the formula becomes:
M = 250,000 [ 0.005(1.005)^360 ] / [ (1.005)^360 – 1 ]
To solve this, you first calculate (1.005)^360, which equals approximately 6.023. Then you work through the numerator: 0.005 × 6.023 = 0.03012. Multiply that by 250,000 to get 7,530. The denominator is 6.023 – 1 = 5.023. Finally, divide 7,530 by 5.023 to get approximately $1,499.
Your monthly payment would be about $1,499 for principal and interest. This does not include property taxes, homeowners insurance, or mortgage insurance, which your lender will add on top.
Why you probably should not calculate this by hand
The formula is mathematically sound, but it requires multiple steps and careful use of a scientific calculator. One small error — rounding at the wrong step, forgetting to divide the annual rate by 12, or mistyping an exponent — throws off your final answer.
Spreadsheet programs like Excel or Google Sheets have a built-in function called PMT that does this calculation when ready. You enter your rate, number of periods, and loan amount, and the program returns your payment. Online mortgage calculators work the same way and often show you a payment breakdown by month.
Your lender will also calculate your payment for you as part of the loan estimate they are required to provide. The formula is useful to understand how your payment works, but for actual planning, a calculator or spreadsheet is faster and more reliable.
How changes to each variable affect your payment
Understanding the formula helps you see why certain changes matter more than others. If you increase your principal by $10,000, your payment rises by roughly the same percentage. If you shorten your loan term from 30 years to 15 years, your payment jumps significantly because you are making fewer payments to cover the same debt.
Interest rate changes have a compounding effect because the rate appears twice in the formula (in the exponent and in the multiplication). A 1% increase in your annual rate does not raise your payment by 1% — it raises it by more, because you are paying interest on a larger amount over a longer period. This is why shopping for a lower rate can save you tens of thousands of dollars over the life of a loan.
The formula also shows why paying extra principal early in the loan saves you money. Early payments reduce P for all future calculations, which lowers the total interest you pay. Late in the loan, most of your payment goes to principal anyway, so extra payments have less impact.
Using the formula to compare loan offers
When you receive loan estimates from different lenders, each one shows a different combination of principal, rate, and term. The formula lets you verify that the payment shown is correct, or calculate what your payment would be if you changed one variable.
For example, if one lender offers you $250,000 at 5.8% for 30 years and another offers $250,000 at 6.2% for 30 years, you can use the formula to see the exact payment difference. The lower-rate loan will have a lower payment, but the formula shows you by how much. You can then decide whether the difference is worth paying a higher upfront cost (points or fees) to get the lower rate.
You can also use the formula in reverse: if you know the payment you can afford, you can solve for the principal or rate to see what loan size or term makes sense for your budget.
Frequently Asked Questions
What if I have an adjustable-rate mortgage?
The formula calculates a fixed payment based on a fixed rate. With an adjustable-rate mortgage, your rate changes on a set schedule, so your payment changes too. You would use the formula to calculate your payment for each rate period separately, starting from when the rate adjusts.
Does the formula include property taxes and insurance?
No. The formula calculates only principal and interest. Property taxes, homeowners insurance, and mortgage insurance (if required) are added separately by your lender and shown on your loan estimate as part of your total monthly housing payment.
Can I use this formula for other types of loans?
Yes. The formula works for any loan with a fixed rate and regular monthly payments — car loans, personal loans, and student loans all use the same equation. The variables change, but the structure is identical.
Why does my actual payment differ slightly from what the formula gives me?
Rounding differences are common, especially if you round intermediate steps. Lenders also sometimes adjust the final payment slightly to account for the exact number of days in each month. These differences are usually a few dollars and do not affect your overall understanding of how the payment works.