Selling a home can trigger a tax bill that surprises people. If you are in the U.S., the good news is the capital gains exclusion is powerful, but only if you follow the rules and track your basis correctly. This guide shows exactly how home sale taxes work in 2026 and how to keep more of your profit.
Summary Most homeowners owe zero federal capital gains tax on a home sale if they meet the 2-year rule and stay under the exclusion limit. Your taxable gain is based on your selling price minus your adjusted basis, not your original purchase price.
Table of Contents
- Quick Answer: Do You Pay Capital Gains When You Sell a Home?
- The GAIN Formula You Must Know
- The Home Sale Exclusion Explained
- Step 1: Calculate Your Selling Price
- Step 2: Calculate Your Adjusted Basis
- Step 3: Apply the Exclusion
- Special Situations: Partial Exclusions and Exceptions
- When Capital Gains Become Taxable
- How to Reduce or Avoid Home Sale Taxes
- Examples for Real Homeowners
- Common Mistakes and Audit Risks
- FAQs
- Updated for 2026: What to Watch
- Change Log
Quick Answer: Do You Pay Capital Gains When You Sell a Home?
Usually no if you meet the IRS home sale exclusion rules. Most homeowners can exclude:
- Up to $250,000 of gain if single
- Up to $500,000 if married filing jointly
If your gain is higher than the exclusion or you do not meet the 2-year rule, part of the gain may be taxable.
For the rule itself, see 2-Year Rule for Home Sale Taxes.
The GAIN Formula You Must Know
Use this formula to determine taxable gain:
Selling price
- Selling costs (agent commissions, escrow, transfer fees)
= Amount realized
Amount realized
- Adjusted basis (purchase price + improvements - certain credits)
= Capital gain
Then apply the exclusion if you qualify.
Caption: Your taxable gain is selling price minus adjusted basis, not just selling price minus purchase price.
The Home Sale Exclusion Explained
The IRS allows a capital gains exclusion if all of the following are true:
- You owned the home for at least two years
- You lived in the home as your primary residence for at least two years
- You have not claimed the exclusion within the past two years
The ownership and use tests do not have to be consecutive, but they must fall within the five years before the sale.
Step 1: Calculate Your Selling Price
Your selling price is what the buyer paid, but your amount realized is lower because you subtract selling costs.
Common selling costs:
- Real estate agent commissions
- Escrow and title fees
- Transfer taxes and recording fees
- Attorney fees (if required in your state)
These costs reduce your gain and are critical to document.
Step 2: Calculate Your Adjusted Basis
Your adjusted basis starts with your purchase price and then changes over time.
Add to basis:
- Purchase price
- Closing costs that increase basis (title, legal, recording)
- Capital improvements (new roof, kitchen remodel, room additions)
Subtract from basis:
- Any credits or rebates tied to the home
- Casualty loss deductions previously claimed
- Depreciation taken for business or rental use
Repairs vs improvements:
Repairs (fixing a leak) do not increase basis. Improvements (adding a deck) do.
Step 3: Apply the Exclusion
Once you calculate your gain, apply the exclusion:
Taxable gain = Capital gain - Exclusion amount
If your taxable gain is zero or negative, you owe no federal capital gains tax on the sale.
Special Situations: Partial Exclusions and Exceptions
You may qualify for a partial exclusion if you sell before meeting the 2-year rule due to:
- A job change with a significant distance requirement
- Health-related moves
- Certain unforeseen circumstances (divorce, disaster, death)
The partial exclusion is pro-rated based on how long you met the ownership and use tests.
When Capital Gains Become Taxable
You may owe tax if:
- Your gain exceeds the exclusion limit
- You fail the 2-year rule and do not qualify for a partial exclusion
- The property was mostly rental or business use
- You claimed depreciation and must recapture it
Depreciation recapture is taxed separately and can apply even if you qualify for the home sale exclusion.
How to Reduce or Avoid Home Sale Taxes
1. Track your improvements.
Every qualifying improvement increases basis and reduces taxable gain.
2. Time the sale to meet the 2-year rule.
Even a few extra months can unlock the exclusion.
3. Use the exclusion strategically.
If you move frequently, plan your sale timeline to avoid using the exclusion too often.
4. Allocate mixed-use correctly.
If you rented part of the home, separate the rental portion and track depreciation.
5. Document selling costs.
Every commission and fee reduces your gain.
Try the tool
Examples for Real Homeowners
Example 1: Married Couple Under the Exclusion
Alex and Priya sell their home for $800,000.
They bought it for $500,000 and spent $40,000 on improvements.
Selling costs were $50,000.
Adjusted basis: $540,000
Amount realized: $750,000
Capital gain: $210,000
Exclusion: $500,000
Taxable gain: $0
Example 2: Single Homeowner Above the Exclusion
Jordan sells a home for $1,000,000.
Purchase price was $450,000, improvements were $60,000, selling costs were $60,000.
Adjusted basis: $510,000
Amount realized: $940,000
Capital gain: $430,000
Exclusion: $250,000
Taxable gain: $180,000
Example 3: Partial Exclusion
Maya sells after 18 months due to a qualifying job relocation.
She meets 75 percent of the two-year requirement.
If her maximum exclusion is $250,000, her partial exclusion is $187,500.
Common Mistakes and Audit Risks
- Forgetting to include selling costs
- Failing to track improvement receipts
- Confusing repairs with improvements
- Claiming the exclusion twice within two years
- Ignoring depreciation recapture from rental use
FAQs
Do I need to report the sale if the gain is excluded?
Often yes, especially if you receive Form 1099-S. Tax software will guide you on the reporting requirement.
Can I exclude gain on a second home?
Not unless it qualifies as your primary residence for the required period.
Does the exclusion apply to state taxes?
State tax rules vary. Some states follow the federal exclusion, some do not.
What if I inherited the home?
Inherited property receives a stepped-up basis, which can reduce gain. See Stepped-Up Basis Explained for details.
Updated for 2026: What to Watch
Home sale rules can shift with tax law changes. In 2026:
- Watch for updates to exclusion limits or eligibility rules
- Track changes to capital gains rates
- Monitor IRS guidance on mixed-use properties
Change Log
- 2026-02-09: Initial 2026 edition with basis examples and exclusion rules.
Sources: IRS Publication 523, IRS Topic 701, Schedule D instructions.