Selling a home for a profit is one of the few places in the tax code where a large capital gain can be entirely tax-free โ€” but the exclusion has specific requirements, a dollar cap, and a handful of edge cases that catch people who assume the whole gain is automatically excluded.

The Exclusion Amounts

Under IRC ยง121, you can exclude up to $250,000 of gain if single, or $500,000 if married filing jointly, from the sale of your primary residence. Unlike most figures in this calculator, these amounts are set directly in the statute and are not adjusted for inflation โ€” they've been the same since being set by law in 1997, which is worth knowing because in high-cost markets, home price appreciation over decades can now push gains well past what the exclusion covers.

The 2-of-5-Year Test

To qualify for the exclusion, you generally need to pass both halves of this test during the 5-year period ending on the date of sale:

For married couples filing jointly to get the full $500,000 exclusion, only one spouse needs to meet the ownership test, but both spouses need to meet the use test, and neither spouse can have used the exclusion on a different home sale within the last 2 years.

The Once-Every-Two-Years Limit

You can only use this exclusion once every 2 years. If you sold a different primary residence and claimed the exclusion within the 2 years before your current sale, you generally can't claim it again yet โ€” regardless of how thoroughly you meet the ownership and use tests on the new home.

What If You Don't Fully Qualify? The Partial Exclusion

If you sell before meeting the full 2-of-5-year test, you may still qualify for a partial exclusion โ€” prorated based on how much of the 2-year period you actually satisfied โ€” if the sale was due to specific, defined circumstances:

Selling simply because you found a better deal elsewhere, or because your circumstances changed but not for one of these defined reasons, generally doesn't qualify for the partial exclusion โ€” you'd either need to wait out the full 2 years or pay tax on the gain.

โš ๏ธ "I just wanted to move" is not itself a qualifying unforeseen circumstance under the IRS's rules, even if the reason feels significant to you personally. If you're selling early for a reason you're not sure qualifies, this is worth confirming with a tax professional before you assume the partial exclusion applies.

How the Gain Above the Exclusion Is Taxed

Any gain above your exclusion amount is taxed as a long-term capital gain (assuming you owned the home more than a year, which the 2-year ownership test guarantees) at the standard 0%, 15%, or 20% preferential rates โ€” the same brackets that apply to selling stock or other investments. It can also be subject to the 3.8% Net Investment Income Tax if your income is high enough, since gain from selling property is investment income for that purpose.

Depreciation Recapture โ€” The One Part That's Never Excluded

If you ever used part of the home for business or rental purposes and claimed depreciation on that portion, the amount attributable to depreciation taken after May 6, 1997 is not eligible for the ยง121 exclusion at all. It gets taxed separately as depreciation recapture, generally at a maximum rate of 25%, regardless of how much of your overall gain the exclusion otherwise covers.

A Worked Example

A married couple bought a home for $400,000, lived in it as their primary residence for 6 years, then sold it for $950,000 โ€” a $550,000 gain. They meet the 2-of-5-year test easily. Their exclusion covers $500,000 of that gain entirely tax-free; the remaining $50,000 is taxed as a long-term capital gain. If they're in the 15% long-term capital gains bracket, that's $7,500 in federal tax on a sale that, without the exclusion, would have owed capital gains tax on the entire $550,000.

Inherited Homes and the Step-Up in Basis

If you inherited the home rather than buying it, your starting basis generally "steps up" to the property's fair market value on the date of the original owner's death โ€” not what they originally paid for it. This alone eliminates most or all of the gain that accrued during the deceased owner's lifetime, often making the ยง121 exclusion almost beside the point for inherited property sold soon after death, since there may be little or no gain left to exclude in the first place. The exclusion still matters if you hold the inherited home for a while afterward and it appreciates further, or if you move into it and it becomes your primary residence before eventually selling.

Converted Rentals and Vacation Homes

If a property wasn't always your primary residence โ€” a former rental you later moved into, or a vacation home you eventually made your main home โ€” the exclusion gets prorated. Gain attributable to periods of "nonqualified use" after 2008 (time when the home wasn't your primary residence) generally isn't eligible for the exclusion, even if you meet the 2-of-5-year test based on your most recent years of ownership. This rule specifically targets the strategy of converting a rental into a primary residence briefly just before selling to try to exclude the entire accumulated gain โ€” it only works proportionally, based on the ratio of qualifying to nonqualifying use throughout your total ownership period.

Common Questions

Do I need to report the sale if the entire gain is excluded? If you receive a Form 1099-S for the sale, or if any portion of the gain isn't excludable, you generally need to report the sale on your return even though the excluded portion isn't taxed. If you meet the ownership/use tests, didn't receive a 1099-S, and the entire gain is excluded, reporting is often not required โ€” but check the current Schedule D / Form 8949 instructions for the specifics of your situation.

Can I use the exclusion on a second home or vacation property? Only if it was actually your primary residence for at least 2 of the last 5 years โ€” the exclusion is tied to primary-residence status, not to how you think of the property informally. A true second home that was never your main residence doesn't qualify at all, regardless of how long you owned it.

What if my spouse and I don't file jointly? Filing separately caps the exclusion at $250,000 per spouse (rather than the combined $500,000), and each spouse applies the ownership/use tests to their own situation.

๐Ÿ’ก Once you know the taxable portion of your gain (above your exclusion), run it through the Capital Gains preset to see exactly which bracket it falls into alongside your other income.