Capital Gains Tax on Home Sales: What You Owe
Primary residence exemption, calculation methods, and tax-saving strategies.
When you sell your home for more than you paid for it, the profit is considered a capital gain and may be subject to federal (and possibly state) taxes. However, homeowners have access to one of the most generous tax breaks in the tax code: the primary residence capital gains exclusion.
The Primary Residence Exclusion
$250,000
Single Taxpayers
$500,000
Married Filing Jointly
$250,000
Married Filing Separately
Qualification Requirements
To claim the full exclusion, you must meet both tests:
Ownership Test
- • Owned the home for at least 2 years during the 5-year period ending on sale date
- • Ownership periods don't have to be continuous
- • Military service time may count toward requirement
Use Test
- • Lived in home as primary residence for at least 2 years
- • Temporary absences don't disqualify you
- • The 2 years don't have to be continuous
Frequency Limitation
You can only use this exclusion once every 2 years. If you're married, neither spouse can have used the exclusion in the past 2 years.
Calculating Your Capital Gain
Basic Formula
Original Basis (Increases Value)
- • Purchase price of the home
- • Closing costs when you bought
- • Settlement fees and transfer taxes
Capital Improvements (Add to Basis)
- • Additions (rooms, decks, pools)
- • Major renovations (kitchen, bathroom)
- • Systems upgrades (HVAC, electrical)
- • Permanent fixtures and landscaping
Selling Expenses (Deductible)
Commissions
Listing & buyer's agent (5-6%)
Closing Costs
Title, attorney, transfer taxes
Marketing
Photography, staging, repairs
Example Calculations
Example 1: Married Couple, No Tax Owed
Purchase Info
Sale Info
Gain is less than $500,000 exclusion
Example 2: Single Person, Partial Tax
Purchase Info
Sale Info
Capital Gains Tax Rates (2024)
0%
Rate
Single: Up to $47,025
Married: Up to $94,050
15%
Rate
Single: $47,026 - $518,900
Married: $94,051 - $583,750
20%
Rate
Single: Over $518,900
Married: Over $583,750
Additional Considerations
- • Net Investment Income Tax: Additional 3.8% for high-income taxpayers
- • State taxes: Many states also tax capital gains as ordinary income
- • Depreciation recapture: Taxed at 25% if you claimed depreciation
Special Situations & Partial Exclusions
Partial Exclusions Available
If you don't meet the full 2-year requirement but sell due to:
Job Relocation
50+ miles from old home
Health Reasons
Doctor-recommended move
Unforeseen Events
Divorce, death, unemployment
Calculation Formula
(Months of residence ÷ 24 months) × Full exclusion amount
Military, Foreign Service & Intelligence
- • 5-year period extended by time on qualified duty
- • Can suspend the 5-year test period
- • Applies to spouse as well
Mixed-Use Properties
- • Depreciation claimed must be recaptured
- • Only residential portion qualifies
- • Separate calculations required
Strategies to Maximize Your Exclusion
Timing Your Sale
- • Don't sell too early if close to 2-year mark
- • Consider renting temporarily if you must move
- • Plan around the once-every-2-years limitation
Document Improvements
- • Keep receipts for all capital improvements
- • Distinguish repairs from improvements
- • Include permits and professional installation
Marriage Considerations
- • Married couples get double exclusion ($500,000)
- • Both spouses must meet use test for full exclusion
- • Consider timing of marriage relative to sale
Track Selling Expenses
- • Save all receipts related to the sale
- • Include marketing and staging costs
- • Don't forget professional fees
Essential Record Keeping
Purchase Records
- • Original purchase contract
- • Closing statement (HUD-1)
- • Title insurance policy
- • Mortgage documents
Improvement Records
- • Receipts for improvements
- • Permits and inspections
- • Contractor invoices
- • Before/after photos
Sale Records
- • Sale contract
- • Closing statement
- • Commission agreements
- • Marketing expense receipts
State Tax Considerations
States with No Capital Gains Tax
Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming
States with Capital Gains Tax
- • Most states tax as ordinary income
- • Some offer their own exclusions
- • Consider state implications in timing
Key Takeaways
- Up to $250,000 (single) or $500,000 (married) of gains are tax-free
- Meet the 2-out-of-5-year ownership and use tests
- Document everything - purchase price, improvements, selling expenses
- Consider timing carefully - when you sell impacts tax liability
- Understand your basis - include closing costs and improvements
- Plan for the future - consider how sales fit into overall tax strategy
Protect Your Home Sale Profits
The primary residence capital gains exclusion is one of the most valuable tax benefits available to homeowners. By understanding the rules and planning accordingly, you can minimize or eliminate capital gains taxes on your home sale, keeping more money in your pocket for your next chapter.
This article provides general tax information. Tax laws are complex and change frequently. Always consult with a qualified tax professional for advice specific to your situation.