STRATEGY PAPER

How DwellQ Works: Engine, Data Sources, and Formulas

Every number has a source. Every formula is verifiable.
Last reviewed August 2026 · DwellQ Research · ~34 min read16 SOURCES

Key Findings

01The engine compares net worth on both paths at every month, not payment versus rent
02Buy net worth = projected value − loan balance − selling costs; rent net worth = portfolio balance
03Break-even is the first month buy net worth catches rent net worth — not payment parity, not closing-cost recovery
04PMI terminates at 78% of the ORIGINAL PURCHASE PRICE, not of projected value; appreciation does not cancel it on that schedule
05Property tax, maintenance and insurance are reassessed annually against projected value; HOA and utilities are charged flat
06Rent steps once a year at lease renewal rather than compounding monthly
07A tax year’s deductions are credited from the FOLLOWING January, so year one shows a $0 monthly tax benefit
08Q+ tax chain: $750,000 interest limit, SALT cap with its 30c phase-down, PMI phase-out, itemised versus standard compared every year
09Verified by 1,505 reference scenarios plus convergence suites — closed form, exact integer-cent oracle, metamorphic and statutory tables — running over a million assertions
10Appreciation, investment return and future rates are your inputs; a correct calculation of a chosen assumption is still a projection

The Question the Engine Answers

DwellQ does not ask whether your mortgage payment beats your rent. It asks a different question, and the difference is the whole product: at the end of the period you tell it, how much are you worth on each path? Two figures are carried side by side for every month of the horizon.

BUY NET WORTH is the projected home value, minus the outstanding loan balance, minus the cost of selling — that is, what would land in your account if you sold on that day. RENT NET WORTH is the balance of an investment portfolio that opens with the cash the buyer had to put on the table, and is then fed or drained every single month by the difference between the two paths’ costs. The rent-path section below sets out exactly how that portfolio is funded and drawn down.

F1Net worth on each path, every month
buy NW = V − B − s × V
rent NW = P
WHERE
  • V = the home’s projected value that month
  • B = the outstanding loan balance that month
  • s = selling costs, as a share of the projected value (a co-op adds its flip tax to s)
  • P = the renter’s portfolio balance that month
WORKED EXAMPLE
Month 84 of the reference run — $500,000 home, 20% down, 6.75% for 30 years, 3% appreciation, 6% selling costs, $2,500 rent growing 3% a year, 7% return
buy NW = $614,937 − $363,150 − $36,896 = $214,891
rent NW = $257,444 — the renter is still ahead at year 7

Both are net worth in the same units at the same instant, which is what makes them comparable. Neither is a running total of money spent. A calculator that compares cumulative outlay is answering a question nobody has: money spent on interest and money spent on rent are both gone, and the only thing that matters is what you own afterwards.

The Monthly Payment, and How It Splits

The scheduled payment is the standard annuity formula.

F2The scheduled monthly payment
M = L · i · (1 + i)ⁿ ÷ ((1 + i)ⁿ − 1)
WHERE
  • M = the scheduled monthly payment
  • L = the loan amount
  • i = the monthly rate — the annual rate ÷ 12, not compounded
  • n = the number of monthly payments — the term in years × 12
WORKED EXAMPLE
A $400,000 loan at 6.75% over 30 years
i = 6.75% ÷ 12 = 0.005625
n = 30 × 12 = 360
M = $2,594.39 a month

At a zero rate the formula degenerates and the engine returns L/n instead. Each month, interest is charged on the balance that stood at the start of that month, and everything left over from the payment retires principal.

F3How each payment splits
interest = B × i
principal = M − interest
WHERE
  • B = the loan balance standing at the START of the month
  • i = the monthly rate, as above
  • M = the scheduled payment
WORKED EXAMPLE
Month one of the same loan
interest = $400,000 × 0.005625 = $2,250.00
principal = $2,594.39 − $2,250.00 = $344.39

Principal is floored at zero, so a payment that fails to cover interest never produces negative amortisation, and it is capped at the remaining balance so the final payment cannot overshoot.

Watch the split move. In month one of that example only $344.39 goes to principal — 86.7% of the payment is rent paid to the bank. By month 60 the split is $2,114.90 interest to $479.49 principal. By month 180, halfway through the term, it is $1,654.43 to $939.96 and the balance is still $293,182 of the original $400,000.

This front-loading is the single most misunderstood fact about a mortgage, and it is why the first years of the comparison run against buying. The term is whatever you set, clamped to 1–50 years and defaulting to 30.

Model this scenario with your numbers
Run a free rent vs buy analysis with your actual numbers.
Try the Calculator →

The Buy Path’s Full Carry, Line by Line

Every month the buy path is charged seven lines.

CHARGED EVERY MONTH
  • the mortgage payment
  • property tax
  • homeowners insurance
  • mortgage insurance, if it applies
  • maintenance
  • HOA dues
  • the buyer’s own utilities

The renter’s utilities are a separate input, charged in full to the rent path — enter each side’s actual bill, not the difference. The sum of those seven, less any tax relief, is the number that is compared against rent.

What escalates, and when

Three of the seven move with the home’s value. The rest are held exactly where you set them.

ESCALATION, LINE BY LINE
  • Property taxyour rate against the purchase price for the first twelve months, then reassessed at the start of every subsequent year against the home’s projected value — so an appreciating home carries a growing tax bill. Enter a known annual tax bill instead of a rate and that figure is used flat, never reassessed
  • Maintenance and homeowners insurancethe same annual cadence: set as a percentage of value, reassessed each January against the projected value, held constant within the year
  • HOA dues, buyer utilities, the renter’s utilitiescharged flat, with no escalation at all

