Email FacebookTwitterMenu burgerClose thin

Can You Avoid Capital Gains By Buying Another Home?

SmartAsset maintains strict editorial integrity. It doesn’t provide legal, tax, accounting or financial advice and isn’t a financial planner, broker, lawyer or tax adviser. Consult with your own advisers for guidance. Opinions, analyses, reviews or recommendations expressed in this post are only the author’s and for informational purposes. This post may contain links from advertisers, and we may receive compensation for marketing their products or services or if users purchase products or services. | Marketing Disclosure
Share

No, buying another home does not eliminate capital gains tax on the sale of your primary residence. An older tax rule once allowed homeowners to defer capital gains by purchasing another home, but Congress eliminated that provision in 1997. It was replaced by the Section 121 home sale exclusion, which applies whether you buy another home, rent or invest the sale proceeds elsewhere. Investment properties are different. Owners may be able to defer capital gains through a like-kind exchange under Section 1031, but those rules apply to investment and business property, not to a home you live in. Here’s what you need to know.

For answers to your complex financial questions such as “Can you avoid capital gains tax by buying another home?” consider working with a financial advisor.

Home Sale Exclusions

The reason buying another home doesn’t matter is the Section 121 exclusion itself: it’s unconditional. This tax break, commonly called the home sale exclusion, lets taxpayers exclude a set amount of capital gains from the sale of their primary residence, no purchase of a replacement home required. In 2026, individual taxpayers can exclude up to $250,000 from the sale of their primary home ($500,000 for joint taxpayers).

A second, separate tax break, Section 1031 (also called a like-kind exchange), does require buying another property to defer tax, but it only applies to investment properties, not the home you live in. This is the strategy that actually involves “buying another home” in a sense, just not the kind the title is asking about.

Taxable capital gains only apply to the profit from the sale. Start with the sale price, then subtract what you paid for the home, plus any capital improvements and selling costs. This gives your total gain. From that, subtract the home sale exclusion. Any remaining amount is taxable.

Home Sale Exclusion Example

Since the exclusion doesn’t depend on buying a new home, here’s what it looks like using just the numbers. Say an individual bought a house for $200,000, and years later sells it for $500,000. The profit is $300,000. Using the home sale exclusion, up to $250,000 of that profit is excluded, leaving $50,000 in taxable capital gains, whether that seller buys another home, rents afterward or does neither.

To qualify for the home sale exclusion your property must pass two tests:

  • Ownership: Taxpayers must have owned this home for at least 24 out of the past 60 months (put another way, at least two years out of the last five). These months do not have to be consecutive.
  • Use and occupancy: The house must have been used as a primary residence for at least two of the past five years, meaning you had to live in it. There are several ways of formally establishing primary residence. Most importantly, this must have been the address for filing taxes, voting, state and federal IDs and utility bills.

You should note that you can only have one legal primary residence at a time. This means you can only apply the home sale exclusion to one sale at a time. The home sale exclusion does not apply to investment or rental properties. This must be a home that you live in and it cannot be a second home.

Hiring a financial advisor is an investment in your future. SmartAsset’s Financial Advisor Value Calculator can help you evaluate the potential return on that investment.

How Much Could a Financial Advisor be Worth to You?

Calculate how much a financial advisor can potentially add to your net worth over time given your circumstances.

$--

Final Net Worth with an Advisor

$--

Final Net Worth without an Advisor

$--

Taking Advantage of Like-Kind Exchanges

A couple wondering if they can avoid capital gains tax by buying another home.

If you’re asking about buying another property specifically to avoid capital gains, this is the strategy that actually works, but only for investment property, never for the home you live in. The IRS defines like-kind exchanges as exchanges between real properties used for business or held as an investment for another qualifying real property. Generally, when sellers make this type of exchange, they are not required to immediately recognize a gain or loss under Internal Revenue Code Section 1031. This means that if you own business property, the IRS allows you to sell one property and use the proceeds to buy another without having to pay current capital gains taxes on the transaction.

