Home sale proceeds
The sale price is not the number you receive. Commission, the loan payoff, the basis you have built up and the §121 exclusion all move the answer, and the exclusion is the largest single lever: a married couple can realise half a million dollars of gain tax-free.
| Line | Amount | Note |
|---|---|---|
| Sale price | $650,000 | the contract price |
| Selling costs | −$39,000 | 6.00% commission and closing |
| Mortgage payoff | −$240,000 | the loan balance at closing |
| Equity released | $371,000 | before any capital-gains tax |
| Purchase price | $420,000 | the original basis |
| Improvements | +$40,000 | capital improvements add to basis |
| Adjusted basis | $460,000 | purchase price plus improvements |
| Capital gain | $151,000 | price less selling costs and basis |
| §121 exclusion | −$151,000 | two-of-five-year use test met |
| Taxable gain | $0.00 | the part above the exclusion |
| Estimated tax | −$0.00 | at 15.0% |
| Net proceeds | $371,000 | what the wire actually says |
Improvements are not the same as repairs. A new roof or an addition adds to basis; repainting or fixing a leak does not. Keep the receipts — this is the single most commonly lost deduction in a home sale.
basis = purchase + improvements · Improvements, not repairs.
gain = price − selling costs − basis · Selling costs reduce the amount realised.
min(gain, $250k or $500k) · Requires ownership and use for two of the last five years.
taxable gain × (cap rate + NIIT) · NIIT adds 3.8% above the MAGI threshold.
A clear path from inputs to results.
The sale price is not the number you receive. Commission, the loan payoff, the basis you have built up and the §121 exclusion all move the answer — and the exclusion is the largest single lever, because a married couple can realise half a million dollars of gain without paying tax on it.
How to use
- Enter the sale price and the selling costs as a percentage.
- Add the mortgage balance that has to be paid off at closing.
- Enter the original purchase price and any capital improvements.
- Choose your filing status and whether the two-of-five-year use test is met.
- Read the net proceeds, the gain and any tax on it.
The formula
Reference: IRC §121 for the primary-residence exclusion; IRC §1001 and §1016 for amount realised and adjusted basis.
Worked example
$650,000 sale of a home bought for $420,000
- Sale price $650,000, selling costs 6%.
- Mortgage balance $240,000.
- Purchase price $420,000, $40,000 of capital improvements.
- Married filing jointly, use test met, 15% capital-gains rate.
- 1
Selling costs are 6% of $650,000, or $39,000, so the amount realised is $611,000.
- 2
Paying off the $240,000 loan releases $371,000 of equity.
- 3
The adjusted basis is $420,000 plus $40,000 of improvements, or $460,000.
- 4
The gain is $611,000 − $460,000 = $151,000.
- 5
The §121 exclusion for a married couple is $500,000, which absorbs the whole gain.
- 6
Taxable gain is zero, so net proceeds equal the equity released: $371,000.
$371,000 net proceeds · $151,000 gain · $0 tax.
Interpreting the result
The exclusion is generous enough that most primary-residence sales pay nothing, which is why the interesting cases are the ones that exceed it: long-held homes in expensive markets, a second home that fails the use test, or a sale within two years of purchase. In those cases the gain is taxed at capital-gains rates, and the NIIT adds 3.8% on top above the income threshold.
Assumptions & limitations
- The §121 exclusion is $250,000 single and $500,000 married filing jointly, available when the home has been owned and used as a principal residence for two of the last five years.
- Improvements add to basis; routine repairs and maintenance do not.
- Selling costs reduce the amount realised, and therefore the gain.
- The capital-gains rate is an input; the model does not compute the bracket from your income.
- The 3.8% net investment income tax is applied as an option, not derived from MAGI.
- State income tax on the gain is not modelled.
Frequently asked questions
What counts as a capital improvement?
Anything that adds value, prolongs the life of the property or adapts it to a new use: a new roof, an addition, a replaced HVAC system, landscaping, or a kitchen remodel. Repainting, fixing a leak or replacing a broken window are repairs and do not add to basis.
What if I rented the house out for a while?
The two-of-five-year use test still applies, but the depreciation you claimed while renting it is recaptured at up to 25% and does not qualify for the exclusion. That recapture is often the largest surprise in a converted rental.
What about a second home?
The §121 exclusion does not apply unless it has been your principal residence for two of the last five years. A second home sold at a gain pays capital-gains tax on the whole gain, subject to the usual rates and the NIIT.
How often can I use the exclusion?
Generally once every two years. A partial exclusion is available if you sell sooner because of a change in employment, a health condition, or an unforeseen circumstance such as a divorce or a natural disaster.
Does the buyer pay any of my costs?
Sometimes. A seller concession shifts part of the buyer's closing costs onto you in exchange for a higher price, which raises your amount realised and therefore your gain. The two effects usually roughly offset.
Methodology last reviewed 2026-10-21. Results are informational and not financial or engineering advice — see our disclaimer.