Reassessing property tax against the PROJECTED value is what actually happens to owners, and it is what most calculators freeze. The within-year constancy on maintenance and insurance is deliberate too — an insurance policy is an annual contract, and letting the premium drift monthly was a display artefact, not a real cost.

Nothing else escalates, because escalation there would be an assumption the engine has no basis for and did not ask you to make. If your HOA raises dues 4% a year, that is a number you should raise by hand.

One honest limitation

There is no separate capital-reserve line in the simulation. The roof and the furnace are covered by the maintenance percentage. The itemised roof/HVAC/water-heater reserve you see in the app’s Hidden Costs panel is educational context sitting beside the model, not a second charge inside it.

PMI: The Exact Termination Rule

For a conventional loan, private mortgage insurance is charged whenever the down payment is under 20%. The monthly premium is your PMI rate applied to the ORIGINAL loan amount, divided by twelve, and it does not change as the loan amortises.

F4The monthly PMI premium
premium = L₀ × p ÷ 12
WHERE
  • L₀ = the ORIGINAL loan amount — it never re-bases as the loan amortises
  • p = your annual PMI rate
  • ÷ 12 = the annual rate charged one month at a time; the premium is the same every month it runs
WORKED EXAMPLE
A $500,000 home at 10% down — a $450,000 loan at 6.75%, PMI at 0.55%
premium = $450,000 × 0.0055 ÷ 12 = $206.25

It stops the first month the loan balance falls to 78% or less of the ORIGINAL PURCHASE PRICE.

F5Automatic termination
stop when B ÷ P₀ ≤ 78%
WHERE
  • B = the loan balance that month
  • P₀ = the ORIGINAL purchase price — never the projected current value, which is why appreciation cannot cancel it
  • 78% = automatic termination under the Homeowners Protection Act
WORKED EXAMPLE
The same $450,000 loan
0.78 × $500,000 = $390,000 — the balance to beat
the schedule reaches it in month 112 — nine years and four months
total PMI paid: $23,100

Read that twice, because it is the detail most calculators get wrong: the test is against the price you paid, not against the home’s projected current value. That is the Homeowners Protection Act rule — automatic termination at 78% of original value — and it means appreciation does not cancel your PMI on this schedule. (Requesting cancellation at 80% on a current appraisal is a separate, borrower-initiated process the engine does not model, because it is not automatic and not guaranteed.)

Government programs follow their own rules

FHA, VA and USDA loans do not use the conventional rule at all. Each charges its own fee, on its own base, on its own schedule.

MORTGAGE INSURANCE BY PROGRAM
ProgramUpfrontOngoingWhen it ends
FHAUpfront1.75% of the loan, financed into the noteOngoingannual MIP on the remaining balance: 0.55%/yr above 95% base LTV, else 0.50%, on terms over 15 years; 0.40% above 90% base LTV, else 0.15%, on terms of 15 years or lessWhen it endslife of the loan under 10% down; cancels at 11 years at 10% or more
VAUpfronta funding fee of 2.15% under 5% down, 1.50% at 5–10%, 1.25% at 10% or moreOngoingno monthly insurance at allWhen it endsnot applicable — there is nothing monthly to end
USDAUpfronta 1.00% guarantee feeOngoing0.35%/yr on the remaining balanceWhen it endslife of the loan

Note the contrast with the conventional rule above: FHA’s annual MIP re-bases on the remaining balance as the loan amortises, where conventional PMI is fixed to the original loan amount and never re-bases at all.

Closing Costs In, Selling Costs Out

Closing costs are charged as a percentage of the purchase price on day one, and they are not financed — they are cash out of the buyer’s pocket at the same moment as the down payment. Both together form the upfront number, and that total — less the renter’s own move-in and move-out costs, which the renter really does pay — is what the renter’s portfolio opens with. Selling costs are charged as a percentage of the home’s PROJECTED value at the moment of comparison, not of the price you paid, and they are subtracted from equity in every single month of the chart rather than only at the end.

F6Cash in on day one, fee out on every day after
upfront = D + c × P₀
exit = s × V
WHERE
  • D = the down payment
  • c = buyer closing costs, as a share of the PURCHASE PRICE — charged once, on day one
  • P₀ = the purchase price
  • s = selling costs, as a share of the PROJECTED value — charged in every month of the chart, not only at the end
  • V = the home’s projected value that month
WORKED EXAMPLE
$500,000 at 20% down, 3% closing costs, 6% selling costs
upfront = $100,000 + 3% × $500,000 = $115,000 — the renter’s portfolio opens at $112,000 after the reference run’s $3,000 move-in and move-out costs
exit at year 7 = 6% × $614,937 = $36,896

That is what makes the buy line a net-worth line: it always answers what you would walk away with if you sold today, including the exit fee. On a co-op, a flip tax percentage is added to the selling percentage and treated the same way. The consequence is worth stating plainly: on day one the buyer is behind by roughly the down payment plus closing costs plus the selling cost on the whole house, and appreciation has to climb out of that hole before the buy line even reaches zero relative to the renter.

The Rent Path: A Portfolio, Not a Placeholder

The renter is modelled as somebody who actually invests the difference, because that is the only version of the comparison that is fair. The portfolio opens with the buyer’s entire upfront cash, net of the renter’s own move-in and move-out costs — the figure the previous section works out. It then compounds at your assumed return, converted to a true monthly rate so that twelve months of growth compound to exactly the annual figure you entered rather than to the slightly larger number a naive annual÷12 produces.

F7The renter’s monthly compounding rate
monthly rate = (1 + annual)^(1/12) − 1
WHERE
  • annual = the annual investment return you entered, as a decimal
  • ^(1/12) = the twelfth root — the true monthly equivalent, not the annual rate ÷ 12
  • why = twelve of these compound back to exactly the figure you typed; annual ÷ 12 overshoots it
WORKED EXAMPLE
At the 7% return the reference run uses
(1 + 0.07)^(1/12) − 1 = 0.5654% a month
twelve of those compound to exactly 7.00% — home appreciation uses the same conversion

Every month, the buyer’s net cost (all the carry lines above, less any tax relief) is compared to the renter’s cost (rent plus renters insurance plus the utility premium). If owning costs more, the surplus is deposited into the portfolio. If renting costs more — which happens in later years as rent escalates past a fixed mortgage payment — the shortfall is WITHDRAWN from the portfolio. The renter is not allowed to quietly pocket the difference in one direction and ignore it in the other.

Rent itself steps once a year at lease renewal, not monthly: it holds flat for twelve months and then steps in month 13, month 25, and so on.

F8Rent steps once a year, at renewal
rent = R₀ × (1 + g)^⌊(m − 1) ÷ 12⌋
WHERE
  • R₀ = the rent you entered
  • g = annual rent growth
  • m = the month, counting from 1
  • ⌊ ⌋ = round DOWN — the exponent only advances at a lease renewal, so rent is flat inside each year
WORKED EXAMPLE
$2,500 a month growing 3% a year
months 1–12: $2,500
month 13: $2,500 × 1.03 = $2,575
month 25: $2,575 × 1.03 = $2,652

That is how leases work, and it is materially cheaper over a decade than compounding the same percentage every month. Renters insurance is charged as an annual figure divided by twelve and held flat.

The published portfolio decomposes into exactly three lines — opening capital, cumulative contributions, and cumulative growth — which must sum to the total on every row.

Break-Even: What It Is, and Three Things It Is Not

The break-even month is the first month in which the buy path’s net worth is greater than or equal to the rent path’s net worth. That is the entire definition.

F9The break-even month
break-even = first m with buy NW ≥ rent NW
WHERE
  • m = a month of the horizon, 1 through the last
  • buy NW = value − balance − exit fee, exactly as defined in the first section
  • rent NW = the renter’s portfolio balance that same month
  • first = the FIRST qualifying month, on the full month-by-month series; if no month qualifies the engine returns nothing at all
WORKED EXAMPLE
The reference run — $500,000 home, 20% down, 6.75%, 3% appreciation, $2,500 rent growing 3%, 7% return, 30-year horizon
month 84: buy $214,891 vs rent $257,444 — not yet
first month buy ≥ rent: month 333, which is year 27.8

Three things it is not.

THREE THINGS BREAK-EVEN IS NOT
  • NOT payment paritythe month your mortgage payment drops below the going rent typically arrives years earlier, and means nothing about wealth
  • NOT closing-cost recoveryrecovering closing costs ignores the down payment’s opportunity cost entirely, which in an expensive market is the largest single term in the comparison
  • NOT a promiseboth sides of the crossing depend on an appreciation rate and an investment return that you supplied

If the engine reports no break-even at all, it means the buy line never caught the rent line inside your horizon — that is an answer, not a missing number, and it is a common answer for short holds, high selling costs, or a strong assumed investment return.

How to use the number

The right way to use it is as a sensitivity test: nudge appreciation half a point and see how far the crossing moves. A verdict that flips on half a point was never a verdict.

One display note, because it is a difference readers do spot: the reported break-even month is found on the full month-by-month series, while the on-screen chart plots roughly 120 sampled points, so on a long horizon the drawn crossing can sit a point or two past the month the text names.

The Q+ Tax Chain, Step by Step

Tax modelling is a Q+ feature, and it runs once a year against the twelve months just completed. Step one: accumulate the year’s deductible mortgage interest, property tax, and mortgage insurance. Step two: cap the interest. Only the portion attributable to the first $750,000 of acquisition debt is deductible.

F10Step two — the acquisition-debt interest cap
when B ≤ 750,000: deductible = I
when B > 750,000: deductible = I × 750,000 ÷ B
WHERE
  • I = the year’s accumulated mortgage interest
  • B = the loan balance carried at the END of that year
  • 750,000 = the acquisition-debt limit, IRS Publication 936 — at or under it, the whole year’s interest counts
WORKED EXAMPLE
A year-end balance of $900,000 carrying $60,000 of interest
$60,000 × 750,000 ÷ 900,000 = $50,000
the other $10,000 of interest is not deductible at all

That is an approximation of the statutory limit, applied against the balance carried at the end of the year. Step three: cap SALT. State income tax (estimated as your income times your state rate) plus property tax is capped at the SALT limit for that tax year. Under the 2025 OBBBA rules the engine models a $40,000 base ($20,000 married filing separately), indexed up 1% compounded for each year from 2026 through 2029 — $40,400, $40,804, $41,212, $41,624 — and then a hard sunset back to $10,000 ($5,000 MFS) from 2030 onward. Above $500,000 MAGI ($250,000 MFS) the cap is reduced by 30 cents per dollar of excess, with a floor of $10,000 ($5,000 MFS).

F11Step three — the SALT cap and its phase-down
base = 40,000 × 1.01ᵏ
excess = MAGI − 500,000
cap = max( 10,000 , base − 0.30 × excess )
WHERE
  • k = years from 2025, capped at 2029 — 2026 is 1, 2029 is 4; from 2030 the whole schedule sunsets to a flat $10,000
  • MAGI = modified adjusted gross income
  • excess = the amount by which MAGI clears the $500,000 threshold — zero at or below it, and then the cap is just the base
  • 0.30 = the phase-down — 30 cents of cap lost per dollar of excess
  • MFS = married filing separately halves every figure: $20,000 base, $250,000 threshold, $5,000 floor
WORKED EXAMPLE
Tax year 2027, single filer
base = 40,000 × 1.01² = $40,804
at $600,000 MAGI: $40,804 − 0.30 × $100,000 = $10,804

Step four: phase out the PMI deduction. The deduction is cut 10% for each $1,000 — $500 filing separately — or fraction thereof by which AGI exceeds $100,000 ($50,000 MFS). Because a fraction counts as a whole increment, one dollar over $100,000 costs a full 10%, and the deduction is gone entirely above $109,000 ($54,500 MFS).

F12Step four — the PMI deduction phase-out
steps = ⌈(AGI − 100,000) ÷ 1,000⌉
allowed = PMI × max( 0 , 1 − 0.10 × steps )
WHERE
  • PMI = the year’s accumulated mortgage insurance premiums
  • AGI = adjusted gross income
  • steps = whole $1,000 increments of excess AGI, each one costing 10% of the deduction
  • ⌈ ⌉ = round UP — the statute’s “or fraction thereof”, which is why one dollar over the threshold costs a full 10%
  • MFS = $50,000 threshold and $500 increments filing separately
WORKED EXAMPLE
$2,400 of premiums at $104,500 AGI, single filer
⌈$4,500 ÷ 1,000⌉ = 5 increments → a 50% cut
allowed = $2,400 × 0.50 = $1,200
above $109,000 ($54,500 MFS) the deduction is zero

Step five: compare. The three capped lines are added to an itemised total and compared against your standard deduction; only the EXCESS over the standard deduction is a real benefit, and it is multiplied by your combined federal-plus-state marginal rate. You can override the comparison in either direction if you know you itemise or know you do not.

Simulation year one is treated as the tax year after the current calendar year, and the cap schedule advances one year per simulation year from there.

Why Year One Shows No Tax Saving

This is the rule that surprises people, and it is the one the engine is most stubborn about. A deduction earned in a tax year does not reach your bank account during that year — it reaches it when you file, the following spring. So the engine credits a year’s tax saving evenly across the TWELVE MONTHS AFTER the year that earned it, starting in January of the following year. Year one therefore shows a full attributed deduction and a monthly cash benefit of exactly zero.

The same rule, in dollars

Take a real run: a $575,000 home, 20% down at 6.75%, 1.1% property tax, maintenance at 1.0% and insurance at 0.5% of value, a single filer on $150,000 with a 24% federal and 5% state rate and a $15,750 standard deduction. Year one accrues $30,900 of deductible interest and $6,325 of property tax; property tax plus $7,500 of estimated state income tax gives $13,825 of SALT, comfortably under the SALT cap for that tax year — $40,804 for a run started in 2026, which rises one step per calendar year on the schedule above, so all of it counts.

F13Step five — what the year is worth
benefit = max( 0 , itemised − standard )
saving = benefit × (federal + state)
WHERE
  • itemised = capped interest + capped SALT + allowed PMI — the three lines from the four steps above
  • standard = your standard deduction; only the EXCESS over it is a real benefit
  • benefit = that excess, floored at zero — an itemised total under the standard deduction is worth nothing extra
  • federal + state = your combined marginal rate
WORKED EXAMPLE
Year one of the run above
itemised total: $44,725
$44,725 − $15,750 = $28,975 of incremental benefit
$28,975 × 29% = $8,403 of tax saved

The timing rule then decides when any of that reaches the buyer, and the answer for year one is never.

F14…and the month it actually arrives
monthly credit = the year’s saving ÷ 12
first credit = month 13
WHERE
  • ÷ 12 = spread evenly across the twelve months AFTER the year that earned it — that is, from the following January
  • month 13 = the first month any credit appears; year one applies none, because no year has completed
WORKED EXAMPLE
The same run
year one: $4,229 gross and $4,229 net — no relief at all
$8,403 ÷ 12 = $700 a month, first credited in month 13
year two: $4,267 gross and $3,567 net

Any surface anywhere in the product that shows a per-month or per-year cash figure has to use the APPLIED number, not the attributed one, or it promises a discount your own bank statement never gives you. A dedicated gate exists solely to enforce that across every screen and the PDF report.

Adjustable-Rate Mortgages

An ARM holds its initial rate for the fixed period you set, then resets. The first reset falls in the month immediately after the fixed period ends, and subsequent resets follow at your reset frequency. At each reset the engine takes your target rate — either a single expected rate or a dated path you supply — and clamps it three times, in order.

F15The three clamps at every reset
1 rate = clamp( target, prev − p, prev + p )
2 rate = min( rate, initial + L )
3 rate = max( 0, rate )
WHERE
  • 1 = the PERIODIC cap — the move allowed at this one reset
  • 2 = the LIFETIME cap — the ceiling for the whole loan
  • 3 = the floor — a rate can never go below zero
  • target = your expected rate, or whatever your dated path names for that month
  • prev = the rate set at the last reset
  • p = the periodic cap, in points — symmetric, so it limits falls as well as rises
  • initial = the ARM’s starting rate
  • L = the lifetime cap — a CEILING only; there is deliberately no matching floor
WORKED EXAMPLE
5.00% initial · 5-year fixed period · annual resets · 2-point periodic cap · 5-point lifetime cap · 9.00% expected rate · $400,000 loan
months 1–60: 5.00% → a $2,147 payment, against $2,594 for the equivalent fixed-rate loan
7.00% at month 61 — the periodic cap binds; it cannot jump straight to 9%
9.00% at month 73, and it holds there: the 10.00% lifetime ceiling is never reached
worst case, had it ridden that ceiling: $3,338

