How we test the calculators
The math is the same in the page, the browser, and the automated tests.
By the Crunch My Mortgage Editorial Team. Last updated October 18, 2026.
One formula, three places
Each calculator is a function in the site’s code. The worked example on the page is computed by that function when the site is built. The form in your browser runs the same function and reprints the result as you type. A test file runs the same function against fixed inputs. If those three ever disagree, the page is wrong.
Nothing you type is sent to Crunch My Mortgage. The calculation stays in the browser. See the privacy policy.
The payment formula
Principal and interest on a fixed-rate loan is the standard level payment. For a loan amount P, a monthly rate r (the annual rate divided by 12), and n monthly payments:
M = P × r(1 + r)n ÷ ((1 + r)n − 1)
If the rate is zero, the payment is P ÷ n. The anchor the tests check first: a $300,000 loan at 6% for 30 years is $1,798.65 a month in principal and interest. That figure is the core of the mortgage payment calculator. A $375,000 home with $75,000 down is that same $300,000 loan, so the page’s worked example has to land on $1,798.65 before tax, insurance, and HOA dues are added.
Rounding
Money is rounded to the cent. Each month, interest is the current balance times the periodic rate, rounded to the cent, and the rest of the payment reduces principal. The last payment is adjusted so the balance ends at zero rather than a stray cent. A half-cent is nudged before rounding so a value such as 1.005 does not fall the wrong way.
Percents you type are annual percentages: 6 means 6%, not 0.06. Terms are converted to whole months. A down payment larger than the price is treated as a cash purchase, and the loan amount is zero.
Cases the tests refuse to skip
- No interest. A zero rate still repays the loan. On the affordability calculator, $2,800 a month for 360 months with no interest, tax, insurance, or PMI supports a $1,008,000 loan. Add the $60,000 down payment used in that test and the price is $1,068,000.
- Extra principal larger than the balance. The extra-payment calculator pays the loan off in a single payment and leaves a zero balance.
- PMI thresholds. On a $400,000 original value, 80% is $320,000 and 78% is $312,000. A loan that starts at or below 80% is reported as having no PMI. Extra principal can move the 80% month earlier. It does not move the 78% automatic date, which follows the original schedule. That split is the Homeowners Protection Act rule described on the PMI removal calculator.
- Points that do not lower the rate. The break-even is reported as never, because there is no monthly saving to divide the cost by.
- A refinance whose payment does not fall. The simple break-even is empty. Rolling closing costs into the new loan raises the new balance by exactly those costs.
- ARM caps. A 5.5% start rate with a 2-point initial cap and an expected rate of 8% adjusts first to 7.5%, not to 8%. The worst case stops at the lifetime ceiling, 10.5% in that test.
- Temporary buydown. A $400,000 loan at 7% with a 2-1 buydown pays $2,147.29 in year one and $2,398.20 in year two, against a note-rate payment of $2,661.21. The subsidy is the sum of those gaps, $9,323.16. A rate that would go negative is held at 0%.
- FHA. The annual premium uses HUD’s steps, including the year-by-year average balance. HUD’s own illustration (a different, older premium rate) is reproduced in the tests: a $106,605 balance at 7.5% produces a year-1 monthly MIP of $43.26 under that illustration’s factors. The live calculator then applies the current table, which the FHA page quotes and dates.
- VA. The funding fee is the loan amount times the rate for that loan type, use, and down-payment band. The fee is not charged on itself when it is financed. Exempt borrowers are charged zero. The rates are the ones on the VA page, checked against VA’s published schedule.
- Cash to close. Seller and lender credits offset costs and are capped at those costs. A credit larger than the costs is not turned into cash back.
What a passing test does not prove
The tests prove that the function does what the page says. They do not prove that a lender will use the same inputs. Tax bills, insurance premiums, mortgage-insurance pricing, escrow cushions, and per-diem interest conventions differ. FHA and VA figures change when the agencies change them; the page date is the date of the last check, not a promise that the figure is still current tomorrow.
The calculators do not decide whether you qualify. Debt-to-income limits in the forms are the numbers you set. They are not a lender’s overlay and they are not an approval.
When the tests change
A change to a formula changes the tests in the same edit, and the worked example on the page is rebuilt from the new function. The editorial policy covers how sources and dates are handled. A wrong result is reported on the contact page and recorded on the corrections page once it is fixed.