Retirement Home Sale

Cash proceeds figured separately from taxable capital gain, the self-attested Section 121 exclusion, and the grow-then-withdraw proceeds projection.

Overview

The Retirement Home Sale Calculator estimates what selling a home leaves you with — after selling costs, debt payoff, and taxes — and compares keeping the home against buying another, renting, or investing the proceeds. All of its math runs server-side in RetireCalc.Engine, using the tax and Medicare constants for the requested year.

Cash proceeds

sellingCosts = homeValue × commissionRate + otherSellerClosingCosts + repairsAndConcessions + movingCosts
debt = mortgageBalance + otherLiens
netProceedsBeforeTax = homeValue − sellingCosts − debt
netProceedsAfterTax = netProceedsBeforeTax − estimatedTax

Taxable capital gain

adjustedBasis = originalPurchasePrice + purchaseClosingCosts + capitalImprovements
realizedGain = max( 0, homeValue − sellingCosts − adjustedBasis )
Mortgage balance and other liens reduce your cash proceeds. They do not reduce your capital gain. The taxable gain is the sale price (net of selling costs) minus your adjusted cost basis — what you paid for the home plus purchase closing costs and capital improvements. Paying off a $300,000 mortgage takes $300,000 out of your pocket at closing but changes the taxable gain by nothing.

The Section 121 exclusion

The modelled federal principal-residence gain exclusion is $250,000 for a single filer and $500,000 for married filing jointly (26 U.S.C. §121; IRS Publication 523). You can also enter a custom exclusion amount to override it.

The calculator does not independently determine whether you qualify. It uses your self-attestation:

  • Yes — the exclusion is applied, up to the gain remaining after depreciation recapture.
  • No — no exclusion is applied.
  • Unsure — no exclusion is applied, and a warning tells you to confirm the ownership-and-use test (generally owning and living in the home at least two of the last five years) with a tax professional.
recapture = min( enteredDepreciationRecapture, realizedGain )
excludableGain = min( exclusionAmount, max( 0, realizedGain − recapture ) )  (only when you attest “Yes”)
taxableCapitalGain = max( 0, realizedGain − recapture − excludableGain )
  • No partial-exclusion proration for a shortened ownership/use period is modelled — the exclusion is applied in full or not at all.
  • Depreciation recapture (from renting the home out) is entered by you; it is never covered by the Section 121 exclusion and is taxed at its own rate.

Estimated tax

federalTax = taxableCapitalGain × federalCapitalGainRate + recapture × depreciationRecaptureRate
stateTax = ( taxableCapitalGain + recapture ) × stateTaxRate

The rates are estimates you enter, not derived from a capital-gains bracket engine. The calculator does not stack the gain on top of your other income, apply the 0/15/20% long-term rate thresholds, or compute Net Investment Income Tax. Treat the tax figure as a rough estimate.

Medicare IRMAA effect

The calculator adds the taxable gain and recapture to a MAGI figure you provide and checks whether that crosses an IRMAA tier boundary (using the same §1395r(i)(3)(C) boundary rule the rest of the engine uses). Medicare uses a 2-year income lookback, so a gain this year affects premiums about two years later — the result is flagged as a potential increase, not a premium determination.

The proceeds projection

For the “invest the proceeds” comparison, the investable proceeds are projected year by year, growth first, then a scheduled withdrawal:

grown = balance × ( 1 + growthRate )
fundedWithdrawal = min( scheduledWithdrawal, max( 0, grown ) )
balance = max( 0, grown − scheduledWithdrawal )
realBalance = nominalBalance ÷ ( 1 + inflation )year
  • The first year’s withdrawal is investableProceeds × withdrawalRate; each later year’s scheduled withdrawal is escalated by inflation.
  • Cumulative withdrawals add only the funded withdrawal. Once the balance is exhausted the cumulative-withdrawals figure stops increasing — it is not the schedule of what you planned to spend, it is what the portfolio could actually pay.

Limitations

  • Self-attested Section 121 eligibility; no partial-exclusion proration; user-entered flat tax rates rather than a capital-gains bracket calculation.
  • A single deterministic return for the proceeds projection — no market variability.
  • Medicaid, estate/step-up-in-basis, and the emotional and practical sides of moving are flagged as warnings, not modelled.
  • No option in the comparison is labelled “best” — the calculator shows the trade-offs and leaves the decision to you.

Official sources

  • 26 U.S.C. §121; IRS Publication 523 — principal-residence gain exclusion ($250,000 single / $500,000 MFJ) and the ownership-and-use test
  • 42 U.S.C. §1395r(i)(3)(C) — the IRMAA tier boundary rule applied to the estimated post-sale MAGI

Related guides: Selling Your Home in Retirement Guide · Tax-Efficient Retirement Withdrawals