This page documents the exact formulas, assumptions, and authoritative sources behind every calculator on mortgagelens. All math runs client-side and is covered by an automated test suite — you can verify each result against the formulas below.
Fixed-rate principal and interest use the standard amortization formula:
Monthly P&I = P · r(1 + r)^n / ((1 + r)^n − 1) P = loan amount (price − down payment) r = monthly interest rate (annual rate ÷ 12) n = number of payments (years × 12)
Each month, interest is charged on the outstanding balance and the remainder reduces principal, so early payments are mostly interest. When the rate is 0%, we fall back to P ÷ n.
The total monthly payment adds four components (plus optional HOA):
PITI = Principal & Interest
+ Property Tax (home price × tax rate ÷ 12)
+ Insurance (annual premium ÷ 12)
+ PMI (loan amount × PMI rate ÷ 12, while LTV > 80%)
+ HOA (monthly dues, if any)
PMI (private mortgage insurance) is included only while the loan-to-value (LTV) ratio is above 80%, i.e. when the down payment is under 20%, consistent with conventional-loan practice.
Home affordability uses the debt-to-income (DTI) guideline most lenders apply:
Front-end (housing) ratio ≤ 28% of gross monthly income Back-end (total debt) ratio ≤ 36% of gross monthly income Max housing payment = min(0.28 × income, 0.36 × income − existing debts)
We solve backward from the maximum housing payment — subtracting estimated taxes and insurance — to the largest principal, then add the down payment for a maximum price. Lenders vary and some programs allow higher ratios, so treat this as a starting point.
The refinance calculator compares your current payment with a new loan and finds when the monthly savings recoup the closing costs:
Monthly savings = current payment − new payment Break-even (months) = closing costs ÷ monthly savings
Refinancing generally pays off if you keep the loan longer than the break-even point. We also show lifetime interest so a lower payment on a longer term does not hide a higher total cost.
Rates are treated as fixed for the term; taxes and insurance are entered as steady annual figures; PMI is a flat percentage of the loan balance. Real loans include closing costs, escrow adjustments, rate changes on ARMs, and lender-specific rules that these estimates do not capture. Figures are for education only — not financial advice.
Our formulas and assumptions follow guidance from: