How to Avoid (or Reduce) Capital Gains Tax When Selling a House

A plain-English guide to the IRS rules that protect most home sellers — and the strategies that help when your gain exceeds the exclusion.

Blog  ·  Tax Strategy  ·  May 9, 2026  ·  8 min read

Capital gains tax is one of the most common worries homeowners bring up when they're thinking about selling. The fear is understandable: if you bought your house for $180,000 and it's now worth $420,000, it feels like the IRS is going to take a big chunk of that $240,000 gain. In most cases, they won't — because of a powerful tax exclusion most homeowners don't fully understand. This guide explains how it works, when it applies, and what your options are when your situation is more complicated.

The Primary Residence Exclusion: The IRS Rule That Saves Most Sellers

Under IRC Section 121, if you've owned your home and used it as your primary residence for at least 2 of the last 5 years before the sale, you can exclude up to $250,000 of capital gains from your taxable income. If you're married and file jointly, that exclusion doubles to $500,000. This exclusion applies to the gain — the difference between your adjusted cost basis (typically what you paid, plus the cost of major improvements) and your sale price. For the majority of American homeowners selling a house they've lived in for years, this exclusion completely eliminates capital gains tax on the sale.

Example: You bought your home in 2014 for $210,000. You're married and have lived there since. You sell in 2026 for $480,000. Your gain is $270,000. The $500,000 married exclusion covers it entirely — you owe $0 in federal capital gains tax on the sale.

Calculating Your Adjusted Cost Basis

Your cost basis isn't just the purchase price. You can add to it: the cost of major capital improvements (new roof, kitchen remodel, addition, HVAC replacement), certain closing costs from the original purchase, and in some cases, the cost of selling the home. These additions reduce your taxable gain. Keep records of major home improvements — receipts, permits, contractor invoices. For a home that's appreciated significantly, these records can be worth real money at tax time.

When You Don't Qualify for the Full Exclusion

The exclusion has requirements. You must have owned and used the home as your primary residence for at least 24 months out of the last 60 months before the sale date. Those 24 months don't have to be consecutive. You can't have claimed this exclusion on another home sale in the past 2 years. If you don't fully meet the use/ownership test — for example, if you're selling due to a job change, health reason, or unforeseen circumstance — you may qualify for a partial exclusion. The IRS allows a prorated exclusion in these situations.

Strategies When Your Gain Exceeds the Exclusion

If you're in a high-appreciation market and your gain will exceed $250,000 (single) or $500,000 (married), there are several legitimate strategies to consider. 1031 Exchange: If the property was used as a rental at any point, you may be able to defer capital gains by rolling the proceeds into another investment property under a 1031 exchange. Strict timelines apply (45 days to identify replacement property, 180 days to close). Installment sale: Instead of receiving the full purchase price at closing, you receive payments over time — spreading the taxable gain across multiple tax years, potentially keeping you in a lower bracket each year. Opportunity Zone investment: Investing proceeds in a Qualified Opportunity Zone fund can defer and potentially reduce capital gains. Timing the sale: If you're close to the 2-year ownership/use threshold, waiting a few months to meet it can be worth tens of thousands of dollars in tax savings.

Get a no-obligation cash offer

We buy houses in any condition. Cash in hand, close in as few as 19 days.

Call (423) 600-5682

Inherited Properties: The Stepped-Up Basis Advantage

If you inherited the home rather than buying it, the tax treatment is different and often very favorable. Inherited property receives a "stepped-up" cost basis equal to the fair market value on the date of the original owner's death — not what they originally paid. If your parent bought the house for $80,000 in 1985 and it was worth $320,000 when they passed, your cost basis is $320,000. If you sell for $340,000, your taxable gain is only $20,000, not $260,000. In many cases, selling shortly after inheriting means no capital gains at all.

Cash Sales and Capital Gains: No Special Rules

Some homeowners wonder whether selling to a cash buyer triggers different tax treatment. It doesn't. Capital gains tax is calculated the same way regardless of how you receive payment — lump sum at closing, installment payments, or any other structure. The same exclusions and strategies apply. The only difference is timing: a cash sale typically closes faster, which may affect which tax year the gain falls in — sometimes a meaningful consideration if your income is expected to change year to year.

Work with a CPA, Not Just a Realtor

Real estate agents are not tax advisors, and their guidance on capital gains is often incomplete or wrong. Before selling a home with significant appreciation — especially if you've rented it at any point, own it jointly with someone else, or inherited it — spend an hour with a CPA who specializes in real estate. The cost of that consultation is typically $200–$400. The tax savings from getting it right can be tens of thousands of dollars.

Frequently asked questions

Does the capital gains exclusion apply if I sold recently and bought this house?

You can only use the primary residence exclusion once every two years. If you sold another home and claimed the exclusion within the last two years, you'll need to wait before using it again.

What if I rented out part of my home?

If you rented a portion of your home (a basement apartment, for example), the exclusion applies only to the portion you used as your primary residence. The rental portion may be subject to different tax treatment. Talk to a CPA for your specific allocation.

How is capital gains tax calculated on a house sale?

Long-term capital gains (on assets held over 1 year) are taxed at 0%, 15%, or 20% depending on your income. Most sellers fall into the 15% bracket. Add your state's capital gains rate (which varies widely) for your total rate. This is applied to your taxable gain after the exclusion and after subtracting your adjusted cost basis.

Do I need to report the sale on my tax return if I owe no tax?

If your gain is fully covered by the exclusion, you generally don't need to report the sale. However, if you received a 1099-S from the closing, you may need to file to demonstrate the exclusion applies. Ask your CPA.

Ready to talk through your situation?

No pressure, no obligation. Just a quick conversation and a fair cash offer within 24 hours.

Call (423) 600-5682

We Buy Houses in Cities Like Yours

Trusty House Buyers purchases homes for cash nationwide — no repairs, no fees, no waiting.

Sell My House Fast Denver, CO Sell My House Fast Seattle, WA Sell My House Fast Nashville, TN Sell My House Fast Atlanta, GA Sell My House Fast Dallas, TX Sell My House Fast Sacramento, CA

View all locations we serve →