Ways to Avoid Capital Gains Tax on Property Sales

You Don’t Have to Give Away Your Profit When You Sell

You worked hard to build equity in that property. The last thing you want is to hand a big chunk of it to the IRS the moment you sell. I’ve been there — staring at a tax bill after a sale and feeling like all that work barely counted. But here’s the thing: capital gains tax on property is often avoidable if you plan ahead. Let me show you exactly how.

What Is Capital Gains Tax on Property Sales?

The Simple Definition You Need to Know

A capital gain happens when you sell a property for more than you paid for it. That difference — the profit — is what the IRS taxes. It sounds simple, but the rate you pay depends on a few important factors.

If you owned the property for less than a year, you’ll owe short-term capital gains tax, which is taxed like regular income — anywhere from 10% to 37%. But if you held it for more than one year, you qualify for long-term capital gains tax, which runs from 0% to 20% depending on your income. That’s a huge difference, and timing matters a lot.

Short-Term vs. Long-Term Capital Gains: A Quick Comparison

Type Holding Period Tax Rate Who It Affects
Short-Term Less than 1 year 10%–37% (ordinary income) Quick flippers, early sellers
Long-Term More than 1 year 0%, 15%, or 20% Most homeowners and investors
Primary Home Exclusion 2+ years ownership & use $0 on up to $250K–$500K Homeowners selling main home

The Primary Residence Exclusion — Your Biggest Tax Break

How the Home Sale Exclusion Works

This is the most powerful tool most homeowners have. According to IRS Topic No. 701, if you sell your primary residence, you can exclude up to $250,000 of capital gains from your taxable income — or $500,000 if you’re married filing jointly. That’s potentially a tax-free profit on the biggest sale of your life.

To qualify, you need to pass two tests. First, the ownership test: you must have owned the home for at least 2 of the last 5 years. Second, the use test: you must have lived in it as your primary home for at least 2 of the last 5 years. You don’t need to live there for 2 consecutive years — just 2 total within that 5-year window.

I know a couple who bought their home for $400,000, lived in it for three years, and sold for $850,000. Since they filed jointly, they excluded $500,000 of the $450,000 gain — meaning they owed zero capital gains tax. That’s the power of planning your sale around this rule.

Who Qualifies and Common Exceptions

This exclusion only applies to your main home — not vacation homes or rental properties. You can also only use it once every two years. Military personnel and federal employees may get extra time under qualified extended duty rules, which gives more flexibility if you’ve been away for service.

  • Must be your primary residence, not a second home or rental
  • You must have lived there for at least 2 out of the past 5 years
  • You can only claim the exclusion once every 2 years
  • Partial exclusion may apply if you had to sell early due to job change, illness, or unforeseen events

    Use a 1031 Exchange to Defer Taxes on Investment Properties

Use a 1031 Exchange to Defer Taxes on Investment Properties

What Is a 1031 Exchange?

If your property is an investment or rental — not your main home — the primary residence exclusion won’t help. But a 1031 exchange might. This strategy, named after IRS Internal Revenue Code Section 1031, lets you sell one investment property and roll the entire profit into a “like-kind” replacement property — without paying capital gains tax right away.

The tax doesn’t disappear — it gets deferred until you eventually sell the new property without doing another exchange. But smart investors have been doing 1031 exchange after 1031 exchange for decades, essentially never paying the tax while continuing to build wealth. It’s one of the most used strategies in real estate investing.

The Rules You Must Follow for a 1031 Exchange

The IRS has strict timing rules. After selling your property, you have 45 days to identify a replacement property and 180 days to close on it. You must use a Qualified Intermediary (QI) to hold the sale proceeds — you can’t touch the money yourself. If you take any cash out (called “boot”), that portion gets taxed.

This is one strategy where working with a tax advisor pays for itself many times over. A small mistake in the timeline or paperwork can void the whole exchange. Understanding investment property strategies like this is also covered in our guide on buying property under an LLC, which often goes hand in hand with tax deferral planning.

Increase Your Cost Basis to Reduce the Taxable Gain

What Is Cost Basis and Why It Matters

Your adjusted cost basis is essentially what the IRS considers you “spent” on the property. The higher your cost basis, the smaller your taxable gain when you sell. Most people only count the original purchase price, but you can add a lot more.

Any major improvement you made to the property can be added to your basis. This includes things like a new roof, a kitchen remodel, a bathroom addition, new HVAC, or adding a deck. Routine repairs — like fixing a leaky faucet — don’t count. But capital improvements do, and they can significantly reduce your tax bill at sale time.

You can also add certain closing costs from when you bought the property — things like title insurance, recording fees, and legal fees. And when you sell, the costs of the sale (agent commissions, staging, transfer taxes) are subtracted from your sale price before calculating the gain. Keep good records from day one — this is one area where being organized saves you real money.

Improvements That Boost Your Basis

  • Room additions or structural expansions
  • New roof, siding, or windows
  • Kitchen or bathroom remodeling
  • New HVAC system or water heater
  • Landscaping, fences, driveways
  • Installing solar panels or home systems

