Methodology
Nothing here is proprietary. This page lists every formula the calculator uses and every assumption it makes, so you can reproduce the results in a spreadsheet and see exactly where they come from. If you find an error, please tell us.
1. The monthly payment
Standard fully-amortizing fixed-rate loan (the U.S. conventional structure):
payment = P × r / (1 − (1 + r)−n)
- P = original loan amount
- r = annual interest rate ÷ 12 (a monthly rate; we do not compound daily)
- n = total number of monthly payments (years × 12)
Worked example, which you can check by hand: $300,000 at 6.00% for 30 years gives r = 0.005 and n = 360, so the payment is $1,798.65. In month one the interest is 300,000 × 0.005 = $1,500.00, the principal is $298.65, and the balance becomes $299,701.35. Over the full term the interest totals 1,798.65 × 360 − 300,000 = $347,514.57. The calculator reproduces these three figures exactly; you can see them printed in the browser console by adding ?debug=1 to the calculator URL.
2. Today's balance
If you don't type your balance in, we derive it from the closed-form remaining-balance formula after k payments:
balance = P × (1 + r)k − payment × ((1 + r)k − 1) / r
where k is the number of whole months between your first payment date and the current month. This assumes every payment was made on time and in full and that nothing extra has been paid so far. It is an estimate: your servicer's figure is the authoritative one, and if it differs, tick “I already know my current balance” and enter the real number.
The simulation always starts with the next monthly payment, i.e. the first day of next month.
3. Extra payments
Each month the engine does exactly what a U.S. servicer does when the extra money is correctly designated as principal-only:
- interest = current balance × r
- scheduled principal = payment − interest
- extra principal = monthly extra + annual extra (in the month you chose) + the lump sum (in its month)
- new balance = balance − scheduled principal − extra principal
The required monthly payment never changes; the loan simply ends sooner. The final payment is truncated to whatever is left, so the balance lands exactly on zero rather than going negative. If a payment would not cover the interest, the calculator stops and tells you instead of producing a nonsense schedule.
4. Recast
A recast is modeled as: the lump sum is applied to principal in its month, and from the following month the payment is recalculated with the same formula as in ยง1, using
new payment = balance after the lump sum × r / (1 − (1 + r)−m)
where m is the number of payments still left in the original schedule. The rate does not change, the payoff date does not change, and the required payment falls. The lender's fee is not added to the loan; it is subtracted from the interest saved, because you pay it out of pocket.
Assumptions and limits worth knowing: most lenders require a minimum lump sum of $5,000–$10,000, charge $250–$500, require the loan to be current, and do not offer recasting on FHA, VA or USDA loans or on most jumbo and investor products. The recast scenario deliberately models the lump sum only — recurring extra payments belong to the scenario next to it.
5. Pay down the mortgage vs. invest
Both paths are simulated month by month, side by side, with one rule that makes the comparison fair: the cash leaving your pocket is identical every single month. The monthly budget is the required payment plus whatever extra the prepayment path is making. Whatever a path does not send to the lender is invested instead.
- Path A (prepay): extra money goes to principal. When the loan is gone, the entire budget is invested until the comparison date.
- Path B (invest): only the required payment goes to the lender; the extra money is invested from day one.
- The comparison date is the payoff date of your current loan, so both paths end with the house fully paid off and only the liquid balance differs.
- The monthly investment return is the geometric conversion of the annual figure: (1 + annual)1/12 − 1 — a steady rate, not a simulation of real market volatility.
- Tax on the investment is applied once, at the end, to the gain (final value minus everything contributed) at the capital-gains rate you enter. That approximates a buy-and-hold taxable account; a 401(k) or Roth account would behave differently.
- Mortgage interest deduction: only if you tick the itemizing box. When ticked, each month's deductible interest generates a tax saving of interest × your marginal rate, and that saving is invested too — in both paths, which is what stops the deduction from being double-counted. The headline “effective loan cost” is rate × (1 − marginal rate). If you take the standard deduction, as roughly 90% of U.S. households do, the deduction is worth nothing and the full rate is your real cost.
What the model cannot tell you: the mortgage return is guaranteed and the market return is not. A steady 7% a year is an average, not a plan; real sequences include multi-year declines, and the order in which returns arrive matters. It also ignores the $750,000 acquisition-debt cap on deductible interest, state tax differences, the SALT cap, dividend taxes along the way, and the fact that home equity is illiquid.
6. Biweekly payments
Paying half the monthly payment every two weeks produces 26 half-payments a year = 13 monthly payments. The calculator models this as the mathematically equivalent monthly version: one twelfth of the payment added to principal each month. A true 26-period simulation with actual 14-day accrual differs by a few dollars over the life of the loan, and only if your servicer applies each half-payment on the day it arrives — many hold the first half until the second arrives, which produces exactly the result modeled here. The biweekly figures ignore the other extra payments so the effect can be seen on its own.
7. PMI thresholds
Under the Homeowners Protection Act, both thresholds are computed on the original amortization schedule and the original property value — not on your accelerated balance and not on today's market value. So the calculator walks the original schedule and reports the first month in which the scheduled balance reaches 80% of the value you entered (the point at which you may request cancellation in writing) and 78% (automatic termination, which the servicer must perform if you are current). Extra payments genuinely reduce your balance faster, but they do not move the automatic date by themselves; you have to ask, and the lender may require an appraisal and a satisfactory payment history. FHA mortgage insurance follows separate rules, and most FHA loans originated after June 2013 carry it for the life of the loan.
8. What is deliberately excluded
- Property taxes, homeowners insurance, HOA dues and PMI are not part of the payment shown. Every figure on the site is principal and interest only.
- Escrow is ignored entirely; it is a separate account and prepayments do not affect it.
- Adjustable-rate loans, interest-only periods, balloon payments, negative amortization, forbearance and loan modifications are not modeled.
- Prepayment penalties are not modeled. They are rare on post-2014 U.S. residential loans, but check your note.
- Inflation is ignored: all figures are nominal dollars, which favors neither side of the invest-versus-prepay comparison in the same currency.
- Home appreciation is ignored, because it happens identically in every scenario.
- Rounding: interest is calculated on the exact running balance and displayed rounded. Your servicer may round each month to the cent, which can move the last payment by a small amount.
9. Privacy of the calculation
All of the above runs as JavaScript inside your browser. There is no server-side component, no API call, no analytics and no third-party script of any kind. The only place your numbers are written is the query string of your own address bar, so a simulation can be bookmarked or shared by you, deliberately. See the privacy page.
Last updated: