Mortgage payment calculator
A fixed-rate mortgage payment is M = P × r(1 + r)^n ÷ ((1 + r)^n − 1), where P is the loan amount, r is the annual interest rate divided by 12, and n is the number of monthly payments. It covers principal and interest only; add taxes, insurance, and HOA dues for the full payment.
The formula
M = P × r(1 + r)n ÷ ((1 + r)n − 1)
- M
- Monthly principal-and-interest payment
- P
- Loan amount (purchase price minus down payment, or the refinance balance)
- r
- Monthly interest rate: annual rate as a decimal ÷ 12
- n
- Number of monthly payments: years × 12 (360 for a 30-year loan)
How to calculate it step by step
- Convert the annual rate to a decimal and divide by 12 to get r. An annual rate of a% gives r = a ÷ 100 ÷ 12.
- Multiply the term in years by 12 to get n.
- Compute (1 + r)n. This growth factor is the heart of the formula.
- Multiply P × r × (1 + r)n for the numerator, subtract 1 from (1 + r)n for the denominator, and divide.
If the rate is zero the formula divides by zero; the payment is then simply P ÷ n. In a spreadsheet the same result comes from =PMT(rate/12, years*12, -loan).
What is not included
The formula gives principal and interest (P&I) only. Lenders usually quote PITI: principal, interest, property taxes, and homeowners insurance, often collected monthly into an escrow account. Loans with less than 20% down usually add mortgage insurance, and condos and some neighborhoods add HOA dues. Divide annual tax and insurance bills by 12 and add them to M to estimate the full monthly housing cost.
How each input changes the payment
The payment rises in proportion to the loan amount: borrow 10% more and the P&I payment is 10% higher. A longer term lowers the monthly payment but greatly increases total interest, because the balance is paid down more slowly. A higher rate raises both the payment and the share of early payments that goes to interest. Early in a 30-year loan most of each payment is interest; the principal share grows every month.
Total interest over the life of the loan
Total paid equals M × n. Subtract P to get total interest. Comparing that figure across terms (for example 15 versus 30 years) shows the real cost of a lower monthly payment. For the current market average rate to test, see the weekly rates page; to see whether refinancing to a lower rate pays off, use the refinance break-even calculator.
Frequently asked questions
What is the formula for a monthly mortgage payment?
M = P × r(1 + r)^n ÷ ((1 + r)^n − 1), with P the loan amount, r the annual rate divided by 12, and n the number of monthly payments.
Does the payment include taxes and insurance?
No. The formula returns principal and interest only. Add one-twelfth of annual property tax and homeowners insurance, plus any mortgage insurance and HOA dues, for the full payment.
How do I calculate the payment in Excel or Google Sheets?
Use =PMT(annual_rate/12, years*12, -loan_amount). It applies the same amortization formula.
What rate should I enter?
Enter the rate from a lender quote or a rate you want to test. The calculator never assumes a rate. National weekly averages are on the rates page.