This once applied to a range of business assets, but the 2017 Tax Cuts and Jobs Act narrowed Section 1031 to real property only. This provision ended like-kind treatment for personal property such as vehicles, equipment and collectibles. 1 This tax benefit is limited to real estate held for business or investment purposes, such as rental properties, offices, shops, hotels and other in-use assets. It created a dedicated benefit for closely or individually held real estate firms.

Like-Kind Exchange Requirements

Like-kind exchanges must meet several requirements:

  • This property must be held as an investment asset. It cannot be a home for personal use, whether as a primary residence, secondary residence or even an occasional vacation home. As a general rule, if you ever stay at this property it will probably not count for a 1031 like-kind exchange.
  • The replacement property must be a like-kind property, meaning it must also be business or investment real estate.
  • Both properties have to be in the United States.
  • The 1031 exchange must take place on a strict timeline.
  • A qualified intermediary must receive and hold the cash from the sale and use it to buy the replacement property. The property owner cannot hold those funds.
  • In some circumstances, differences in debt or cash (called “boot”) can result in a current tax liability.

How Like-Kind Exchanges Work

You do not need to make a direct swap in a like-kind exchange. Instead, once you sell your first investment property you can put the proceeds from this sale into escrow. You then have 45 days to identify the replacement property, and 180 days to finalize the purchase. This new purchase must also generate income through rentals or other use. It must also be exclusively for business or investment purposes.

You can then use your escrowed funds to buy this property. If you do so, the IRS allows you to consider this an exchange and lets you defer the capital gains taxes on the proceeds from your original sale. If you own a rental property and would like to upgrade it, this can be an extremely useful tool. However, it is not available for homeowners, as like-kind exchanges specifically do not apply to your private residence.

Keep in mind that if any part of the transaction results in a taxable capital gain, such as receiving cash or non-like-kind property, you may still owe taxes on that portion. The rules around timing, property use and reinvestment are strict, so missing a step can lead to unexpected tax liability.

Depreciation Recapture: A Tax Cost to Factor In

Even for investors who do use a like-kind exchange to buy another property, capital gains isn’t the only tax at stake. If you claimed depreciation on the investment property, you may also owe a separate tax called depreciation recapture.

Here’s why: each year you own a rental, the IRS generally lets you deduct part of the building’s value as depreciation, which lowers your taxable rental income but also lowers your cost basis. That means more of your eventual sale price may count as gain. When you sell, the portion of gain attributable to those deductions, known as unrecaptured Section 1250 gain, is generally taxed at a maximum rate of 25%, which can be higher than the standard 0%, 15% or 20% capital gains rates.

A like-kind exchange doesn’t eliminate this tax; it generally only defers it alongside the capital gains tax, as long as the full proceeds go into the replacement property. If part of the exchange involves “boot,” cash or non-like-kind property received, that portion may trigger recapture immediately, even while buying another property defers the rest.

Bottom Line

A man calculating if he can avoid capital gains tax by buying another home.

Buying another home does not let you avoid capital gains tax on your primary residence. The home sale exclusion applies regardless of what you do with the proceeds, while Section 1031 offers a way to defer taxes by buying another property, but only for investment properties, never a home you live in. Take note that taxable capital gains only apply to your profit after subtracting your purchase price, improvements and selling costs, and that depreciation recapture can add an additional cost on top of capital gains for investment property sales.

Property Buying Tips for Beginners

  • A financial advisor can help you create a financial plan for your home buying needs and goals. Finding a financial advisor doesn’t have to be hard. SmartAsset’s free tool matches you with vetted financial advisors who serve your area, and you can have a free introductory call with your advisor matches to decide which one you feel is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
  • Picking between a dream home and an investment property could be difficult. Depending on your financial needs and goals, here’s why a long-term rental property could pay off.

Photo credit: ©iStock.com/LifestyleVisuals, ©iStock.com/PeopleImages, ©iStock.com/Jirapong Manustrong