HonestCasa logoHonestCasa
Capital Gains Home Sale

Capital Gains Home Sale

A plain-English guide to capital gains tax when selling your home, including the $250K/$500K exclusion, how to calculate your gain, and strategies to minimize your tax bill.

February 16, 2026

Key Takeaways

  • Expert insights on capital gains home sale
  • Actionable strategies you can implement today
  • Real examples and practical advice

Capital Gains Tax on Selling Your Home: What You'll Owe (and How to Pay Less)

You're selling your house, and the big question after "how much will I get?" is "how much will the IRS take?" The good news: most homeowners pay zero federal capital gains tax when selling their primary residence, thanks to a generous exclusion. The bad news: if you don't qualify for that exclusion — or your profit exceeds it — you could owe tens of thousands in taxes.

Here's exactly how it works.

What Is Capital Gains Tax?

Capital gains tax is a tax on profit from selling an asset. When you sell your home for more than you paid for it (adjusted for certain costs), the difference is a capital gain, and the IRS wants a cut.

There are two types:

  • Short-term capital gains apply to assets held for one year or less. These are taxed at your ordinary income tax rate (10% to 37% for federal taxes in 2026).
  • Long-term capital gains apply to assets held for more than one year. These get preferential tax rates: 0%, 15%, or 20%, depending on your taxable income.

Most homeowners sell after owning for several years, so long-term rates usually apply.

The Section 121 Exclusion: Your Best Friend

Internal Revenue Code Section 121 lets you exclude up to $250,000 in capital gains ($500,000 for married couples filing jointly) from your income when you sell your primary residence. This is not a deduction — it's a full exclusion. The gain simply doesn't count as taxable income.

Who Qualifies

To claim the full exclusion, you must meet three tests:

1. Ownership Test You must have owned the home for at least 2 of the 5 years before the sale.

2. Use Test You must have lived in the home as your primary residence for at least 2 of the 5 years before the sale. The 2 years don't need to be consecutive — 24 months total within the 5-year window counts.

3. Frequency Test You haven't excluded gain from another home sale in the 2 years before this sale.

The Numbers

For most Americans, the exclusion wipes out any tax liability entirely. Consider: the median U.S. home sale price in late 2025 was approximately $400,000. If you bought that home for $250,000 and sell for $400,000, your gain is $150,000 — well under the $250,000 single/$500,000 married exclusion.

You'd owe $0 in federal capital gains tax.

How to Calculate Your Capital Gain

Your capital gain is not simply the sale price minus what you paid. Here's the actual formula:

Capital Gain = Sale Price − Selling Costs − Adjusted Basis

Step 1: Determine Your Adjusted Basis

Your basis starts with what you paid for the home (the purchase price), then gets adjusted:

Add to your basis:

  • Closing costs when you bought ([title insurance](/blog/title-search-explained), attorney fees, recording fees — but NOT prepaid taxes or insurance)
  • Capital improvements you made during ownership

Capital improvements are upgrades that add value, prolong the home's life, or adapt it to new uses. Examples:

  • Kitchen or bathroom remodel
  • New roof
  • Room addition
  • New HVAC system
  • Finished basement
  • New windows or siding
  • Landscaping (permanent, not routine maintenance)

Not capital improvements (these are maintenance and don't increase your basis):

  • Painting
  • Fixing leaks
  • Replacing broken fixtures
  • Routine HVAC servicing

Keep receipts. The IRS won't add improvements to your basis without documentation.

Step 2: Subtract Selling Costs

Selling costs (also called costs of sale) reduce your gain. These include:

  • Real estate agent commissions
  • Title insurance and transfer taxes
  • Attorney fees
  • Staging costs
  • Repair credits given to the buyer

Step 3: Do the Math

Example:

  • Purchase price: $300,000

  • Closing costs at purchase: $6,000

  • Capital improvements (new roof + kitchen remodel): $45,000

  • Adjusted basis: $351,000

  • Sale price: $550,000

  • Agent commission (4.5%): $24,750

  • Other selling costs: $5,000

  • Net sale price: $520,250

  • Capital gain: $520,250 − $351,000 = $169,250

If you're single, the $250,000 exclusion covers this entirely. Tax owed: $0.

If your gain were $300,000 and you're single, you'd owe tax on $50,000 ($300,000 − $250,000 exclusion).

Capital Gains Tax Rates for 2026

If your gain exceeds the exclusion, you'll pay long-term capital gains tax on the excess. The 2026 rates:

Filing Status0% Rate15% Rate20% Rate
SingleUp to ~$48,350$48,351–$533,400Over $533,400
Married Filing JointlyUp to ~$96,700$96,701–$600,050Over $600,050

These thresholds are based on your total taxable income, not just the capital gain.

There's also the Net Investment Income Tax (NIIT) — an additional 3.8% surtax on investment income (including capital gains) for individuals with modified adjusted gross income above $200,000 ($250,000 married filing jointly). This can bring the effective top rate to 23.8%.

Special Situations

You Don't Meet the 2-Year Requirement

If you owned or lived in the home for less than 2 years, you may qualify for a partial exclusion if you sold due to:

  • A job change (new workplace is at least 50 miles farther from your home than your old workplace)
  • Health reasons (a doctor recommended the move)
  • Unforeseen circumstances (death, divorce, natural disaster, etc.)

The partial exclusion is prorated. If you lived in the home for 1 year out of the required 2, you get 50% of the full exclusion: $125,000 (single) or $250,000 (married).

You Used Part of the Home for Business

If you claimed a home office deduction, the rules depend on how the space was used:

  • Home office within the home (a room used exclusively for business): You can still claim the full exclusion on the entire gain, BUT you must recapture depreciation claimed on the office space. That [depreciation recapture](/blog/depreciation-real-estate-guide) is taxed at 25%.
  • Separate structure (detached office, guest house used as business): The business portion doesn't qualify for the exclusion.

You Rented the Home for a Period

If you lived in the home for 2 of the last 5 years but rented it out for part of that time, you still qualify for the exclusion. However, gain attributable to "nonqualified use" after 2008 may not be excludable.

Nonqualified use = time the home was not your primary residence (with exceptions for certain absences). The portion of gain allocated to nonqualified use periods is taxed as a capital gain.

Example: You owned a home for 10 years. You lived in it for 6 years and rented it for 4 years. The nonqualified use ratio is 4/10, so 40% of your gain would not qualify for the exclusion.

Divorce

If you received the home in a divorce, your ownership period includes the time your ex-spouse owned it. If you're required to allow your ex to live in the home as part of the divorce decree, their time living there counts toward your use requirement.

Military, Foreign Service, and Intelligence Community

If you're on qualified extended duty, you can suspend the 5-year test period for up to 10 years. This means you could be away from home for up to 13 years and still meet the 2-out-of-5-year use test.

Inherited Homes

If you inherited the home, your basis is generally the fair market value at the date of death (stepped-up basis), not what the original owner paid. This can dramatically reduce or eliminate your gain. We cover this in detail in our [guide to [selling inherited property](/blog/selling-inherited-property)](/blog/selling-inherited-property).

State Capital Gains Taxes

Federal taxes are only part of the picture. Most states tax capital gains as ordinary income. Some notable examples:

  • California: Up to 13.3% (no special capital gains rate)
  • New York: Up to 10.9%, plus NYC adds up to 3.876%
  • Texas, Florida, Nevada, Washington: No [state income tax](/blog/states-with-no-income-tax-investing) (though Washington taxes capital gains above $270,000 at 7%)
  • Colorado, Utah, Illinois: Flat rates of 4.4%, 4.65%, and 4.95% respectively

Your total tax bill on a home sale could be the federal rate plus your state rate. On a large gain in California, you could face a combined rate exceeding 35%.

Strategies to Minimize Capital Gains Tax

1. Make Sure You Qualify for the Exclusion

The single most valuable thing you can do is meet the 2-out-of-5-year ownership and use tests. If you're close to the 2-year mark, waiting a few months to sell can save you six figures in taxes.

2. Track Every Capital Improvement

Start a file today. Every time you replace a roof, remodel a bathroom, or install new windows, save the receipts and note the date. These improvements increase your basis and reduce your taxable gain.

3. Time the Sale

If you're near a tax bracket threshold, timing matters. Selling in a year when your other income is lower can keep your capital gains rate at 0% or 15% instead of 20%.

4. Use a [1031 Exchange](/blog/1031-exchange-guide) (Investment Property Only)

Section 121 is for primary residences. If you're selling a rental or investment property, a 1031 exchange lets you [defer capital gains](/blog/1031-exchange-vs-opportunity-zones) by reinvesting in a like-kind property. This doesn't apply to your primary home, but if you converted your home to a rental, it might apply to the non-excluded portion.

5. Offset Gains with Losses

Capital losses from stocks or other investments can offset capital gains from your home sale (for the portion not covered by the exclusion). If you have losing investments, selling them in the same year as your home can reduce your net capital gain.

6. Consider an Installment Sale

If you finance part of the sale ([seller financing](/blog/seller-financing-guide)), you can spread the gain across multiple tax years using the installment method. This can keep you in lower tax brackets each year.

Reporting the Sale on Your Tax Return

If your gain is fully covered by the Section 121 exclusion, you generally don't need to report the sale on your tax return at all — unless you received a Form 1099-S from the closing agent.

If you received a 1099-S or your gain exceeds the exclusion:

  1. Report the sale on Schedule D (Capital Gains and Losses)
  2. Complete Form 8949 (Sales and Other Dispositions of Capital Assets)
  3. If you're claiming a partial exclusion, include a statement explaining your qualifying circumstance

Frequently Asked Questions

Do I have to pay capital gains tax on my home sale?

Most homeowners don't. If you owned and lived in the home for at least 2 of the last 5 years, you can exclude up to $250,000 in gains ($500,000 if married filing jointly). Only gains exceeding that exclusion are taxed.

How long do I need to live in my house to [avoid capital gains tax](/blog/home-sale-exclusion-guide)?

At least 2 years out of the 5 years preceding the sale. The 2 years don't need to be consecutive.

Can I use the Section 121 exclusion more than once?

Yes, but not more than once every 2 years. If you excluded gain on a previous home sale within the last 2 years, you can't use the full exclusion again (though a partial exclusion may apply in certain circumstances).

What if my spouse and I file separately?

Each spouse can exclude up to $250,000 if they individually meet the ownership and use tests. Filing separately doesn't reduce your total exclusion — you just each claim $250,000 instead of a combined $500,000.

Do I owe capital gains tax if I sell at a loss?

No. And unfortunately, you can't deduct a loss on the sale of a personal residence either. Losses on personal-use property are not tax-deductible.

What about depreciation recapture?

If you claimed depreciation on part of your home (home office, rental use), that depreciation is "recaptured" and taxed at up to 25%, regardless of the Section 121 exclusion. You can't exclude depreciation recapture.

Should I talk to a tax professional?

If your gain might exceed the exclusion, you converted the home from a rental, you have a home office, or your situation involves divorce or inheritance — yes. A CPA or tax attorney can save you far more than their fee.

The Bottom Line

For most homeowners selling a primary residence, capital gains tax is a non-issue thanks to the Section 121 exclusion. But if you've seen significant appreciation, have a complex ownership history, or don't meet the 2-year requirements, the tax bill can be substantial.

Know your numbers before you sell. Calculate your adjusted basis, understand your exclusion eligibility, and talk to a tax professional if anything is unclear. The time to plan is before you list — not after you close.

This article is for informational purposes only and does not constitute tax advice. Consult a qualified tax professional for guidance on your specific situation.

Related Articles

Get more content like this

Get daily real estate insights delivered to your inbox

Ready to Unlock Your Home Equity?

Calculate how much you can borrow in under 2 minutes. No credit impact.

Try Our Free Calculator →

✓ Free forever  •  ✓ No credit check  •  ✓ Takes 2 minutes

Found this helpful? Share it!

Ready to Get Started?

Join thousands of homeowners who have unlocked their home equity with HonestCasa.