Gain on selling your home, the $250,000 or $500,000 exclusion and the taxable rest
Estimates only, not financial advice. What you type stays on your device. Checked against sources on 29 Sept 2026.Selling a main home can exclude up to $250,000 of gain, or $500,000 married filing jointly, if you owned and lived in it for 24 months of the 5 years before the sale. Gain is the price minus selling costs minus your adjusted basis. Moving for work, health or an unforeseeable event can allow a partial exclusion.
Rates and rules read from IRS Publication 523, Selling Your Home on 29 Sept 2026; they may have changed since.
Choose your Filing status: married filing jointly or single.
Enter the Selling price, Selling costs and Adjusted basis.
Enter the months you owned the home and lived in it as your main home in the last 5 years.
Read the Taxable gain and whether each test is met; the rules are from IRS Publication 523, listed under Sources.
When you sell your main home, section 121 of the tax code lets you leave a large part of the gain off your return. This calculator works out the gain, tests whether you qualify, and shows how much is excluded and how much is left to tax, following IRS Publication 523.
The gain. Start with the selling price and subtract selling costs such as agent commission, title and legal fees. That is the amount realized. Subtract your adjusted basis: what you paid for the home plus the cost of improvements, like a new roof or an addition. Repairs and upkeep do not count.
The tests. For the full exclusion of $250,000, or $500,000 married filing jointly, you must have owned the home for at least 24 months and lived in it as your main home for at least 24 months, both within the 5 years before the sale. The months do not need to be in a row or at the same time. You also cannot have excluded gain on another home in the 2 years before.
Partial exclusion. If you fall short because you moved for a new job at least 50 miles farther away, for health reasons, or after an unforeseeable event such as a death, divorce or job loss, you can still exclude part of the maximum. The share is the shortest of your months of use, ownership and time since your last excluded sale, divided by 24.
Depreciation. If you used part of the home as a rental or a home office and claimed depreciation after May 6, 1997, that part of the gain is never excluded. The calculator keeps it in the taxable amount.
What it does not do. It does not handle rental years before you moved in (nonqualified use), the special rules for service members, widows and divorce, or a joint return where only one spouse passes the tests. A loss on a personal home is not deductible. An estimate, not tax advice.
Up to $250,000 for a single filer and up to $500,000 for a married couple filing jointly. On a joint return, either spouse must meet the ownership test, both must meet the use test, and neither can have excluded gain on another home in the previous 2 years. These amounts are fixed in the law and are not raised for inflation.
During the 5 years before the sale you must have owned the home for at least 24 months and lived in it as your main home for at least 24 months. The two periods can differ and need not be continuous, so renting first and buying later can still qualify once both totals reach 24 months.
Take the selling price, subtract selling costs such as the agent commission and closing fees, and subtract your adjusted basis. The basis is the purchase price plus improvements that add value or extend the home's life. For example, $900,000 minus $50,000 of costs minus a $300,000 basis is a $550,000 gain.
Yes, when the main reason for selling was a new job at least 50 miles farther from the home than the old job, a health reason, or an unforeseeable event. The maximum is scaled down: a single filer who lived in and owned the home for 12 months can exclude up to $125,000.
Yes. The gain above the exclusion is a capital gain, long-term if you owned the home more than a year, taxed at 0%, 15% or 20%, and it may add the 3.8% net investment income tax. Gain from depreciation claimed for a home office or rental is taxed separately at up to 25%.
Report it if you received a Form 1099-S or if any gain is taxable. When the whole gain is excluded and no 1099-S was issued, the sale usually does not have to appear on your return. A loss on the sale of a personal home cannot be deducted.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about Home Sale Exclusion Calculator and anybody who knows can answer. No account needed.
Same job, other tools: California Bonus Tax Calculator – California bonus withholding: 10.23% state, 1.3% SDI, plus the federal 22% and FICA · New York Bonus Tax Calculator – New York State bonus withholding at 11.70%, with the federal 22% and FICA · Additional Child Tax Credit Calculator – How much of the child tax credit comes back as a refund: 15% of earnings over $2,500 · NSO Tax Calculator – Federal tax on exercising non-qualified stock options and selling the shares.
On the related tools: Bonus Depreciation Calculator – 100% bonus depreciation after 19 January 2025, or 40% / 20% for earlier purchases.
More for US: all 41 US calculators.