The PERIODIC CAP limits the move to at most that many points away from the previous reset rate, symmetrically in both directions. The LIFETIME CAP then limits the result to the initial rate plus the lifetime cap; there is deliberately no lifetime floor, because ARM contracts cap increases, not decreases. Finally the rate is floored at zero.

When the rate changes, the payment is recomputed on the remaining balance over the REMAINING original term, so the loan still retires on its original maturity date — the standard US convention. Loan programs are modelled on standard loans only; selecting an ARM deterministically falls back to a conventional loan rather than carrying half-applied program mortgage insurance through rate resets.

Refinancing

A refinance replaces the note in a single month. Closing costs are charged as a percentage of the balance standing at that moment and paid in cash, not rolled in. Any cash-out is ADDED to the new balance and simultaneously credited to the buyer as money received — without that credit the loan would grow while the cash vanished from the analysis, which would punish the buyer for the full amount.

Discount points cost your point percentage of the new balance each and buy down the rate by your reduction per point, floored at zero. The new loan then amortises over a fresh full term.

Break-even on a refinance is a separate and much simpler number than the rent-vs-buy break-even, and it is null when the payment does not fall.

F16Points, and when the refinance pays for itself
effective rate = quoted − points × reduction
break-even = ⌈ total cost ÷ monthly saving ⌉
WHERE
  • quoted = the rate you are quoted BEFORE any points are bought — the starting point of the buy-down
  • points = how many discount points you buy
  • reduction = the rate cut each point buys, in points. The bought-down rate is floored at zero — the engine computes max(0, quoted − points × reduction), so points can never drive the rate negative
  • closing costs = your percentage of the balance standing at the refinance month, paid in cash
  • points cost = points × your cost per point × the new balance
  • total cost = closing costs + points cost — every dollar the refinance takes out of pocket
  • monthly saving = the payment before, less the payment after — null, not zero, when the payment does not fall
  • ⌈ ⌉ = rounded up to whole months; a part-month of saving does not pay a bill. When the total cost is exactly zero there is nothing to pay back, so the engine reports a break-even of 0 months immediately rather than dividing
WORKED EXAMPLE
The $400,000 loan refinanced in month 60, 6.75% → 5.50%, new 30-year term, 1.5% closing costs on a balance of about $376,000
costs $5,640 · payment $2,594 → $2,135 · saving $460
break-even = ⌈$5,640 ÷ $460⌉ = 13 months
buy two points: 5.50% − 2 × 0.25% = 5.00%, points cost $7,520 on top, payment $2,018, saving $576
break-even stretches to 23 months — that is the trade the points question actually is

If the loan has already amortised away before the refinance month, the engine marks the whole refinance inert and reports zeroes rather than inventing a saving.

Paying the Loan Off Early

The early-payoff panel answers three questions in closed form, and every one of them is checked against a brute-force amortisation schedule before it ships.

THREE QUESTIONS, THREE METHODS
  • Extra every montha closed form for the shortened term
  • Target yearthe extra required is simply the payment that amortises the same balance over the shorter term, minus the scheduled payment; the interest saved is base payment × original term minus accelerated payment × target term
  • Lump suma month loop rather than a formula, because the exact month count and exact final partial payment matter more than elegance at that boundary

The closed form for extra principal every month carries the fractional final month through rather than rounding it up to a whole payment.

F17Extra principal every month, in closed form
n = −ln( 1 − L · i ÷ (M + extra) ) ÷ ln(1 + i)
WHERE
  • n = months until the loan is gone — fraction and all, so the final part-month is carried, not rounded up
  • L = the balance being paid down
  • i = the monthly rate
  • M = the scheduled payment
  • extra = the additional principal you add every month
WORKED EXAMPLE
$400,000 at 6.75% over 30 years — scheduled payment $2,594.39 — plus $300 a month
n = −ln( 1 − $400,000 × 0.005625 ÷ $2,894.39 ) ÷ ln(1.005625) = 267.8 months
22.3 years instead of 30, and $158,828 of interest saved

Wanting that same $400,000 loan gone in 20 years instead of 30 costs an extra $447.06 a month and saves $204,032.

Prepay, or invest the same dollars

The panel also runs the honest comparison: the same dollars invested instead. Both strategies spend exactly the same amount every month for the full original term — prepaying retires the loan early and then invests the entire freed payment; investing pays the loan on schedule and invests the extra from month one. So the two side funds are compared at the same date, on the same outflow, with the same house owned outright.

At a 7% return against a 6.75% loan, investing ends $13,952 ahead on that example. Set the return equal to the mortgage rate and the advantage is exactly zero, to the dollar — the algebraic tie the audit pins. That exactness rests on one convention worth stating: the prepay-versus-invest comparison compounds the return at one twelfth of the annual figure, not at the geometric monthly rate the renter’s portfolio uses.

The panel shows both and names the difference in kind: the return from prepaying is contractual, the return from investing is assumed.

When the module declines to answer

This module assumes the rate never changes, so it is offered only for fixed-rate scenarios with no refinance rather than showing an approximately-wrong number.

Capital Gains at the Exit

Turned on, exit tax is applied to both sides, and the asymmetry between them is one of the real advantages of owning. The buyer’s adjusted basis is the purchase price plus buyer closing costs. The gain is the projected sale value less that basis less selling costs; the Section 121 exclusion you select ($250,000 single, $500,000 married) is then subtracted, and only what remains is taxed.

The renter gets no exclusion of any kind: the portfolio’s cost basis is opening capital plus cumulative contributions, and every dollar of growth above it is taxable. The rate applied to both is your federal long-term capital gains rate plus your state rate.

