HOME SALE EXCLUSION CALCULATOR

Home sale exclusion calculator

Enter the sale and your time in the home, get the taxable gain after the Section 121 exclusion.

$
$
$
$
$
mo
mo
mo
$
$

Amounts are examples — use your own. Time is the part of the last 5 years before the sale. Other taxable income is what you have besides this gain, after deductions. Federal tax only: state taxes are not included.

How much of the gain on my home can I exclude?

Up to $250,000 of gain on the sale of your main home, or $500,000 if you file a joint return and both spouses meet the use test (IRC §121). These amounts have not changed since 1997. Checked October 1, 2026 against IRS Topic 701 (updated September 24, 2026) and Publication 523: bills in Congress that would raise, index or repeal the limits have not become law, so this calculator uses the current figures only.

What are the ownership and use tests?

You must have owned the home and used it as your main home for at least 24 months (730 days) during the 5 years before the sale. The two periods can be different and need not be consecutive. On a joint return only one spouse has to meet the ownership test, but both must meet the use test for the full $500,000; if only one does, the limit is $250,000. You also cannot have excluded the gain from another home sold in the 2 years before this sale — once every 2 years.

What if I haven't lived there for 2 years?

If you sell mainly because of a work move (a new job at least 50 miles farther from the home), a health reason, or an unforeseen event such as a disaster, death, divorce or job loss, you get a reduced exclusion: $250,000 × the shortest of the months you owned the home, the months you lived in it, and the months since your last exclusion, divided by 24. Selling after 12 months for a job change gives $125,000 (12/24 × $250,000). On a joint return each spouse is figured separately: if one spouse lived there 12 months and the other long enough, the limit is $375,000, not $500,000 (Treasury Regulation 1.121-3(g)). A move just to a bigger or nicer home does not count.

How is the gain on a home sale figured?

Gain = amount realized − adjusted basis (Pub. 523, Worksheet 2). The amount realized is the sale price minus selling costs such as commissions and legal fees. The adjusted basis is what you paid plus buying costs and improvements that add value or prolong the life of the home — a new roof, a deck, a remodel; not repairs or painting — minus depreciation, casualty-loss deductions and energy credits. On the example, $650,000 − $40,000 = $610,000; $300,000 + $50,000 = $350,000; the gain is $260,000.

How is the taxable part taxed?

Gain above the exclusion is a capital gain: 0%, 15% or 20% stacked on top of your other taxable income if you owned the home more than a year (the same rates as the capital gains tax calculator), or ordinary rates if you owned it a year or less. A 3.8% Net Investment Income Tax applies to the taxable part if your modified AGI is over $200,000 ($250,000 joint). The excluded gain is not taxed at all. On the example, $260,000 − $250,000 leaves $10,000, taxed at 15% with $80,000 of other taxable income: $1,500.00. On a joint $900,000 sale of a $250,000 home the taxable gain is $150,000.

What about depreciation from a home office or rental?

You cannot exclude the part of the gain equal to depreciation you took, or could have taken, on the home for business or rental use after May 6, 1997. It is “unrecaptured section 1250 gain”, taxed at your ordinary rates but at most 25% (Pub. 523, “Recapturing Depreciation”). Enter the total in the depreciation box; it also lowers your adjusted basis. Gain from periods after 2008 when the home was not your main home before you moved in (nonqualified use) cannot be excluded either — work it out on Pub. 523's Worksheet 3, Section B and enter the result in the nonqualified-use box. Pub. 523's rental example: a $320,000 gain with $20,000 of depreciation and $120,000 of nonqualified use leaves $180,000 excluded and $140,000 taxable.

Example

A single filer sells for $650,000 with $40,000 of selling costs; the home cost $300,000 and $50,000 of improvements were made. Owned and lived there 60 months. The gain is $260,000, the exclusion $250,000, the taxable gain $10,000 and the federal tax $1,500.00 on $80,000 of other taxable income. With less than 24 months of use and no qualifying reason there would be no exclusion at all.

What does this calculator leave out?

State taxes; a separate business or rental part of the property (a duplex, a store with an apartment — Form 4797); a home acquired in a like-kind exchange; the extra time for military, Foreign Service and Peace Corps members; the larger exclusion for a surviving spouse who sells within 2 years of the death; sales of a partial interest or on installment; different look-back dates for each spouse (the form takes one); and whether depreciation gain counts as net investment income for the 3.8% tax. The amounts are estimates — Pub. 523's worksheets and a tax professional give the real figures.

An estimate for planning only — not tax advice. Special cases are not included; your tax return decides. Sources: IRC §121; IRS Publication 523, Selling Your Home (2025 edition) and Topic 701; Treasury Regulation 1.121-3 for the reduced exclusion; checked October 1, 2026. See the rates in the capital gains tax calculator and your other income in the income tax calculator. How we check our calculators.