The mortgage calculator formula for a fixed-rate loan is M = P · r(1+r)n / ((1+r)n − 1), where P is the loan principal, r is the monthly interest rate (annual rate ÷ 12), and n is the total number of monthly payments (loan term in years × 12). This is the standard annuity formula used by every U.S. fixed-rate mortgage calculator, and it produces a single fixed monthly principal-and-interest payment that stays the same for the entire life of the loan. The result it returns is your P&I — the portion of each payment that repays the loan itself, before taxes, insurance, or HOA dues. To get a realistic monthly housing cost, lenders add those extras on top of P&I to form PITI, but the underlying amortization math never changes. Understanding each variable, and the edge case at 0% interest, lets you sanity-check any mortgage estimate you see, including the output from the Mortgage Calculator.

The Fixed-Rate Mortgage Formula
The standard formula used by every fixed-rate mortgage calculator is the annuity payment equation:
M = P × r × (1 + r)n / ((1 + r)n − 1)
It looks dense at first, so here is the same formula written in plain English: take the monthly interest rate, raise one plus that rate to the power of the total number of payments, multiply the result by the rate and the principal, and then divide by the same exponent expression minus one. The output is a single dollar amount — the fixed payment owed every month for the life of the loan.
To see the formula in action, take a $200,000 loan at 6% annual interest over 30 years. The inputs become P = 200,000, r = 0.06 ÷ 12 = 0.005, and n = 30 × 12 = 360. The expression (1 + 0.005)360 works out to roughly 6.0226. Substituting those numbers:
M = 200,000 × 0.005 × 6.0226 / (6.0226 − 1) = 6,022.6 / 5.0226 ≈ $1,199.10
Total paid over the full term is $1,199.10 × 360 = $431,676, and total interest is $431,676 − $200,000 = $231,676. Those three figures — monthly payment, total paid, and total interest — are exactly what the Mortgage Calculator shows as its headline output. For a deeper walkthrough of the interest math specifically, see how to calculate mortgage interest step by step.
What Each Variable Means
Every term inside the formula has a specific role, and swapping any one of them changes the payment dramatically. The table below maps each symbol to its real-world input.
| Symbol | Stands for | Where it comes from |
|---|---|---|
| P | Loan principal | Home price minus your down payment |
| r | Monthly interest rate | Annual rate (as a decimal) divided by 12 |
| n | Total number of monthly payments | Loan term in years multiplied by 12 |
| M | Fixed monthly P&I payment | The output of the formula |
Two of the three inputs are usually chosen up front: the home price and the down payment together set the principal, and the loan term is selected from a fixed set of options (most commonly 15 or 30 years, with custom terms allowed by some lenders). The annual interest rate is the only input that depends on market conditions and your credit profile. Because r is divided by 12 inside the formula, a small change in the annual rate has an outsized effect on M — moving from 6% to 7% on the same $200,000, 30-year loan raises the monthly payment from roughly $1,199 to about $1,330.
What Happens at a 0% Interest Rate
The annuity formula assumes the rate is positive, because it divides by ((1 + r)n − 1). At r = 0 that denominator collapses to zero and the equation becomes undefined. To handle a true 0% loan, the formula has to be replaced with the simpler statement M = P ÷ n: the principal is split into equal monthly chunks across the term. For a $240,000 loan at 0% over 30 years, that gives M = 240,000 ÷ 360 = $666.67 every month, with zero interest and zero total interest. The Mortgage Calculator applies this fallback automatically when you enter 0% as the rate, so you can compare a no-interest promo or a family loan against a market-rate mortgage on the same screen.
How to Calculate Your Mortgage Payment
- Enter the home price and your down payment. The calculator subtracts the down payment to get the loan principal that P in the formula refers to.
- Type your annual interest rate as a percentage (for example, 6.5) and pick a loan term — 15 or 30 years are preset, and a custom term can be entered in years.
- Read your monthly payment, total interest, and total paid instantly. The monthly figure is M from the formula; total interest is (M × n) − P; total paid is M × n.
- Expand the amortization schedule to see how each payment splits between principal and interest, month by month, for the full term.
- Optionally add the property tax rate, annual homeowners insurance premium, and monthly HOA dues to convert the P&I figure into a PITI monthly total — the number lenders actually use to qualify you.
Because the math runs entirely in your browser, none of the numbers entered are uploaded or stored, so it is easy to experiment freely with different prices, rates, and terms without worrying about where the data goes.
P&I vs PITI: What the Formula Does and Doesn't Cover
The annuity formula only produces the principal-and-interest portion of the monthly bill — the amount that repays the loan itself. Real-world housing costs almost always run higher, which is why lenders qualify borrowers on a larger number called PITI. The table below shows which costs go into each.
| Cost component | Included in P&I? | Included in PITI? |
|---|---|---|
| Principal repayment | Yes | Yes |
| Interest | Yes | Yes |
| Property tax | No | Yes |
| Homeowners insurance | No | Yes |
| HOA dues | No | Sometimes (PITI + HOA) |
| PMI, closing costs, points | No | No |
Adding the optional tax, insurance, and HOA fields to the Mortgage Calculator does not change M or the amortization schedule — it only raises the displayed monthly total so you can see what a lender will actually require each month. Property tax is estimated as home value × tax rate ÷ 12, insurance as the annual premium ÷ 12, and HOA is added as-is.
What This Calculator Doesn't Include
The standard amortization formula is a planning tool, not a loan offer. The Mortgage Calculator does not account for private mortgage insurance (PMI), points paid to lower the rate, closing costs, adjustable-rate resets, extra payments, or escrow adjustments. It assumes a fixed rate for the entire term and interest that compounds monthly — the standard conventions for U.S. fixed-rate mortgages. Because of those limits, the figures should be treated as estimates for general planning only, not as a quote or as financial advice. Confirm exact terms with a licensed lender before signing anything.
Where the Standard Formula Comes From
The annuity equation used here has been the backbone of fixed-rate mortgage math for decades and is documented as the standard amortization formula in references such as the amortization calculator article on Wikipedia and the broader mortgage calculator entry on Wikipedia. Every mainstream bank, broker, and online tool applies the same equation to the same four inputs — home price, down payment, interest rate, and term — which is why results agree across calculators to within rounding. Knowing the formula and its limits puts you in a position to read any mortgage estimate with confidence and to spot when an extra fee or assumption is being folded into a quoted payment.
If you're weighing options, ROI Calculator for Beginners: From Formula to Result covers this in detail.