F18Two sides, one rate, one exclusion
buyer gain = V − (P₀ + c) − s × V
taxable = max( 0, gain − exclusion )
renter taxable = max( 0, P − basis )
WHERE
  • P₀ + c = the buyer’s adjusted basis: purchase price plus buyer closing costs (IRS Publication 523)
  • V = the projected sale value; s × V is the selling cost at that exit
  • P = the renter’s ending portfolio balance
  • basis = the renter’s cost basis: opening capital plus every contribution since
  • exclusion = Section 121 — $250,000 single, $500,000 married. The renter has none
  • rate = your federal long-term capital gains rate plus your state rate, applied to both sides
WORKED EXAMPLE
Year 10 of the reference run, 15% federal plus 5% state = 20%, $250,000 exclusion
buyer: basis $515,000 · gain $116,641 · after the exclusion, $0 taxable → $0 of tax
renter: basis $132,299 · gain $123,873 · no exclusion → $24,775 of tax

Both ending net worth figures are reported AFTER these taxes when the feature is on.

It is worth noticing which way this cuts: the renter’s tax bill is often the larger one, because the portfolio’s entire gain is exposed while the homeowner shelters the first quarter- or half-million.

Affordability: Front-End and Back-End DTI

If you give the engine a gross income it computes two ratios from year one, both on an annual basis. FRONT-END DTI is housing only: principal, interest, property tax, homeowners insurance, HOA and mortgage insurance, divided by gross income. BACK-END DTI adds your other monthly debt payments times twelve to the numerator.

F19The two ratios a lender runs
housing = P + I + tax + insurance + HOA + MI
excluded = maintenance, utilities
front-end = housing ÷ income
back-end = (housing + debts × 12) ÷ income
WHERE
  • housing = the six lines a lender counts, as year-one ANNUAL totals
  • P + I = principal and interest — the mortgage payment itself
  • MI = mortgage insurance, where the loan carries any
  • debts = your other MONTHLY debt payments, hence the × 12
  • income = gross income; for Q+ members, the MAGI field in Section 05
  • excluded = maintenance and utilities, from BOTH ratios — lenders do not count them
WORKED EXAMPLE
$575,000 home, 20% down at 6.75%, 1.1% property tax and 0.5% insurance, $150,000 income, $500 a month of other debt
front-end = $45,002 ÷ $150,000 = 30.0%
back-end = ($45,002 + $6,000) ÷ $150,000 = 34.0%

Note what is deliberately excluded from both: maintenance and utilities. Lenders do not count them, so neither does the ratio that is meant to predict what a lender will say. The thresholds shown against those ratios are the conventional ones — front-end under 28%, back-end under 36%, with FHA sometimes allowing up to 43% — and the app colours the back-end figure amber above 36% and red above 43%.

What your budget actually feels

Alongside them the engine reports housing cost as a percentage of income on each path, which uses the FULL carry including maintenance and utilities. For Q+ members the denominator is the MAGI field in Section 05, which mirrors your Section 01 gross income by default and follows it thereafter unless you customise it.

That housing-cost figure is shown on a cash basis: the headline percentage and the healthy/caution/high band it colours are year one’s full carry divided by income with no tax relief netted out, because none of year one’s deductions reaches year one’s payments. Underneath it, when your tax inputs produce one, sits the deduction year one does earn and the same ratio after it — labelled as what it is, money that reaches you when you file, or across the year itself if you adjust your withholding. The band never moves on that second number.

Approved, versus able to afford it

Getting approved and being able to afford it are different questions, and the two sets of numbers exist so you can see both. None of these ratios feed the rent-vs-buy comparison itself; they are a separate check.

Where the Live Data Comes From

Three datasets feed the engine’s live numbers, each with a named source and a stated refresh cadence.

THE THREE LIVE DATASETS
  • Mortgage ratesthe Freddie Mac Primary Mortgage Market Survey, fetched from the FRED series MORTGAGE30US and cached for 24 hours; the previous weekly print is carried along for week-over-week display
  • Home price appreciationthe FHFA House Price Index (Purchase-Only), pre-computed into a static per-state dataset — a one-year and a twenty-year annualised figure per state — refreshed quarterly by a script rather than downloaded at runtime
  • Property taxthe US Census Bureau’s American Community Survey 5-Year Estimates, tables B25103 and B25077, queried per ZIP code tabulation area and cached for seven days; the effective rate is the median tax divided by the median value

Tax rules are not a feed at all. They come from IRS publications and the statute itself: Publication 936 for mortgage interest, Publication 523 for the home sale exclusion, Publication 501 for the standard deduction, 26 U.S.C. 163(h)(3)(E) for PMI deductibility, and the 2025 OBBBA text for the SALT cap.

What happens when a feed fails

Now the part most sites leave out. When a feed is unreachable, the engine does not pretend.

The rate fetcher returns a hardcoded 6.75% fallback and logs the reason on every one of its three failure paths, and the object it returns is tagged with its source so the health endpoint can report that the site is serving a fallback rather than a live number. The property tax lookup returns nulls on failure so the interface falls back to asking you, rather than quietly inventing a rate. An unknown state in the appreciation dataset returns a 3.5% national average explicitly labelled as a fallback.

Every source is listed on the data and methods page, with its refresh cadence and a dated changelog of every change to our data and methods.

The Education Tools Share One Assumption Set

The free education tools — affordability, savings, timeline, true cost, buy-vs-wait — are separate from the rent-vs-buy engine and read their national defaults from one shared module, because four tools each carrying their own copy of the same averages had already drifted apart.

THE SHARED CONSTANTS
  • Homeowners insurance0.35% of value per year
  • Maintenance1.0% of value per year
  • Buyer closing costs3% of price
  • Down payment10%, as the quoted program default