This is especially relevant if you’ve done significant work to your home over the years. Every receipt you saved could reduce your tax bill when it’s time to sell. If you’re also thinking about the financial side of improvements before a sale, check out our post on how to estimate ROI on rental property renovations to see what actually pays off.

Time Your Sale Strategically to Lower Your Tax Rate

Sell in a Low-Income Year

Here’s something a lot of people overlook: the capital gains rate you pay depends on your total taxable income in the year you sell. If you’re in a year where your income is lower — maybe you changed jobs, retired, or took time off — your capital gains rate could be lower too. In 2025, if your taxable income is below $48,350 (single) or $96,700 (married filing jointly), your long-term capital gains rate is 0%.

That means timing your sale for a low-income year could legally result in zero tax on the gain. This takes planning, but it’s 100% legal and used by smart investors all the time.

Hold the Property for More Than One Year

This one is simple but often ignored by newer investors. If you’re going to sell anyway, wait until you’ve owned the property for at least 12 months. The difference between being taxed at ordinary income rates (up to 37%) versus long-term capital gains rates (15%–20% for most people) can be tens of thousands of dollars on a large sale.

Other Legal Strategies Worth Knowing

Step-Up in Basis Through Inheritance

When someone inherits a property, the IRS “steps up” the cost basis to the fair market value at the time of the original owner’s death. If the property has appreciated a lot over the years, the heirs can sell it shortly after inheriting it and owe little or no capital gains tax — because their basis starts at today’s value, not what it was bought for decades ago. This is one of the reasons estate planning around real estate can make a major difference for families.

Installment Sales — Spread the Gain Over Time

Instead of receiving the full sale price at once, you can structure an installment sale where the buyer pays you over several years. You only report the portion of the gain you receive each year, which may keep you in a lower tax bracket. This works especially well if you own the property outright and don’t need a lump sum immediately. It also turns you into the bank — you earn interest on the payments too.

According to IRS Publication 537 on Installment Sales, this method can be used for both real property and personal property, and allows taxpayers to spread gain recognition over time rather than recognizing it all in the year of sale.

If you’re planning to sell and want to know your best options, our property selling page walks through the process in detail — and our team can help you think through the tax angle before you list.

Opportunity Zones — A Lesser-Known Tax Benefit

How Investing in an Opportunity Zone Can Help

Opportunity Zones are federally designated areas where the government encourages investment through special tax incentives. If you take the capital gains from a property sale and reinvest them into a Qualified Opportunity Fund (QOF) within 180 days, you can defer — and potentially reduce — the tax on that gain.

If you hold your Opportunity Zone investment for at least 10 years, any gains from the new investment become completely tax-free. This is one of the most generous tax breaks in the tax code for real estate investors, and it’s still widely underused. You can also read our post on cost segregation for rental properties to see how other advanced tax strategies work alongside Opportunity Zones.

Conclusion

Avoiding or reducing capital gains tax on property sales is not about tricks — it’s about knowing the rules and using them wisely. The primary residence exclusion can eliminate tax on up to $500,000 of profit. A 1031 exchange can defer taxes indefinitely on investment properties. Increasing your cost basis, timing your sale right, and using installment sales are all legal, effective strategies. The key is to plan before you sell — not after. For personalized help with your property sale strategy, feel free to contact us — we’re here to help.

Frequently Asked Questions

How much capital gains tax will I owe when I sell my home?

It depends on how long you’ve owned the home and your total income for that year. If you’ve lived in it as your primary residence for at least 2 of the past 5 years, you may owe nothing — you can exclude up to $250,000 in gains (or $500,000 for couples). If the gain exceeds that, or if it’s an investment property, the rate is 0%, 15%, or 20% depending on your income level.

Can I avoid capital gains tax on a rental property?

You can’t exclude the gain using the primary residence rule, but you can defer it using a 1031 exchange. This lets you roll the proceeds into a similar investment property and push the tax bill down the road. You can also use installment sales, Opportunity Zones, or charitable trusts depending on your situation.

What home improvements count toward my cost basis?

Major improvements that add value, extend the life of the home, or adapt it to new uses all count — things like room additions, a new roof, HVAC replacement, kitchen remodels, and solar panels. Routine repairs like painting or fixing a broken window don’t count. Always keep receipts and documentation.

How does a 1031 exchange work for avoiding capital gains?

A 1031 exchange lets you sell an investment property and reinvest all the proceeds into a like-kind property within 180 days, deferring capital gains tax. You must use a Qualified Intermediary to handle the funds and identify your replacement property within 45 days of the sale. Miss either deadline and the tax becomes due.

Is it legal to time a property sale to avoid capital gains?

Absolutely. Timing a sale for a year when your income is lower — or waiting to cross the 1-year mark for long-term treatment — is a completely legal tax strategy. The IRS sets the rules, and planning your sale around them is exactly what you’re supposed to do. Working with a tax advisor helps you pick the optimal timing for your specific situation.

💬