How to Calculate a Mortgage Payment
The exact formula lenders use, worked through with a real example you can follow on any calculator.
The monthly mortgage payment formula is M = P x r / (1 - (1 + r)^-n), where P is the loan amount, r is the monthly rate, and n is the number of payments. A $320,000 loan at 6.5 percent for 30 years: r = 0.005417, n = 360, and the payment comes out to about $2,023 per month.
The formula
Lenders use the standard amortization formula: M = P x r / (1 - (1 + r) raised to the power of -n). M is the monthly payment. P is the loan amount (price minus down payment). r is the monthly interest rate, the annual rate divided by 12. n is the total number of monthly payments, years times 12.
The formula assumes a fixed rate, monthly compounding, and no extra payments or fees rolled in. It produces the exact principal-and-interest payment your lender quotes, to the penny, when you use the same inputs.
Worked example
Loan: $320,000. Rate: 6.5 percent. Term: 30 years. First convert: r = 0.065 / 12 = 0.0054167, and n = 30 x 12 = 360. Compute (1 + r)^-n: (1.0054167)^-360 is about 0.1430. Then 1 - 0.1430 = 0.8570. The numerator is 320,000 x 0.0054167 = 1,733.33. Divide: 1,733.33 / 0.8570 = about $2,022.60, which rounds to $2,023.
Check it by totals: $2,022.60 x 360 = $728,136 in payments. Subtract the $320,000 loan and you get $408,136 in total interest. If your lender's quote differs by more than a dollar or two, one of the inputs differs, usually the rate, the term, or fees rolled into the loan.
The zero-rate edge case
If the interest rate is 0 percent, the formula divides by zero, so use the obvious answer: payment = loan amount / number of payments. A $320,000 interest-free loan over 360 months is $888.89 a month. Some family loans and employer assistance loans work this way.
What the formula leaves out
The formula gives principal and interest only. Your actual check to the servicer usually includes escrow for property taxes and homeowners insurance, plus PMI below 20 percent down and HOA dues where they apply. Ask for the PITI number, not just P and I, when comparing what you will really pay.
It also ignores timing details like the exact closing date's prepaid interest and any points you pay to buy the rate down. Points change the effective rate, so a 6.5 percent quote with two points is not the same deal as 6.5 percent with zero points.
Skip the arithmetic
Skip the hand math: the free mortgage calculator runs the same formula instantly for any price, rate, and term.
Payment math questions
What is the mortgage payment formula?
M = P x r / (1 - (1 + r)^-n), where P is the loan amount, r is the annual rate divided by 12, and n is years times 12. It assumes a fixed rate and equal monthly payments.
How do I convert an annual rate to a monthly rate?
Divide the annual rate by 12. A 6.5 percent annual rate becomes 0.065 / 12 = 0.0054167 per month. Lenders quote the APR but do the amortization math with this monthly figure.
Why does my hand calculation differ from the lender's?
The usual cause is an input mismatch rather than a different formula: the precise rate (6.49 vs 6.5), origination fees rolled into the balance, or prepaid interest for the days between closing and month-end. The pure principal-and-interest payment should match the formula to the penny.