Capital Gains Tax on Selling Your Home and the $250k/$500k Exclusion
Most sellers of a primary residence pay little or no federal capital gains tax — here's how the $250,000/$500,000 exclusion works and who qualifies.

The short answer
When you sell your main home, federal tax applies only to your gain — the profit — not the full sale price. And a provision called the Section 121 exclusion lets many homeowners keep a large chunk of that gain tax-free. If you qualify, you can generally exclude up to $250,000 of gain if you file single, or up to $500,000 if you're married filing jointly. Gain above the exclusion — or gain that doesn't qualify — is generally taxed at long-term capital gains rates if you owned the home more than a year. A great many people who sell a primary residence owe nothing.
This article is general information, not tax advice. Home-sale rules carry meaningful exceptions — rental or business use, inherited property, divorce, and partial-year moves all change the outcome. Before you rely on any number here, confirm your situation with a CPA or tax professional and IRS Publication 523.
You're taxed on gain, not on the sale price
The single most common misunderstanding is thinking tax applies to what the house sold for. It doesn't. The taxable figure is your gain, calculated roughly like this:
- Amount realized = sale price − selling expenses (real-estate commission, transfer taxes, certain closing costs)
- Adjusted basis = original purchase price + qualifying improvements − adjustments such as depreciation previously claimed
- Gain = amount realized − adjusted basis
Two practical points follow. First, capital improvements raise your basis and shrink your gain — a new roof, an addition, or a remodel counts, but routine repairs generally don't. Keep receipts. Second, selling costs reduce your amount realized, so document the commission and closing costs. Because a real-estate commission is one of those selling expenses, keeping it low leaves more proceeds in your pocket at closing; a discount listing option such as Home Stimulus's 1% listing fee is one way sellers reduce that cost.
A simplified illustration (hypothetical numbers)
Imagine a married couple bought for $400,000, spent $60,000 on a qualifying addition, and later sold for $900,000 with $54,000 in selling costs. Amount realized is $846,000; adjusted basis is $460,000; gain is $386,000. Because that's under the $500,000 joint exclusion and they meet the tests below, the entire gain could be excluded — $0 federal capital gains tax. These figures are illustrative only, not a real case.
Do you qualify? The ownership and use tests
To claim the exclusion, you generally must pass two tests for the same property, looking back over the five-year period ending on the sale date:
- Ownership test — you owned the home for at least two years (a total of 24 months, not necessarily continuous) during that five-year window.
- Use test — you lived in it as your main home for at least two years during that same window.
- Frequency (look-back) rule — you generally can't have claimed a Section 121 exclusion on the sale of another home in the two years before this sale.
For the $500,000 joint amount, the rules are stricter: only one spouse needs to meet the ownership test, but both spouses must meet the use test, and neither spouse may have used the exclusion within the prior two years. If only one spouse qualifies, a couple may still be able to claim up to $250,000.
When you get a smaller (partial) exclusion
If you have to sell before meeting the two-year tests, you may still qualify for a reduced exclusion, prorated by the time or portion of the requirement you did meet. The tax rules recognize three broad triggers: a change in place of employment, health reasons, or certain unforeseen circumstances. Publication 523 spells out safe-harbor situations and includes worksheets to compute the partial amount. Whether your reason qualifies is fact-specific — flag this one for a professional.
Situations that reduce or eliminate the exclusion
Several circumstances can pull part of your gain outside the exclusion:
- Depreciation recapture. If you claimed depreciation on the home — for a home office or when it was a rental — depreciation taken after May 6, 1997 generally cannot be excluded. That "unrecaptured Section 1250 gain" is taxed, at a maximum rate of 25%.
- Nonqualified use. Periods after 2008 when the property was not your main home (for example, years it was a rental before you moved in) can make a proportionate share of the gain non-excludable.
- Second homes and investment properties don't qualify for Section 121 at all. A separate mechanism, a 1031 like-kind exchange, may defer tax on investment property — but that's a different set of rules.
- Losses on a personal residence are not deductible. If you sell your main home at a loss, you generally can't write it off.
What rate applies to the taxable portion
Gain that exceeds the exclusion is taxed under the normal capital gains framework:
- Long-term rates (held more than one year): 0%, 15%, or 20%, depending on your taxable income. The income thresholds that separate those brackets are adjusted annually.
- Short-term (held one year or less): taxed as ordinary income.
- Net Investment Income Tax (NIIT): an additional 3.8% may apply to taxable home-sale gain for higher-income taxpayers above certain modified-adjusted-gross-income thresholds.
- Depreciation recapture: taxed at up to 25%, as noted above.
State taxes vary — check your state
Federal rules are only half the picture. Many states tax capital gains as ordinary income, a few states have no state income tax, and some offer their own exclusions or adjustments. Rates and conformity to the federal exclusion vary by state, so check your state department of revenue or a local tax professional for the rules where the property sits.
Do you even have to report the sale?
If your entire gain is excludable and you did not receive a Form 1099-S for the sale, you generally don't have to report it on your return. Otherwise — if any gain is taxable, or you received a 1099-S — you typically report the sale on Form 8949 and Schedule D. Either way, keep your purchase records, improvement receipts, and closing statements; the burden of proving basis is on the taxpayer.
Special situations to raise with a professional
These come up often and each has its own rules:
- Surviving spouse. A widow or widower may be able to use the $500,000 amount if the home is sold within two years of the spouse's death and other conditions are met.
- Inherited home. Basis is generally "stepped up" to fair market value at the date of death, which often leaves little or no gain when heirs sell.
- Divorce and transfers between spouses. Time the ex-spouse owned or lived in the home may count in certain cases.
- Military and Foreign Service members may be able to suspend the five-year test for periods of qualified official duty.
Bottom line
For most people selling a primary residence they've lived in for at least two of the last five years, the Section 121 exclusion wipes out federal capital gains tax entirely, and any tax that remains falls only on the gain above the limit. The details — depreciation, partial exclusions, state rules, inherited or converted property — are where mistakes happen. Run your specific numbers against IRS Publication 523 and a qualified tax professional before you file.
Frequently asked questions
- How much of my home-sale profit is tax-free?
- If you qualify for the Section 121 exclusion, you can generally exclude up to $250,000 of gain if you file single, or up to $500,000 if you are married filing jointly. Only gain above that amount — or gain that does not qualify — is potentially taxable. Remember the exclusion applies to your gain (sale price minus selling costs and adjusted basis), not to the full sale price.
- What are the ownership and use tests for the exclusion?
- You generally must have owned the home for at least two years and lived in it as your main home for at least two years, both measured within the five-year period ending on the sale date. The two years of ownership and use do not have to be continuous. You also generally cannot have claimed the exclusion on another home sale in the two years before this sale.
- Do I owe capital gains tax if my gain is more than the exclusion?
- The portion of gain above your exclusion is generally taxed at long-term capital gains rates of 0%, 15%, or 20%, depending on your taxable income, if you owned the home more than a year. Higher-income taxpayers may owe an additional 3.8% Net Investment Income Tax, and any depreciation you previously claimed can be taxed at up to 25%. State taxes may also apply.
- Can I still get an exclusion if I sell before living there two years?
- Possibly. If you sell early because of a change in place of employment, health reasons, or certain unforeseen circumstances, you may qualify for a reduced (prorated) exclusion. IRS Publication 523 lists safe-harbor situations and provides worksheets. Because eligibility is fact-specific, review it with a tax professional.
- Do I have to report the sale on my tax return?
- If your entire gain is excludable and you did not receive a Form 1099-S, you generally do not have to report the sale. If any gain is taxable, or you received a Form 1099-S, you typically report it on Form 8949 and Schedule D. Keep records of your purchase price, improvements, and selling costs to support your basis.
Sources
- Publication 523, Selling Your Home — Internal Revenue Service Official source
- Topic No. 701, Sale of Your Home — Internal Revenue Service Official source
- 26 U.S. Code § 121 - Exclusion of gain from sale of principal residence — Cornell Law School, Legal Information Institute Reporting
- Topic No. 409, Capital Gains and Losses — Internal Revenue Service Official source
- Topic No. 559, Net Investment Income Tax — Internal Revenue Service Official source




