How DwellQ Works: Engine, Data Sources, and Formulas
Key Findings
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.
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.
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.
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.
The Buy Path’s Full Carry, Line by Line
Every month the buy path is charged seven lines.
- 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.
Three of the seven move with the home’s value. The rest are held exactly where you set them.
- Property tax — your 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 insurance — the 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 utilities — charged 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.
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.
It stops the first month the loan balance falls to 78% or less of the ORIGINAL PURCHASE PRICE.
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.)
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.
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.
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.
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.
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.
Three things it is not.
- NOT payment parity — the month your mortgage payment drops below the going rent typically arrives years earlier, and means nothing about wealth
- NOT closing-cost recovery — recovering 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 promise — both 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.
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.
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).
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).
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.
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.
The timing rule then decides when any of that reaches the buyer, and the answer for year one is never.
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.
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.
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.
- Extra every month — a closed form for the shortened term
- Target year — the 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 sum — a 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.
Wanting that same $400,000 loan gone in 20 years instead of 30 costs an extra $447.06 a month and saves $204,032.
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.
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.
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.
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%.
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.
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.
- Mortgage rates — the 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 appreciation — the 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 tax — the 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.
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.
- Homeowners insurance — 0.35% of value per year
- Maintenance — 1.0% of value per year
- Buyer closing costs — 3% of price
- Down payment — 10%, 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.
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.
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.
- Closed-form algebra — the balance after k payments must satisfy an identity that contains no iteration anywhere, checked at every k
- An exact oracle — the 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 laws — double 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 identities — total rent must equal 12·R·((1+g)^N − 1)/g in closed form, which is a direct test of the annual-step rule
- Dollar conservation — every dollar spent must appear in exactly one bucket, and the published totals must equal the sum of their published parts
- Statutory tables — the 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.
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.
Frequently Asked Questions
- Federal Reserve Bank of St. Louis. FRED: 30-Year Fixed Mortgage Rate, S&P 500 Total Return Index.[fred.stlouisfed.org ↗]
- Freddie Mac. Primary Mortgage Market Survey (PMMS), series MORTGAGE30US.[freddiemac.com/pmms ↗]
- Federal Housing Finance Agency. House Price Index (Purchase-Only), Quarterly.[fhfa.gov/data/hpi ↗]
- U.S. Census Bureau. American Community Survey 5-Year Estimates, Tables B25103 and B25077.[data.census.gov ↗]
- Tax Foundation. State and Local Property Tax Rates by State.[taxfoundation.org ↗]
- Insurance Information Institute. Homeowners Insurance Facts and Statistics.[iii.org ↗]
- IRS. Publication 501: Standard Deduction. Publication 936: Mortgage Interest Deduction.[irs.gov ↗]
- IRS. Publication 523: Selling Your Home (adjusted basis and the Section 121 exclusion).[irs.gov/publications/p523 ↗]
- 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 ↗]
- 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 ↗]
- U.S. Department of Housing and Urban Development. FHA Single Family Housing Policy Handbook 4000.1 (UFMIP and annual MIP).[hud.gov ↗]
- U.S. Department of Veterans Affairs. VA Funding Fee Rates.[va.gov ↗]
- USDA Rural Development. Single Family Housing Guaranteed Loan Program fee structure.[rd.usda.gov ↗]
- Consumer Financial Protection Bureau. Ability-to-Repay and Qualified Mortgage standards; debt-to-income guidance.[consumerfinance.gov ↗]
- One Big Beautiful Bill Act, H.R. 1, 119th Congress (2025). SALT Cap Provisions.
- Beracha, E. and Johnson, K.H. ‘Lessons from Over 30 Years of Buy vs Rent Decisions.’ Real Estate Economics, 40(2), 2012.