Mortgage Payment Formula: How to Calculate Your Monthly Payment
The monthly principal-and-interest payment on a fixed-rate mortgage is M = P × [r(1 + r)^n] / [(1 + r)^n − 1]. Here P is the loan amount, r is the monthly interest rate (the annual rate divided by 12), and n is the number of monthly payments (years × 12). For a $300,000 loan at 7% over 30 years, that works out to $1,995.91 a month. Below you will find each variable explained, the calculation done by hand, an amortization schedule, and the algebra behind the formula.
TL;DR
- The formula is M = P × [r(1 + r)^n] / [(1 + r)^n − 1], with r = annual rate ÷ 12 and n = years × 12.
- A $300,000 loan at 7% for 30 years costs $1,995.91 a month in principal and interest, and about $418,500 in total interest.
- Each month's interest is the previous balance times r. Principal is the payment minus that interest, so early payments are mostly interest.
- Taxes, homeowners insurance and mortgage insurance are not in the formula, but they can be part of what you send your servicer.
- You can check any result with our mortgage payment calculator.
Table of Contents
- The mortgage payment formula
- How to calculate a mortgage payment step by step
- How the amortization schedule works
- Why early payments are mostly interest
- Deriving the formula
- What the formula does not include
- Perspective
- Check your own numbers
- Common mistakes when calculating by hand
- FAQ
- Sources
The mortgage payment formula
The formula comes from the present value of an annuity: a level payment made every month that exactly pays off a loan. OpenStax's finance textbook shows that loan payments use the annuity formula, adjusted for monthly periods by dividing the annual rate by 12 and multiplying the years by 12.
Written out:
M = P × [ r(1 + r)^n ] / [ (1 + r)^n − 1 ]If you prefer a form without the big fraction, it is the same thing as:
M = P × r / [ 1 − (1 + r)^(−n) ]Both give identical results. The second is easier to type into a basic calculator because you only compute the power once.
What each variable means
| Symbol | Meaning | How to get it |
|---|---|---|
| M | Monthly principal-and-interest payment | The answer |
| P | Principal, the amount you borrow | Purchase price minus down payment |
| r | Monthly interest rate | Annual rate as a decimal ÷ 12 (7% = 0.07 ÷ 12 = 0.005833) |
| n | Number of payments | Years × 12 (30 years = 360) |
The most common mistake is leaving the rate as a yearly figure. If you plug in 0.07 instead of 0.005833, the answer is meaningless. The second most common is mixing years and months: r must be monthly whenever n counts months.
How to calculate a mortgage payment step by step
Here is the full process for a $300,000 loan at 7% for 30 years.
- Convert the rate. 7% ÷ 100 = 0.07. Divide by 12: r = 0.0058333.
- Count the payments. 30 × 12 = 360 = n.
- Raise (1 + r) to the power n. (1.0058333)^360 ≈ 8.1165.
- Build the fraction. Top: r × 8.1165 = 0.047346. Bottom: 8.1165 − 1 = 7.1165. The fraction is about 0.0066530.
- Multiply by the principal. 300,000 × 0.006653 ≈ $1,995.91.
Rounding the intermediate figures shifts the answer by a few cents, so keep as many decimals as your calculator allows until the last step. In a spreadsheet, the same result comes from
=-PMT(7%/12, 360, 300000).
A second worked example from a textbook
OpenStax works through a smaller loan: $140,000 financed for 20 years at 3.6% a year. Here r = 0.003 and n = 240, which gives a payment of about $819.16. It is a good test case if you want to check your own arithmetic against a published answer.
Quick reference for common loan sizes
These figures use the same formula, a 30-year term and a 7% fixed rate. They cover principal and interest only.
| Loan amount | Monthly principal and interest |
|---|---|
| $200,000 | $1,330.60 |
| $300,000 | $1,995.91 |
| $400,000 | $2,661.21 |
How the amortization schedule works
An amortization schedule is a table that shows, payment by payment, how much goes to interest, how much goes to principal, and what balance remains. Your payment stays the same on a fixed-rate loan, but the split changes every month.
The rules are simple. Per the eCampusOntario finance text, interest equals the previous balance times the periodic rate, and principal equals the payment minus interest. Those formulas need the prior balance, and they assume payment and compounding frequencies match.
In symbols:
- Interest for the month = previous balance × r
- Principal for the month = M − interest
- New balance = previous balance − principal
Amortization schedule example
For the $300,000, 7%, 30-year loan with a payment of $1,995.91:
| Month | Payment | Interest | Principal | Remaining balance |
|---|---|---|---|---|
| 1 | $1,995.91 | $1,750.00 | $245.91 | $299,754.09 |
| 2 | $1,995.91 | $1,748.57 | $247.34 | $299,506.75 |
| 3 | $1,995.91 | $1,747.12 | $248.79 | $299,257.96 |
OpenStax's textbook schedule for its $140,000 loan shows the same pattern at a smaller scale. Month 1 is $420.00 interest and $399.16 principal, and month 240 is $2.45 interest and $816.71 principal, with a small rounding adjustment in the final line. That is front-loading in action: declining balances shrink the interest charge, so a growing share of the unchanged payment pays down principal.
Total interest over the life of the loan
Multiply the payment by the number of payments, then subtract the principal:
Total interest = (M × n) − P
For our example: ($1,995.91 × 360) − $300,000 = $718,527.60 − $300,000 ≈ $418,528. On a 30-year loan at 7%, you pay more in interest than you borrowed. That is why term and rate matter so much, and why many borrowers look at what extra payments can save.
Why early payments are mostly interest
Interest is charged on what you still owe. At the start you owe everything, so interest is at its peak. In the example above, about 88% of the first payment is interest ($1,750.00 of $1,995.91). Only a small slice reduces the loan.
The balance falls slowly at first, then faster. In the middle of the schedule the split is roughly even, and in the last few years nearly the entire payment is principal. This is what lenders mean when they describe a fixed-rate loan as predictable: the payment never changes, even though its internal makeup does.
Two practical consequences follow:
- Extra principal early saves the most. Every extra dollar paid in the first years removes a balance that would have accrued interest for decades.
- Selling or refinancing in the first years leaves you with little equity from payments alone. Equity early on comes mostly from your down payment and from price changes.
Deriving the formula
If you want to see where the formula comes from (a frequent request from students), the derivation takes five lines.
Let B₀ = P be the starting balance. Each month, interest is added and the payment is subtracted:
B₁ = B₀(1 + r) − M
B₂ = B₁(1 + r) − M = B₀(1 + r)² − M(1 + r) − M
After n payments:
Bₙ = P(1 + r)^n − M[(1 + r)^(n−1) + … + (1 + r) + 1]
The bracket is a geometric series, which sums to [(1 + r)^n − 1] / r. So:
Bₙ = P(1 + r)^n − M × [(1 + r)^n − 1] / r
A loan is paid off when Bₙ = 0. Set the expression to zero and solve for M:
M = P × r(1 + r)^n / [(1 + r)^n − 1]
That is the formula. It simply says: pick the payment that makes the balance land exactly on zero after n months.
What the formula does not include
The result is principal and interest only. The CFPB notes that the amount you send your mortgage company often includes homeowners' insurance and taxes on top of the loan payment. A fuller picture looks like this:
Total monthly payment = principal + interest + mortgage insurance (if applicable) + property taxes and homeowners insurance (if collected in escrow)To estimate the full figure, calculate M with the formula, then add one-twelfth of your annual property tax bill and one-twelfth of your annual insurance premium. Ask your lender or servicer for exact amounts, since both vary by property and location.
Adjustable-rate and balloon loans
The formula assumes one fixed rate for the whole term. Other loan types differ, according to the same CFPB page:
- Adjustable-rate mortgages: initial payments are calculated as if the starting rate lasted the full term. When the rate adjusts, the payment is typically recalculated using the new rate and the remaining term. You can apply the same formula again at each reset, using the current balance as P, the new monthly rate as r, and the remaining months as n.
- Balloon loans: these have shorter terms, but payments are often calculated as if the loan lasted 30 years, so a large balance comes due at the end.
Perspective
We built our mortgage tools around one belief: you should be able to see the math, not just receive an answer. The formula looks intimidating, but it only has three inputs, and once you have done one example by hand, every lender quote becomes easier to read.>
That is why our calculators run on the standard annuity math described in finance textbooks, return results instantly, and need no registration. We want you to use the calculator to check your own work, or use the formula to check the calculator. Either way, you end up understanding the number you are about to commit to for 15 or 30 years.>
Our advice: run your loan at two or three rates and two terms before you talk to a lender. Seeing how a quarter-point or a 15-year term changes the payment and the total interest is the most useful hour of mortgage prep you can spend.>
Nkosi
Check your own numbers
Doing the math once by hand is the best way to learn it. After that, use a tool. Our mortgage payment calculator returns the monthly principal and interest from the loan amount, rate and term, with no sign-up. If you are looking at a car loan, personal loan or any other fixed-payment debt, the loan payment calculator uses the same formula, and our guide to the loan payment formula covers the general case. More tools are on our finance calculators page.
Common mistakes when calculating by hand
- Using the annual rate. Always divide by 12 first.
- Rounding r too early. Rounding 0.0058333 to 0.0058 changes a 30-year payment by several dollars. Keep at least six or seven decimals.
- Forgetting to count months. A 15-year loan is n = 180, not 15.
- Comparing quotes without the same inputs. Two lenders can show different payments simply because one includes taxes and insurance and the other does not.
- Ignoring the first-payment timing. The formula assumes payments are made at the end of each month, which matches standard mortgage practice.
FAQ
How do I calculate a monthly mortgage payment?
Convert your annual rate to a monthly rate (divide by 12), multiply your years by 12 to get the number of payments, then apply M = P × [r(1 + r)^n] / [(1 + r)^n − 1]. For $300,000 at 7% over 30 years, the result is $1,995.91. Add taxes and insurance separately if they are part of your payment.
How much is a $400,000 mortgage at 7%?
Over 30 years, the principal-and-interest payment is about $2,661.21 a month. Your actual bill will be higher if your servicer also collects property taxes, homeowners insurance or mortgage insurance in escrow.
What is the monthly payment on a $300,000 mortgage at 7% for 30 years?
It is $1,995.91 for principal and interest. In the first month, $1,750.00 of that is interest and $245.91 reduces the balance.
What is an amortization schedule?
It is a table listing every payment on a loan, split into interest and principal, with the remaining balance after each one. Interest is the prior balance times the monthly rate, and principal is the payment minus interest. You can build one in a spreadsheet in a few minutes by following those two rules down the rows.
Why does my payment not match an online estimate?
The usual cause is what is included. The formula gives principal and interest only, while many estimates and servicer statements add taxes, insurance and mortgage insurance. Differences in rounding, the exact rate or the term can also move the figure by a few dollars.
Sources
- On a mortgage, what's the difference between my principal and interest payment and my total monthly payment? (CFPB)
- How do mortgage lenders calculate monthly payments? (CFPB)
- 8.3 Loan Amortization, Principles of Finance 2e (OpenStax)
- 3.2 Calculating the Principal and Interest Components of a Loan Payment (eCampusOntario)