Capital Gains Tax When Selling Your Home: A 2026 Seller's Guide
Learn how the home sale capital gains exclusion works, who qualifies, and how to estimate your taxable profit before you sell.
By the ListMyHomes.com™ Editorial TeamPublished Last reviewed
Reviewed for compliance by the ListMyHomes.com™ Brokerage Compliance Team
Selling your home can produce a meaningful profit, and many sellers worry about how much of that profit the IRS will take. The good news: most homeowners owe little or nothing thanks to a generous tax break. This guide explains how capital gains tax when selling your home works, who qualifies for the primary-residence exclusion, how to estimate your taxable gain, and what records to gather before you list. Tax rules are complex and change over time, so use this as an overview and confirm the details with a licensed tax professional for your situation.
What Capital Gains Tax Is on a Home Sale
A capital gain is the profit you make when you sell an asset for more than you paid for it. When you sell a home, the gain is the difference between your net sale price and your adjusted cost basis (more on that below). If the home was your primary residence, you may be able to exclude a large portion of that gain from federal income tax.
Two key points shape your tax outcome:
- How long you owned the property. Assets held longer than one year generally qualify for lower long-term capital gains rates than short-term gains, which are taxed as ordinary income.
- Whether the home was your primary residence. Primary residences qualify for a special exclusion that second homes and most investment properties do not.
The Primary-Residence Exclusion
Under the federal home sale exclusion (Section 121 of the tax code), eligible sellers can exclude up to $250,000 of gain from the sale of a primary residence, and up to $500,000 for married couples filing jointly. For many sellers, this wipes out the entire taxable gain.
To qualify, you generally must meet two tests:
- Ownership test: You owned the home for at least two of the five years before the sale.
- Use test: You used the home as your main residence for at least two of the five years before the sale.
The two years do not have to be consecutive. For married couples claiming the full $500,000, both spouses typically must meet the use test and neither can have used the exclusion on another sale within the past two years. There are partial-exclusion rules for sellers who move early due to certain qualifying circumstances such as a job relocation or health reasons—another area where a tax advisor is valuable.
How to Calculate Your Taxable Gain
Your taxable gain is not simply your purchase price subtracted from your sale price. The math looks like this:
- Start with your net sale price: the sale price minus selling costs such as closing costs and agent commissions. (One advantage of selling by owner is avoiding the listing-side commission, which affects your net proceeds.)
- Subtract your adjusted cost basis: your original purchase price plus certain buying costs and the cost of qualifying capital improvements.
- The result is your gain. Apply the exclusion if you qualify, and any remaining gain is potentially taxable.
Your cost basis matters enormously because it reduces your gain. Basis typically includes the original purchase price, some settlement fees paid at purchase, and the cost of permanent improvements that add value or extend the home's life—think a room addition, a new roof, or a renovated kitchen. Routine repairs and maintenance usually do not count. Keeping receipts for improvements over the years can save you thousands at sale time.
Records to Keep Before You Sell
Good documentation is the difference between an easy filing and a stressful one. Before you list, gather:
- Your original closing or settlement statement from when you bought the home.
- Receipts and invoices for capital improvements, with dates.
- Property tax records and any records of depreciation if the home was ever rented or used for business.
- Your final settlement statement at sale, which itemizes selling costs.
If you track these as you go, calculating your adjusted basis becomes straightforward. Our seller closing costs guide breaks down the selling-side expenses that reduce your net proceeds, and the FSBO walkthrough for selling by owner shows how avoiding a listing commission changes your bottom line.
Special Situations to Watch For
A few scenarios change the tax picture:
- Home used as a rental or home office. Depreciation you claimed while renting the property generally cannot be excluded and may be subject to recapture.
- Inherited property. Inherited homes often receive a "stepped-up" basis to the market value at the time of inheritance, which can dramatically reduce gain.
- Selling before two years. Without meeting the ownership and use tests, you may not qualify for the full exclusion, though partial relief sometimes applies.
- State taxes. State treatment of home sale gains varies by location, so factor in both federal and state rules.
Because these situations get complicated quickly, review them with a tax professional before you sign a listing agreement or accept an offer.
Putting It All Together Before You List
Understanding your potential tax picture early helps you price confidently and avoid surprises at closing. Estimate your adjusted basis, apply the exclusion if you qualify, and set expectations for any remaining gain. When you're ready to move forward, you can create a listing and keep more of your proceeds by managing the sale yourself. Pair this with our pricing guide to set a number that reflects both the market and your financial goals.
Frequently Asked Questions
Do I have to pay capital gains tax when I sell my house?
Many sellers owe nothing because the primary-residence exclusion covers up to $250,000 of gain for single filers and $500,000 for married couples filing jointly, provided they meet the ownership and use tests. Any gain above the exclusion may be taxable.
How is my home sale gain calculated?
Your gain equals your net sale price (sale price minus selling costs) minus your adjusted cost basis (purchase price plus qualifying improvements). Keeping improvement receipts raises your basis and lowers your taxable gain.
What if I lived in the home less than two years?
You may not qualify for the full exclusion, but partial exclusions exist for certain qualifying moves such as job relocation or health reasons. A tax professional can confirm whether you qualify and for how much.
Does selling by owner affect my capital gains?
Selling by owner doesn't change the tax rules, but avoiding the listing-side commission increases your net sale price, which can slightly increase your gain. Factor your actual selling costs into the calculation.