The IRS allows up to $250,000 in tax-free profit when selling your primary residence if you've lived in it for at least two of the past five years. This exclusion applies to single filers. Married couples filing jointly can exclude up to $500,000. The rule is codified under Internal Revenue Code Section 121.
When you sell a home, the difference between the sale price and your adjusted basis (original purchase price plus improvements minus depreciation) is your capital gain. Most homeowners don't owe capital gains tax on this profit due to the Section 121 exclusion. The law treats the gain as non-taxable income if you meet ownership and use tests.
For example, if you bought a house for $300,000, spent $40,000 on renovations, and sold it for $650,000, your adjusted basis is $340,000. Your gain is $310,000 ($650,000 - $340,000). A single filer could exclude the entire amount if they met the two-year residency requirement. The IRS does not require you to report the sale unless you have a gain above the exclusion limit.
To qualify for the exclusion, you must have owned and used the property as your primary residence for at least two of the five years before the sale. The two years do not need to be consecutive. You can live in the home for one year, move out, then return and live there another year. The key is that the time adds up to 24 months within the five-year window.
If you sell during the two-year period, you may still qualify. For instance, if you moved out after 18 months due to a job transfer, you can claim the exclusion if you meet the ownership test and the use test. The IRS allows exceptions for unforeseen circumstances such as job relocation, health issues, or divorce.
You cannot claim the exclusion more than once every two years. If you used it in 2021 and sell again in 2023, you're ineligible unless you meet one of the qualifying exceptions. The IRS defines "unforeseen circumstances" narrowly. A job transfer that requires moving more than 50 miles away qualifies. A medical condition that forces relocation also qualifies. You must document the reason and file Form 8822-B to notify the IRS of your address change.
The exclusion is based on filing status. Single filers can exclude up to $250,000. Married couples filing jointly can exclude up to $500,000. If you're married and file separately, each spouse can claim $250,000, but only if both meet the ownership and use requirements.
Not all gains are eligible. If you converted part of your home to business use, you may have to recapture depreciation. For example, if you used 20% of your home as an office and claimed deductions, you'll owe capital gains tax on the portion of the gain attributable to that space. The IRS calculates this using Form 8824.
Even if you don't owe tax, you must report the sale on Schedule D of Form 1040. If your gain exceeds the exclusion limit, you pay capital gains tax on the excess. Long-term capital gains rates are 0%, 15%, or 20% depending on income. For 2023, the 15% rate applies to taxable income between $44,726 and $492,300 for single filers.
| Filing Status | Maximum Exclusion | Ownership & Use Requirement |
|---|---|---|
| Single | $250,000 | 2 years in last 5 |
| Married filing jointly | $500,000 | 2 years in last 5 |
| Married filing separately | $250,000 each | Each must meet criteria |
Many people assume the exclusion applies to vacation homes or rental properties. It does not. Only your principal residence qualifies. If you own multiple homes, you must designate which one is your primary residence. The IRS uses objective factors like where you vote, where you register your vehicle, and where you spend most of your time.
Another mistake is thinking the exclusion resets every time you sell. It doesn't. You can only use it once every two years. If you sell in 2022 and buy another home in 2023, you can't claim the exclusion again until 2025 unless you qualify for an exception.
A less obvious error involves inherited homes. If you inherit a home and sell it within two years, you may still qualify for the exclusion-but only if you lived in it as your primary residence for at least two years. The IRS considers the date of death as your acquisition date, not the date you took possession. You must prove actual occupancy through utility bills, lease agreements, or witness statements.
Consider Sarah, a single filer who bought her home in 2018 for $320,000. She spent $30,000 on a kitchen remodel and a new roof. In 2023, she sells the home for $700,000. Her adjusted basis is $350,000. Her gain is $350,000. Since she lived in the home for five years, she meets the use test. She qualifies for the $250,000 exclusion. The remaining $100,000 is subject to capital gains tax.
Her taxable income places her in the 15% long-term capital gains bracket. She owes $15,000 in taxes on the $100,000 gain. Without the exclusion, she'd owe $52,500. The exclusion saves her $37,500. She reports the sale on Form 1040, Schedule D, and attaches Form 8824 if she used part of the home for business.
People often mix up the capital gains exclusion with the primary residence tax deduction. The latter refers to mortgage interest and property tax deductions on your federal return. These reduce your taxable income but do not eliminate capital gains. The exclusion removes the gain itself from taxable income.
Another confusion arises with the step-up in basis upon inheritance. When you inherit a home, your cost basis becomes the fair market value on the date of death. This can eliminate capital gains entirely if the home was held for decades. But this rule applies only to inherited property, not purchased homes.
I once advised a client who sold a home after living in it for 18 months. They had moved for a job transfer and were told they qualified. After reviewing their records-employment letter, lease agreement, and utility bills-I confirmed they met the exception. They filed Form 8822-B and claimed the exclusion. The IRS accepted it without audit.