How Do I Avoid Capital Gains Tax When Selling My House?
For many homeowners, the answer is the home sale exclusion. If the house is your main home and you meet the ownership and use tests, you can generally exclude up to $250,000 of gain from your income, or $500,000 if you're married filing jointly. The IRS explains the rules in Publication 523. I'm a REALTOR, not a tax professional, so use this as a planning guide and check your details with a CPA.
The tests
Under IRS Publication 523, you generally qualify for the full exclusion if:
- Ownership: you owned the home for at least 24 months out of the five years before the sale.
- Use: you lived in it as your main home for at least 24 months of those five years. The months don't have to be consecutive.
- Look-back: you haven't excluded gain on another home sale in the two years before this sale.
For married couples, only one spouse has to meet the ownership test, but both generally need to meet the use test for the $500,000 amount.
Ways to plan ahead
- Count your days. If you're close to the two-year mark, the closing date matters. Talk with me and your CPA before you sign a contract with a date.
- Track your basis. Your gain is based on your sale price minus selling costs minus your adjusted basis. Basis includes what you paid and qualifying improvements, like a new roof or an added bathroom. Keep receipts.
- Know the partial exclusion. If you sell before two years because of certain events, you may qualify for a reduced exclusion. Publication 523 lists the situations and how to calculate it.
- Military and special cases. Service members on qualified extended duty may be able to suspend the five-year test period. There are also rules for care-facility stays.
- Watch rental or business use. If you rented the home or used part of it for business, part of the gain may not qualify. Get advice before listing.
- Inherited or investment properties follow different rules.
When tax may still be due
If your gain exceeds the exclusion, the amount above it is generally taxable. You may also owe tax if you don't meet the tests. For Maryland-specific points, like nonresident withholding, see my post on taxes when selling a house in Maryland.
What I can help with
I can estimate your sale price and net proceeds so your CPA has real numbers to work with. That's a good first step before you pick a listing date.
FAQ
Do I have to report the sale if I owe no tax?
Reporting rules depend on your situation. Ask your tax professional.
Does the exclusion apply to a second home?
Not generally. It applies to your main home.
Can I use the exclusion more than once?
Yes, but generally not more than once in a two-year period.
What if I lived there only 18 months?
You may qualify for a partial exclusion in some situations. Check Publication 523 and your CPA.
Do improvements reduce my gain?
Qualifying improvements can increase your basis, which lowers your gain. Keep records.
Next step
Thinking about selling? See how I price and market homes on my sell page, or request a pricing analysis. Want to talk it through? Grab a free 15-minute call at calendly.com/michaelwaderealtor/15min. No pressure.
Recent Posts











