Tax implications of selling real estate
Capital Gains Tax on Real Estate: When Do You Pay, and When Do You Get an Exclusion?
One of the most common questions sellers ask is: "How much of my profit is the government going to take?"
When you sell a property for more than you bought it for, the IRS considers that profit a Capital Gain. Generally, Uncle Sam wants a cut of that gain. However, real estate enjoys some of the most generous tax breaks in the entire tax code—if you know the rules.
The tax treatment depends entirely on one question: Was this house your home, or was it an investment?
Here is the breakdown of how Capital Gains Tax works for primary residences versus investment properties.
Scenario A: Selling Your Primary Residence (The "Section 121" Exclusion)
This is the tax break that builds middle-class wealth. Under Section 121 of the tax code, the IRS allows you to walk away with a massive amount of tax-free profit, provided you meet specific criteria.
The Rule: The $250k/$500k Exclusion
If you sell your main home, you can exclude the following amounts of profit from capital gains tax:
- Single Filers: Up to $250,000 of profit is tax-free.
- Married Filing Jointly: Up to $500,000 of profit is tax-free.
The "2-out-of-5-Year" Test
To qualify for this exclusion, you must pass the Ownership and Use Tests:
- Ownership: You must have owned the home for at least 2 years.
- Use: You must have lived in the home as your primary residence for at least 2 of the last 5 years leading up to the sale.
Note: The 2 years do not need to be consecutive. You could live there for Year 1, move out for 3 years, and move back for Year 5.
Example:
You bought a condo in Los Angeles for $600,000. You lived there for 3 years. You sell it today for $900,000.
- Profit: $300,000.
- Tax: If you are single, the first $250,000 is tax-free. You only pay capital gains tax on the remaining $50,000. If you are married, the entire $300,000 is tax-free.
Scenario B: Selling an Investment Property
If the property was a rental, a vacation home you didn't live in, or a house flip held for investment, the rules change drastically. There is no $250k/$500k exclusion. You owe tax on the profit from dollar one.
1. Short-Term vs. Long-Term Gains
- Short-Term (Held < 1 Year): If you sell within a year of buying (like a quick flip), the profit is taxed as Ordinary Income. This means it is taxed at your highest marginal tax bracket (up to 37% federal + state tax). Ouch.
- Long-Term (Held > 1 Year): If you hold for at least a year and a day, you qualify for the lower Long-Term Capital Gains Rate (usually 15% or 20%, depending on your income).
2. The Hidden Trap: Depreciation Recapture
This is the part that blindsides investors. When you own a rental property, you typically claim a tax deduction for "depreciation" every year. This lowers your taxable rental income annually.
However, when you sell, the IRS says: "Hey, we gave you a tax break for depreciation, but the property actually went UP in value. We want that money back."
- You will be taxed at a flat 25% rate on the total amount of depreciation you claimed (or could have claimed) during the years you owned the property. This is called Depreciation Recapture.
3. The Escape Hatch: The 1031 Exchange
If you are selling an investment property and want to avoid paying these taxes, your best option is a 1031 Exchange.
- This allows you to roll 100% of your profit into the purchase of a new "like-kind" investment property.
- By doing this, you defer the taxes indefinitely. You kick the can down the road, allowing your equity to keep growing tax-free until you eventually sell for cash (or pass away, at which point your heirs get a "step-up in basis" and the taxes may vanish entirely).
Summary Cheat Sheet
| Feature | Primary Residence | Investment Property |
|---|---|---|
| Tax Exclusion | Yes ($250k Single / $500k Married) | No |
| Requirement | Live in it 2 of last 5 years | None |
| Tax Rate | 0% (up to limit), then Capital Gains | 15-20% (Long Term) or Income Rate (Short Term) |
| Depreciation Recapture | No (usually) | Yes (25% rate on depreciation taken) |
| Way to Avoid Tax | Section 121 Exclusion | 1031 Exchange |
The Bottom Line
If you have significant equity in your home, make sure you have lived there for at least 24 months before selling to unlock that tax-free cash. If you are selling a rental, talk to a CPA about a 1031 Exchange before you list the property—once you close the sale and touch the cash, it’s too late to save on taxes.
Disclaimer: I am a real estate professional, not a CPA or tax attorney. Tax laws are complex and subject to change. Always consult with a qualified tax professional regarding your specific situation.
Categories
Recent Posts










GET MORE INFORMATION