The emergency buffer that sits on top of cash-to-close is three months of a representative 0.8%-of-price monthly carry — 2.4% of price — floored at $8,000 and capped at $20,000, rather than the flat $12,000 that used to be the same figure for a $250,000 condo and a $900,000 house.

Two honest exceptions

The buy-vs-wait tool carries its own blended 1.9% ownership cost (1.1% tax + 0.3% insurance + 0.5% maintenance), which is charged identically to both of its futures and therefore cancels out of its verdict; the page says so.

And the rent-vs-buy calculator does not read this module at all — it takes every one of those figures from you, starting from its own defaults of 0.30% insurance, 0.50% maintenance, 1.1% property tax, 0.55% PMI, 3% closing and 6% selling costs. If you want the education tools’ assumptions in the main engine, type them in; the engine will not overrule you.

How the Arithmetic Is Verified

Everything above is a claim about code, so the code is checked by code that does not share its reasoning. There are two layers.

The first is a reference audit that drives the engine across 1,505 scenarios — a structured grid, a seeded random sweep, and deliberately hostile boundaries — recomputing every invariant independently from the inputs.

Why one reference implementation is not enough

A reference implementation still shares a shape with the thing it checks: both walk month by month, and a misunderstanding held by the author passes on both sides. So a family of convergence suites attacks from angles a loop cannot collude with.

SIX ANGLES A LOOP CANNOT COLLUDE WITH
  • Closed-form algebrathe balance after k payments must satisfy an identity that contains no iteration anywhere, checked at every k
  • An exact oraclethe same schedule recomputed in integer cents with BigInt, so there is no floating point at all, bounding the engine’s float error instead of assuming it is small
  • Metamorphic lawsdouble every dollar input and every dollar output must double; a higher rate can never produce less interest; a longer hold can never retire less principal; a zero-rate loan must accrue exactly zero interest
  • Geometric identitiestotal rent must equal 12·R·((1+g)^N − 1)/g in closed form, which is a direct test of the annual-step rule
  • Dollar conservationevery dollar spent must appear in exactly one bucket, and the published totals must equal the sum of their published parts
  • Statutory tablesthe SALT cap and the PMI phase-out are checked against hand-transcribed tables of the rule itself, boundary by boundary, including the dollar on either side of every threshold

The first of those is the one worth seeing written down, because it is the one with no iteration in it anywhere.

F20The closed-form balance, checked at every k
B = L(1 + i)ᵏ − M((1 + i)ᵏ − 1) ÷ i
WHERE
  • B = the balance after exactly k payments
  • k = ANY month of the schedule, not just the last one
  • L = the original loan
  • M = the scheduled payment
  • i = the monthly rate — and no loop appears anywhere in this expression
WORKED EXAMPLE
$400,000 at 6.75%, $2,594.39 a month, at k = 180
$400,000 × 1.005625¹⁸⁰ − $2,594.39 × (1.005625¹⁸⁰ − 1) ÷ 0.005625 = $293,182
which is exactly the balance the month-by-month engine reports in month 180
What has to pass before anything ships

Together these suites run well over a million individual assertions, they run in rounds until two consecutive rounds find nothing new, and they must all pass before a change ships.

A separate pinned baseline locks the conventional-loan output for a canonical scenario to values recorded before the loan-program code existed, so a new feature cannot silently move the numbers for everybody already using the old path. And a gate exists whose only job is to check that the figures written in this article still match the figures in the source files — because a methodology document that drifts from its engine is worse than no methodology document at all.

Assumptions Are Not Predictions

Three of the most consequential inputs are things nobody knows: the home’s appreciation rate, the portfolio’s return, and where rates go next. DwellQ does not forecast any of them. It takes them from you, defaults them to conservative long-run figures, clamps them to sane bounds so a typo cannot produce nonsense, and then does the arithmetic exactly. A correct calculation of an assumption you chose is still a projection.

The engine also does not know things it was never told: local rent control, a pending HOA special assessment, flood or wildfire exposure, a coming reassessment, your job security, or how much you want to paint a wall you own. It does not give tax advice — the tax chain is a model of published rules, not a return, and a CPA is a different thing.

What it does give you is the complete set of levers in one place, moving in real time, with every formula inspectable through Show the Math on any result. Use it to find out which assumption is carrying your answer. That is usually the finding that changes a decision, not the headline number.

THE BOTTOM LINE
DwellQ is a financial modelling engine, not a financial advisor. Every formula on this page was read out of the code that runs, and a build gate checks that it stays that way. What the engine cannot do is know the future — appreciation, returns and rates are yours to choose. Choose several, and watch which one is carrying your answer.

Frequently Asked Questions

