A Victorian cottage with a white picket fence, showcasing a charming and picturesque residential setting.

How To Avoid Capital Gains Tax On Real Estate

Mar 5, 2024

9-MINUTE READ

Share:

Selling your home or investment property should be a joyous occasion, not a tax headache. After all, the sale typically brings in significant income and catapults you toward your next purchase. However, capital gains taxes can restrict your journey if you don't understand the relevant tax regulations for these transactions. Fortunately, the IRS gives homeowners and real estate investors ways to save big.

Stay ahead of the game with this guide to secure a brighter financial future in your new home or business venture.

Can You Avoid Capital Gains Tax On Real Estate?

It’s possible to legally defer or avoid paying capital gains tax when you sell a home. You can avoid capital gains tax when you sell your primary residence by buying another house and using the 121 home sale exclusion. In addition, the 1031 like-kind exchange allows investors to defer taxes when they reinvest the proceeds from the sale of an investment property into another investment property.

See What You Qualify For

Get Started

What Is A 121 Home Sale Exclusion?

As mentioned, there are two primary ways to avoid or defer capital gains taxes when buying a new home, one of which is the 121 home sale exclusion.

The 121 home sale exclusion, also known as the primary residence exclusion, is a tax benefit that allows homeowners to exclude a portion of the capital gains from the sale of their primary residence from their taxable income. This exclusion reduces the tax burden of selling a home.

How Does The 121 Home Sale Exclusion Work?

The 121 home sale exclusion comes with specific restrictions:

  • Eligibility: To be eligible for the exclusion, you must have owned and used the property as your primary residence for at least 2 of the 5 years preceding the sale.
  • Exclusion limits: Under this provision, a taxpayer can exclude up to $250,000 of capital gains on the sale of their primary residence if they’re filing as single or married filing separately. Married couples filing jointly can exclude up to $500,000 of capital gains.
  • Frequency of use: You can use this exclusion once every 2 years. Therefore, if you meet the eligibility criteria and haven't used the exclusion in the last 2 years, you can claim it again for a subsequent home sale.

What Kind Of Homes Are Eligible For The Home Sale Exclusion?

Numerous types of homes are eligible for the home sale exclusion, including:

  • Mobile homes
  • Trailers
  • Houseboats
  • Condominiums
  • Single-family homes
  • Cooperative apartments

Remember, property in a retirement community is eligible if the taxpayer receives equity in the property or a co-op if the taxpayer owns stock proportionate to their unit.

Are There Special Exemptions To The Home Sale Exclusion?

Unique circumstances sometimes accompany a home sale. Fortunately, you may still qualify for a tax benefit. Specifically, suppose you don't meet the 2-year ownership and use requirement due to specific unforeseen circumstances, such as a job change or health problems. In that case, you may be eligible for a partial exclusion based on the time you lived in the property.

Additionally, say you or your spouse are on qualified official extended duty for the U.S. military, the Foreign Service, or the intelligence community. In this case, you can extend the 5-year period for an additional 10 years, allowing yourself a wider timespan to live in the home. Remember, qualified official extended duty means more than 90 days or an indefinite period of service. In addition, you must be living at a duty station at least 50 miles from your primary residence or living in government housing due to government orders.

How Much Can You Save With The Home Sale Exclusion?

The examples below demonstrate how much a homeowner would pay in capital gains taxes in various situations.

Buying A New Home After Selling Current Residence

Here's an example demonstrating how much a married couple filing jointly would pay if their home sale profits exceeded the exclusion limits. Say you and your spouse purchased your home for $400,000. After owning and living in it for the last 30 years, you sell it for $1,200,000. You spent $100,000 on capital improvements while you lived there, meaning your cost basis is $500,000. Therefore, $1,200,000 − $500,000 = $700,000 of capital gains.

Since the capital gain of $700,000 exceeds the $500,000 exclusion limit for a married couple filing jointly, the portion of the gain above the limit ($200,000) will be subject to capital gains tax. In addition, say you and your spouse make $550,000 in 2024. This income level puts you at the 15% long-term capital gains tax rate for married couples filing jointly. So, $700,000 − $500,000 = $200,000 × 0.15 = $30,000. As a result, you would pay $30,000 in capital gains taxes on the portion of the gain exceeding the $500,000 exclusion limit.

In addition, if you and your spouse decide to use the proceeds from the home sale to buy a new home, you can use a portion or all of the sale proceeds as a down payment on the new property. However, the capital gains taxes you owe from the sale of your previous home will detract from your financial capabilities. Specifically, you will have $30,000 less to buy your next home than if you had received an exclusion for all of your capital gains taxes.

Moving Into A Vacation Home Or Investment Property

Using the example above, say you and your spouse sell your home, exceed the exclusion limit by $200,000, and move into your second home instead of buying a new one. This way, while you would still owe $30,000 in capital gains taxes, you wouldn’t worry about applying the profits from the home sale to a new home purchase. In addition, by making your second home your new primary residence, you can use the exclusion rule again in the future, provided you live in the house long enough.

Get approved to buy a home.

And see how much down payment assistance you may need.

What Is A 1031 Like-Kind Exchange?

The other way to avoid or defer capital gains tax when buying a new home is the 1031 like-kind exchange, which is also known as a tax-deferred exchange. This is a US tax law allowing you to defer capital gains taxes on the sale of an investment property by reinvesting the proceeds into a similar property. As a result, investors can carry their investment capital through to another property without immediate tax consequences. Here are the main points to understand about the 1031 like-kind exchange:

Deferring Capital Gains Tax When Selling An Investment Property

