Capital Gains & the Home Sale Exclusion: What Homeowners Need to Know
6 Minute Read
Selling your home for a profit sounds like a great problem to have. But if your home has appreciated significantly, you may be wondering: “Am I going to owe taxes on all of that profit?”
The good news is that many homeowners can exclude a significant portion of the gain from the sale of their primary residence.
The federal home-sale exclusion can allow qualifying homeowners to exclude up to $250,000 of gain, or up to $500,000 for certain married couples filing jointly. But there are specific rules you must meet to qualify.
And with home prices having risen substantially in many markets, understanding these rules has become increasingly important for homeowners considering a sale.
What Is a Capital Gain on the Sale of a Home?
A capital gain is generally the profit you realize when you sell an asset for more than your adjusted basis.
For a home, the calculation is more complicated than simply:
Sale price − original purchase price = taxable gain
Your gain generally starts with the difference between the amount realized from the sale and your adjusted basis in the property.
Your basis can be affected by certain improvements and other adjustments.
For example, imagine you purchased a home for:
$300,000
Over the years, you made $75,000 of qualifying improvements.
Your adjusted basis could therefore be higher than your original purchase price.
If you eventually sell the property for $650,000, your taxable gain isn't necessarily $350,000.
The calculation requires looking at the property's adjusted basis and other relevant selling information.
That distinction can make a major difference when you're determining whether your gain falls within the home-sale exclusion.
The $250,000 Home-Sale Exclusion
For many homeowners, the most important tax rule is the Section 121 home-sale exclusion.
Generally, you may be able to exclude up to $250,000 of gain if you are single or otherwise qualify for the individual exclusion.
If you are married filing jointly and meet the applicable requirements, you may be able to exclude up to $500,000 of gain.
That can potentially save a homeowner tens of thousands of dollars in federal income taxes.
But there is an important catch:
You don't automatically qualify just because the property is your home.
You generally need to satisfy both an ownership test and a use test.
The 2-Out-of-5-Year Rule
The basic rule is commonly described as the “2 out of 5” rule.
Generally, during the five-year period ending on the date you sell the home, you must have:
Owned the home for at least two years
Used the home as your main home for at least two years
Not excluded gain from the sale of another home during the two-year period ending on the current sale
The two years do not necessarily have to be consecutive.
This is one of the most important dates homeowners should understand before deciding when to sell.
Example
Imagine you purchased your home in 2020 and lived there until 2026.
You then move into a new home but keep the old property.
If you sell the former home while you still satisfy the applicable five-year window, you may potentially qualify for the home-sale exclusion.
But waiting several years can change the calculation.
This is especially important for homeowners who are considering turning their former residence into a rental.
What If You Make More Than $250,000?
This is another common misconception.
If you are single and have a $300,000 gain, that does not necessarily mean the entire $300,000 is taxable.
If you otherwise qualify for the full $250,000 exclusion, the first $250,000 of qualifying gain may be excluded.
The remaining $50,000 may be subject to tax.
For a qualifying married couple filing jointly, the potential exclusion can be as high as $500,000.
The key word is qualifying.
The exclusion isn't a blanket exemption for every dollar of appreciation on every property.
What Counts as a Capital Gain?
Homeowners sometimes confuse the home's selling price with their taxable gain.
They aren't the same thing.
Consider a simplified example:
Original purchase price: $250,000
Qualifying improvements: $100,000
Adjusted basis: $350,000
Sale price: $600,000
Ignoring other adjustments and selling costs for illustration, the gain would be approximately:
$600,000 − $350,000 = $250,000
If the homeowner qualifies for the full $250,000 home-sale exclusion, that gain could potentially be excluded from federal income.
This is why keeping records of major improvements can be extremely important.
Home Improvements Could Matter More Than You Think
One of the biggest mistakes homeowners make is throwing away documentation for improvements.
Major improvements can potentially increase the property's tax basis.
Examples may include things such as:
Adding a room
Remodeling a kitchen
Adding a bathroom
Replacing a roof
Installing certain permanent improvements
Building an addition
Major landscaping or other qualifying improvements
Not every expense associated with maintaining a home increases basis.
Routine repairs and maintenance generally aren't treated the same way as capital improvements.
That's why homeowners should maintain good records and discuss significant expenditures with their tax professional.
That old folder of receipts may be worth more than you think when you eventually sell.
What Happens If You Rented Out Your Home?
This is where the rules can become considerably more complicated.
Many homeowners are choosing to keep their old homes as rentals rather than selling them.
The good news is that renting a former primary residence doesn't automatically mean you lose the home-sale exclusion.
The IRS allows a homeowner to potentially qualify for the exclusion if the ownership and use requirements are met.
However, additional rules apply to rental property and periods of nonqualified use.
There is also an important rule involving depreciation.
If you claimed, or were allowed to claim, depreciation for rental or business use after May 6, 1997, the portion of gain attributable to that depreciation generally cannot be excluded under the home-sale exclusion.
This means homeowners should think about the tax consequences before converting their residence into a rental.
The “Rent It for Three Years” Strategy Isn't as Simple as Social Media Makes It Sound
You may have seen real estate investors talk about buying a home, living in it for two years, renting it for three years, and then selling it while still taking advantage of the home-sale exclusion.
There is some truth behind the strategy, but it is often oversimplified.
The five-year ownership and use test matters.
So does the allocation of gain to periods of nonqualified use.
And depreciation can create taxable gain that isn't eligible for the exclusion.
The IRS specifically notes that a former main home can still qualify for an exclusion even when it was used as rental property, but additional limits apply.
In other words:
Don't build an investment strategy around a social-media tax hack without having the numbers reviewed by a tax professional.
What If You Don't Meet the Two-Year Requirement?
Failing to meet the standard two-year ownership and use requirements doesn't necessarily mean you receive zero tax benefit.
The IRS allows for a reduced exclusion in certain circumstances.
For example, a reduced exclusion may apply when the sale is related to circumstances such as:
A change in place of employment
Certain health circumstances
Certain unforeseen circumstances
The rules are fact-specific, so homeowners should determine whether they qualify before assuming the exclusion is unavailable.
Can You Use the Exclusion More Than Once?
Yes.
There is no lifetime limit on the number of times you can use the home-sale exclusion.
However, generally, you cannot use the exclusion if you excluded gain from the sale of another home during the two-year period ending on the date of the current sale.
This can become especially relevant for people who move frequently, investors who sell properties that were formerly residences, and homeowners who are relocating.
What If You're Married?
The $500,000 exclusion is one of the most valuable parts of the home-sale rules, but simply being married does not automatically give you a $500,000 exclusion.
For a married couple filing jointly to qualify for the full exclusion, additional requirements apply.
Generally, both spouses must satisfy the use requirement, while at least one spouse must satisfy the ownership requirement. Neither spouse can have excluded gain from another home sale during the applicable two-year period.
This is another reason couples should review the tax consequences before selling rather than assuming the entire gain will automatically be tax-free.
What About Selling at a Loss?
The home-sale exclusion is designed to exclude qualifying gain.
If you sell your personal residence for less than your adjusted basis, the loss generally isn't deductible as a personal loss.
So the tax treatment of a gain and a loss on a personal residence can be very different.
Do You Have to Report the Sale?
Not always.
If you qualify for the exclusion and exclude the entire gain, you generally don't have to report the sale on your tax return.
However, there are situations where reporting is required.
For example, if you receive a Form 1099-S, you generally need to report the sale even if the gain is otherwise fully excludable.
If you have taxable gain that cannot be excluded, the sale also needs to be reported.
A $500,000 Gain Doesn't Necessarily Mean a $500,000 Tax Bill
This is perhaps the most important takeaway.
Suppose a married couple sells their primary residence for a substantial profit.
They may look at the appreciation and think:
“We're going to owe taxes on all of this.”
Not necessarily.
If they meet the requirements for the $500,000 exclusion, a significant portion of that gain may potentially be excluded from federal income.
On the other hand, if they don't qualify, have significant depreciation-related gain, or have gain that exceeds the applicable exclusion, some portion may be taxable.
The actual calculation depends on the facts.
Planning Before the Sale Can Save You Money
The best time to think about capital gains taxes isn't after the closing.
It's before you list the property.
Before selling a highly appreciated home, consider reviewing:
Your original purchase documents
Major improvement records
Closing statements
Your adjusted basis
How long you have owned the property
How long you lived there
Whether the property was ever rented
Depreciation claimed or allowable
Whether you previously used the home-sale exclusion
Your expected selling price
Selling expenses
Your filing status
Whether any special circumstances apply
A tax projection can help you understand how much of your gain may actually be taxable before you make a major financial decision.
The Bottom Line
Selling an appreciated home doesn't automatically mean you're going to lose a large portion of your profit to taxes.
For qualifying homeowners, the federal home-sale exclusion can potentially shelter up to $250,000 of gain, or up to $500,000 for certain married couples filing jointly.
But the rules matter.
The two-out-of-five-year requirement matters.
Your adjusted basis matters.
Home improvements matter.
Rental use and depreciation matter.
And the timing of your sale can matter significantly.
If you're thinking about selling a home that has appreciated substantially, don't wait until tax season to find out what the sale will mean for your taxes.
A little planning before the sale can help you understand your potential capital gain, determine whether you qualify for the home-sale exclusion, and avoid unpleasant surprises when tax time arrives.
Before you sell, know your gain. Before you list, know your tax consequences.
Sources: IRS Topic No. 701, Sale of Your Home; IRS Publication 523, Selling Your Home; IRS guidance on property basis and the sale of rental property.