How accurate is DwellQ?+
The arithmetic is checked against independent reimplementations — closed-form algebra, an exact integer-cent oracle, and metamorphic laws relating one run to another — across 1,505 scenarios and over a million assertions before any change ships. But arithmetic accuracy is not prediction. Appreciation, investment return and future rates are assumptions you supply, and the output is a projection under those assumptions.
What exactly is the break-even month?+
The first month in which the buy path’s net worth — projected home value, minus the loan balance, minus the cost of selling — is greater than or equal to the rent path’s portfolio balance. It is not the month your payment drops below rent, and it is not the month you have recovered your closing costs. If no break-even is reported, the buy line never caught the rent line inside your horizon.
When does PMI stop, exactly?+
For a conventional loan, the first month the balance falls to 78% or less of the ORIGINAL purchase price — the Homeowners Protection Act automatic-termination rule. The test is against the price you paid, not the home’s current value, so appreciation does not cancel PMI on this schedule. The premium itself is your PMI rate on the original loan amount divided by twelve, and it does not shrink as you pay down.
Why does year one show no tax savings?+
Because you have not filed yet. A deduction earned in a tax year reaches your bank account the following spring, so the engine credits the year’s saving evenly across the twelve months after the year that earned it. Year one shows a full attributed deduction and exactly $0 of monthly cash relief. Every screen that shows a monthly or annual cash figure uses the applied number, and a dedicated gate enforces it.
Does the calculator assume rent rises every month?+
No. Rent holds flat for twelve months and then steps at lease renewal — month 13, month 25, and so on — by the growth rate you set. Compounding the same percentage monthly would overstate a decade of rent noticeably, and it is not how leases work.
Is the renter assumed to invest the difference?+
Yes, in both directions. The portfolio opens with the buyer’s entire upfront cash (down payment plus closing costs, less the renter’s own move costs) and is credited every month owning costs more than renting — and DEBITED every month renting costs more, which is what happens in later years as rent escalates past a fixed payment.
Where does DwellQ get its data, and what happens if a source is down?+
Rates from the Freddie Mac PMMS via FRED (24-hour cache), appreciation from the FHFA House Price Index (refreshed quarterly into a static dataset), property tax from Census ACS tables B25103 and B25077 by ZIP (7-day cache), and tax rules from IRS publications and the statute. When a feed is unreachable the engine says so rather than pretending: the rate fetcher falls back to a logged, source-tagged 6.75% that the health endpoint reports, and the property tax lookup returns nothing so the interface asks you instead of inventing a rate.
Why do the education tools use different maintenance and insurance numbers?+
They are different tools with a different job. The free education tools share one national assumption set — 0.35% insurance, 1.0% maintenance, 3% closing costs — so that no two of them can quote different figures for the same house. The rent-vs-buy engine does not use those constants at all; it starts from its own defaults (0.30% insurance, 0.50% maintenance) and expects you to replace them with your real numbers.
Does DwellQ model ARMs and refinances?+
Q+ does. An ARM resets in the month after its fixed period, then at your reset frequency, with the target rate clamped by the periodic cap, then the lifetime cap (initial rate plus the cap, with no lifetime floor), then floored at zero; the payment is recomputed over the remaining original term. A refinance charges closing costs on the current balance, credits any cash-out as money received, applies points as a rate buy-down, and re-amortises over a new full term. Refinance break-even is costs divided by monthly saving.
Is DwellQ financial advice?+
No. DwellQ is a financial education tool that produces scenario-based projections. The tax chain is a model of published rules, not a tax return. It does not replace professional financial, tax, or legal advice.
Find out if you should buy
Run a free rent vs buy analysis with your actual numbers.
Open the Calculator
OTHER CALCULATORS
KEEP READING
STRATEGY~4 min
Why Most Rent vs Buy Calculators Get It Wrong
They compare payments. We compare futures.
STRATEGY~3 min
Tax Implications of Buying vs Renting
The deduction that might not exist for you.
STRATEGY~7 min
Understanding Break-Even Time in Housing Decisions
The year when the two paths cross. If they do.
🔒
METHODOLOGY
DwellQ research uses a net worth comparison framework. Both paths—buying (building equity minus all ownership costs) and renting (investing the down payment plus monthly surplus)—are modeled month-by-month over the full holding period. Assumptions are documented, sensitivity-tested, and sourced from publicly available data. This is scenario analysis, not financial advice. Data sources and refresh dates →
SOURCES & REFERENCES
  1. Federal Reserve Bank of St. Louis. FRED: 30-Year Fixed Mortgage Rate, S&P 500 Total Return Index.[fred.stlouisfed.org]
  2. Freddie Mac. Primary Mortgage Market Survey (PMMS), series MORTGAGE30US.[freddiemac.com/pmms]
  3. Federal Housing Finance Agency. House Price Index (Purchase-Only), Quarterly.[fhfa.gov/data/hpi]
  4. U.S. Census Bureau. American Community Survey 5-Year Estimates, Tables B25103 and B25077.[data.census.gov]
  5. Tax Foundation. State and Local Property Tax Rates by State.[taxfoundation.org]
  6. Insurance Information Institute. Homeowners Insurance Facts and Statistics.[iii.org]
  7. IRS. Publication 501: Standard Deduction. Publication 936: Mortgage Interest Deduction.[irs.gov]
  8. IRS. Publication 523: Selling Your Home (adjusted basis and the Section 121 exclusion).[irs.gov/publications/p523]
  9. 26 U.S.C. 163(h)(3)(E). Mortgage insurance premiums treated as interest, and the AGI phase-out.[law.cornell.edu/uscode/text/26/163]
  10. Homeowners Protection Act of 1998, 12 U.S.C. 4902. Automatic PMI termination at 78% of original value.[law.cornell.edu/uscode/text/12/4902]
  11. U.S. Department of Housing and Urban Development. FHA Single Family Housing Policy Handbook 4000.1 (UFMIP and annual MIP).[hud.gov]
  12. U.S. Department of Veterans Affairs. VA Funding Fee Rates.[va.gov]
  13. USDA Rural Development. Single Family Housing Guaranteed Loan Program fee structure.[rd.usda.gov]
  14. Consumer Financial Protection Bureau. Ability-to-Repay and Qualified Mortgage standards; debt-to-income guidance.[consumerfinance.gov]
  15. One Big Beautiful Bill Act, H.R. 1, 119th Congress (2025). SALT Cap Provisions.
  16. Beracha, E. and Johnson, K.H. ‘Lessons from Over 30 Years of Buy vs Rent Decisions.’ Real Estate Economics, 40(2), 2012.