Say you purchased an apartment building 15 years ago for $500,000. Over the years, you made $200,000 of capital improvements to the property. In addition, the property's value has appreciated significantly, and you can now sell it for $1,300,000.

However, because this is an investment property and not your primary residence, you are potentially responsible for capital gains taxes on the $600,000 of profit you would make by selling. For instance, a 20% capital gains rate would produce a tax bill of $120,000. Fortunately, a 1031 like-kind exchange can defer your capital gains taxes.

How It Works

First, you list the apartment building for sale and identify similar properties to purchase within 45 days from the date of the sale. You'll also need a Qualified Intermediary (QI) to hold your funds in escrow until you purchase another property and ensure compliance with the exchange rules.

During your search, you find a strip mall worth $1,350,000 that you believe will produce more revenue than your old apartment building. So, you sell your current property and allow the QI to hold the funds from the sale. You have 180 days from the date of the sale to close on the strip mall.

Finally, you close on the strip mall and use the $1,300,000 from your old apartment building. You combine these funds with another $50,000 from your savings to afford the purchase. Thanks to the 1031 like-kind exchange, you defer the capital gains taxes until your next transaction. When you file taxes, you submit Form 8824 containing the transaction details. Remember, capital gains taxes will only be due if you decide to purchase a property that is drastically different in quality or not purchase another property at all.

Deferring Capital Gains Tax When Selling A Multifamily Property That Is Also A Primary Residence

Using the example above, suppose you find another $1,300,000 apartment with six units to purchase. You complete the transaction and use the 1031 like-kind exchange to defer capital gains taxes. However, you realize you’d like to live in one of the units after a few months, making it your primary residence. The IRS has specific requirements for this situation, and failing to meet them means forfeiting the tax deferral.

How It Works

First, you must rent out the apartment for at least 14 days during one of the 2 years of ownership. There are no criteria for who your renter is, but you need to document this period to substantiate it later.

You cannot occupy the property for more than 14 days or 10% of the number of days you rented out the property during your first 12 months of ownership.

After 24 months, you can make one of the units your primary residence.

Get approved to buy a home.

Rocket Mortgage® lets you get to house hunting sooner.

Factors That Affect How Much You’ll Pay For Capital Gains

If you do end up needing to pay capital gains tax on your home sale, it’s helpful to know the amount you’ll be liable for ahead of time. The IRS determines the capital gains taxes on a home sale by evaluating several factors in the situation:

Income Level And Tax Filing Status

The IRS has different tax brackets for different income levels and filing statuses (single, married filing jointly, married filing separately, or head of household). Higher-income individuals generally fall into higher tax brackets, which may result in a higher capital gains tax rate. For example, if you file singly and make $47,026 – $518,900 in 2024, your long-term capital gains rate will be 15%. However, married couples filing jointly can make up to $94,050 and retain a 0% rate.

Type Of Home

If you sell your primary residence, you're usually eligible for certain benefits that reduce your tax liability. However, if you sell a second home, such as a vacation property or rental property, you don't receive the same advantages.

Length Of Time You've Owned The House

The duration of homeownership is a crucial factor in calculating capital gains taxes. The IRS differentiates between short-term and long-term capital gains based on the holding period of the property.

1 Year Or Less

Specifically, if you owned the home for 1 year or less before selling it, any profit from the sale will be considered short-term capital gains. Short-term capital gains are taxed at your ordinary income tax rates, such as wages from a job, which can be higher than long-term capital gains tax rates.

More Than 1 Year

On the other hand, if you owned the home for more than 1 year before selling it, any profit from the sale will be considered long-term capital gains. Long-term capital gains are generally lower than regular income tax rates. However, the specific tax rates for long-term capital gains depend on your income level and tax filing status.

FAQs About Avoiding Capital Gains Tax On Real Estate

Still feeling unsure of the rules surrounding capital gains tax and real estate? Keep reading for the answers to some frequently asked questions below.

How much is capital gains tax on real estate?

The amount of capital gains tax you pay on the sale of real estate depends on factors including whether the property is your primary residence, your income level and the length of time you owned the property. For long-term capital gains on both primary residences and commercial real estate, the highest tax rate is 20% and applies to individuals making over $518,901 and married couples filing jointly making $583,751 in 2024. A 15% tax rate applies to individuals making $47,026 – $518,900, and married couples filing jointly making $94,051 – $583,750.

What’s the best way to avoid capital gains tax on real estate?

The 121 home sale exclusion allows you to legally avoid paying a portion of your capital gains tax on the sale of your primary residence. Eligibility and exclusions apply, so be sure to consult a tax expert when selling your primary residence.

The Bottom Line: Take Advantage Of Capital Gains Tax Exemptions When Selling Your Home

Understanding the capital gains taxes on a home sale is crucial for homeowners looking to maximize their profits and minimize their tax liabilities. Homeowners can utilize the 121 home sale exclusion to exclude hundreds of thousands of dollars of capital gains from the sale of their primary residence, provided they meet specific criteria.

Additionally, investors can benefit from the 1031 like-kind exchange, which allows them to defer capital gains taxes on the sale of investment properties by reinvesting the proceeds into similar properties. By taking advantage of these tax strategies, homeowners and investors can retain more of their gains and continue to build wealth over multiple real estate transactions. If you’re looking to buy a home or investment property, start your mortgage application today.

Headshot of Anna Baluch, finance and real estate writer for Rocket Mortgage.

Ashley Kilroy

Ashley Kilroy is an experienced financial writer. In addition to being a contributing writer at Rocket Homes, she writes for solo entrepreneurs as well as for Fortune 500 companies. Ashley is a finance graduate of the University of Cincinnati. When she isn’t helping people understand their finances, you may find Ashley cage diving with great whites or on safari in South Africa.