Your monthly mortgage payment is likely the largest recurring expense you will ever have. Yet most homebuyers never see the formula behind the number their lender quotes. Understanding the math gives you the power to compare loan offers, evaluate the true cost of different interest rates, and make informed decisions about down payments and loan terms. Here is how the calculation works, step by step.
Step 1: Gather Your Loan Details
Every mortgage payment calculation starts with three numbers:
- P (Principal) — the amount you borrow. If you buy a $400,000 home with a 20% down payment ($80,000), your principal is $320,000.
- Annual interest rate — the rate your lender charges. A typical rate in 2026 might be 6.5%.
- Loan term — how long you have to repay, usually 15 or 30 years.
These three inputs are all you need for the base principal-and-interest calculation. The total monthly cost will include additional components that we will add in later steps.
Step 2: Convert to Monthly Values
The mortgage formula works in monthly units, so you need to convert your annual figures:
- Monthly interest rate (r) = annual rate / 12. For a 6.5% annual rate: r = 0.065 / 12 = 0.005417.
- Total payments (n) = loan term in years × 12. For a 30-year mortgage: n = 30 × 12 = 360.
Step 3: Apply the Mortgage Payment Formula
The standard fixed-rate mortgage payment is calculated using the annuity formula:
M = P × [r(1 + r)^n] / [(1 + r)^n − 1] Where M = monthly payment, P = loan principal, r = monthly interest rate (annual rate / 12), n = total number of payments (years × 12).
Worked Example
For a $320,000 loan at 6.5% over 30 years:
- r = 0.065 / 12 = 0.005417
- n = 30 × 12 = 360
- (1 + r)^n = (1.005417)^360 = 6.9916
- Numerator: 320,000 × 0.005417 × 6.9916 = $12,120.37
- Denominator: 6.9916 − 1 = 5.9916
- M = $12,120.37 / 5.9916 = $2,023 per month (principal and interest only)
This $2,023 covers only principal repayment and interest charges. Your actual monthly housing cost will be higher once you add the components in the next steps.
Step 4: Add Property Tax and Insurance (PITI)
Lenders and real estate professionals use the acronym PITI to describe the full monthly housing cost: Principal, Interest, Taxes, and Insurance. Your escrow payment bundles these together:
| Component | Annual Cost (Example) | Monthly Addition |
|---|---|---|
| Principal & Interest | — | $2,023 |
| Property Tax (1.1%) | $4,400 | $367 |
| Homeowner's Insurance | $1,800 | $150 |
| Total PITI | — | $2,540 |
Property tax rates vary significantly by location, ranging from under 0.3% in Hawaii to over 2% in New Jersey and Illinois. Always use your specific county's rate when estimating costs.
Step 5: Check for PMI
If your down payment is less than 20% of the purchase price, lenders require Private Mortgage Insurance (PMI) to protect themselves against default. PMI typically costs between 0.5% and 1% of the original loan amount per year.
Monthly PMI = (Loan Amount × PMI Rate) / 12 For a $360,000 loan with 10% down and a 0.75% PMI rate: ($360,000 × 0.0075) / 12 = $225/month. PMI drops off automatically once you reach 22% equity, or you can request removal at 20%.
PMI adds a meaningful cost in the early years. On a $360,000 loan, $225 per month adds up to $2,700 annually. This is one reason financial advisors often recommend saving for a 20% down payment when possible. Use the Down Payment Calculator to explore trade-offs between down payment size, PMI costs, and cash reserves.
Run your own mortgage numbers with our full-featured tool
Try the Mortgage Calculator →How Interest Rate Changes Affect Your Payment
Small changes in the interest rate have an outsized impact on total cost over the life of the loan. On a $320,000, 30-year mortgage:
| Rate | Monthly P&I | Total Interest Paid |
|---|---|---|
| 5.5% | $1,817 | $334,079 |
| 6.0% | $1,919 | $370,695 |
| 6.5% | $2,023 | $408,168 |
| 7.0% | $2,129 | $446,467 |
The difference between 5.5% and 7.0% is just $312 per month, but over 30 years it amounts to over $112,000 in additional interest. This is why rate shopping across multiple lenders — even for a quarter-point reduction — can yield substantial lifetime savings. See the full payment breakdown with the Amortization Schedule Calculator.
Key Takeaways
- The core formula M = P[r(1+r)^n]/[(1+r)^n-1] gives you the principal and interest portion of your payment.
- PITI is the real cost. Add property tax, homeowner's insurance, and PMI (if applicable) to get your true monthly obligation.
- Rate sensitivity matters. Even a 0.5% rate difference compounds into tens of thousands of dollars over the loan's life.
- 20% down eliminates PMI, saving hundreds per month in the early years of the loan.
- Shorter terms save money. A 15-year mortgage has higher monthly payments but dramatically reduces total interest paid.