Home›Advice›Selling›How to avoid paying capital gains tax
Go Back

How to avoid paying capital gains tax

If you bought a home as your primary residence and lived there over 3years then got married and kept it as a rental because of the housing market crash. But now you are buying a house together can you use the proceeds to avoid paying capital gains tax?

Asked by A LockEmail verified | Woodbridge, VA| 06-15-2026| 316 views|Selling|Updated 5 months ago

While AI use is allowed, don't copy & paste generic answers. Add your own insights and real experience to make your answer personal and helpful.

Sort by:

Expert answers are from licensed real estate professionals with a verified FastExpert profile.

David MountAgentFastExpert VerifiedActive and in good standing
Brokerage
eXp Realty LLC
License #
VA #0225211697
Status
Active
Real Estate Agent3 months ago
Novice8 Answers

Sounds like there's not much you can do if it's been an investment property since the housing crash (2008 ish?). You'll need to pay the capital gains tax if you want to cash out of it unless you wanted to buy another investment property. But you can't avoid the capital gains tax if you want to use the proceeds to buy a personal residence.

Find Agent CTA

Are you ready to find a top agent near you?

Browse profiles of the highest ranked agents in your area and find one that meets your specific needs.

Marine JanikyanAgentFastExpert VerifiedActive and in good standing
Brokerage
JohnHart Real Estate
License #
CA #01931934
Status
Active
Real Estate Agent4 months ago
Semi-Pro55 Answers

Avoiding capital gains tax entirely is not always possible or legal, but there are several legitimate ways to reduce or eliminate it, depending on your situation. If you're selling your primary residence in the United States, you may qualify for the home sale exclusion, which allows eligible homeowners to exclude up to $250,000 of capital gains from taxes if filing individually or $500,000 if married filing jointly, provided you meet the ownership and residency requirements. You can also reduce your taxable gain by increasing your property's cost basis with the cost of qualifying home improvements. For investments, strategies such as holding assets for more than one year to qualify for lower long-term capital gains tax rates, offsetting gains with investment losses, donating appreciated assets to qualified charities, or investing through tax-advantaged accounts may help reduce your tax liability. Because capital gains tax rules can be complex and vary based on your income, the type of asset, and state tax laws, it's a good idea to consult a tax professional before selling significant assets to determine the strategy that best fits your circumstances.

Zoltan PeresztegiAgentFastExpert VerifiedActive and in good standing
Brokerage
SellWithZoli
License #
CA #02248774
Status
Active
Real Estate Agent4 months ago

Hi A, There is a myth buried in your question that I want to clear up first, because it changes everything: using the sale proceeds to buy your next home does NOT avoid capital gains tax. That "rollover" rule was repealed back in 1997. What replaced it is the Section 121 exclusion, and it only cares about how you USED the home, not what you do with the money. The others have covered the basic test: you need to have owned and lived in the home as your primary residence for 2 of the last 5 years before the sale. Here is what that means for your specific timeline: - If the home has been a rental for more than 3 years since you moved out, the 2-of-5 window has closed and the exclusion is gone on a sale today. - One path back: move back in for at least 2 years, then sell. You would get a PARTIAL exclusion. Since 2009, the years it was rented before you moved back count as "nonqualified use," so a slice of the gain stays taxable no matter what. - The depreciation you took (or should have taken) as a landlord is never excludable. It gets recaptured at up to 25% on sale. - Because it is currently a rental, a 1031 exchange into another investment property is on the table. That defers the tax rather than erasing it, and the replacement property has to be held for investment, not moved into as your home right away. So the honest answer: there are ways to reduce or defer the tax, but probably not erase it. The right move depends on your gain size, how long it was rented, and your plans. I am a real estate professional, not a CPA, and this is one of those situations where an hour with a good tax advisor pays for itself many times over. I work in Los Angeles (the South Bay), where I walk sellers through these numbers all the time, and if you would like a strong agent in the Woodbridge area, I am glad to connect you with someone from my network. Zoltan

Jerry CarrilloAgentFastExpert VerifiedActive and in good standing
Brokerage
JohnHart Real Estate, 1656 Arneill Rd Spc B, Camarillo, CA 93010
License #
CA #02201824
Status
Active
Real Estate Agent5 months ago

You can’t automatically avoid capital gains tax just because you’re buying another home, but you may be able to reduce or eliminate it depending on how the property was used. If the home was your primary residence for at least 2 of the last 5 years, you may qualify for the capital gains exclusion (up to $250,000 per person or $500,000 for a married couple filing jointly). However, once you converted it into a rental, any time it was used as a rental may reduce how much of the gain qualifies for that exclusion. Buying a new home with the proceeds does not by itself eliminate capital gains tax. There is no longer a general “rollover” rule for personal residences. However, if part of the property was used as a rental, you may also owe depreciation recapture tax on that portion of the gain. In short, the tax outcome depends on your use history (primary residence vs. rental), your ownership timeline, and your filing status, not on whether you reinvest the money into another home.

Becky GroeAgentFastExpert VerifiedActive and in good standing
Brokerage
Coldwell Banker Realty, Colorado Springs
License #
CO #100090488
Status
Active
Real Estate Agent5 months ago

Using the sale proceeds to buy another home does not automatically avoid capital gains tax. What matters is whether you still qualify for the primary residence exclusion. In general, you must have lived in the home as your primary residence for at least 2 of the last 5 years before selling. Since the home became a rental, you’ll also need to consider depreciation recapture and how long it has been rented. Before selling, speak with a CPA so you know whether you qualify for the exclusion and what taxes may apply. — Becky Groe Coldwell Banker Realty

Angela RodriguezAgentFastExpert VerifiedActive and in good standing
Brokerage
Dream Finders Realty Group
License #
FL #BK3350540
Status
Active
Real Estate Agent5 months ago
Rising Star15 Answers

Dear A Lock, Using the proceeds from the sale to buy another primary residence does **not automatically avoid capital gains tax**. That old rule no longer works the way many people think it does. The first thing to determine is whether the property still qualifies for the **primary residence capital gains exclusion**. In general, if you owned the home and lived in it as your primary residence for at least **2 of the last 5 years** before the sale, you may be able to exclude up to **$250,000 of gain if single** or up to **$500,000 if married filing jointly**, depending on your situation. However, because the home later became a rental, the timing matters a lot. If you have not lived in the property as your primary residence for at least 2 of the last 5 years, you may not qualify for the primary residence exclusion anymore. Also, even if you do qualify for part of the exclusion, you may still owe tax on **depreciation recapture** for the years the property was used as a rental. That part is often misunderstood. A **1031 exchange** may be another option, but only if the property is considered an investment/rental property and you reinvest into another qualifying investment property. You generally cannot sell a rental property, use the money to buy your new personal residence, and treat that as a 1031 exchange. So the answer depends on a few key details: * When did you buy the home? * When did you live in it as your primary residence? * When did it become a rental? * How much gain do you have? * Did you claim depreciation while it was rented? * Are you buying the new home as a personal residence or as an investment? Before selling, I would strongly recommend speaking with a CPA or tax advisor. There may be ways to reduce or defer taxes, but the right strategy depends on the timeline and whether the property still qualifies as a primary residence, an investment property, or both for tax purposes. In simple terms: buying another house together does not, by itself, erase the capital gains tax. The tax treatment depends on whether you qualify for the primary residence exclusion, whether depreciation recapture applies, and whether a 1031 exchange is available.

Emily MatthewsAgentReal Estate Agent5 months ago

Talk to your accountant. The answer to this is related to how long it's been a rental. If you lived in it 2 out of the last 5 years, you could be exempt, but ASK a tax person

Keith Jean PierreAgentReal Estate Agent5 months ago

Depends on your exact timelines. If you sell after more than 3 years of renting it out you may no longer meet the "2 out of 5 years" use test and could lose some or all of the exclusion. Keith Jean-Pierre Managing Principal The Dapper Agents Real Estate Operations in ALL 50 States

Becky GroeAgentFastExpert VerifiedActive and in good standing
Brokerage
Coldwell Banker Realty, Colorado Springs
License #
CO #100090488
Status
Active
Real Estate Agent5 months ago

This is a situation where I would strongly recommend speaking with a CPA or tax professional, because capital gains rules for former primary residences that later become rentals can get complicated. In general, simply using the proceeds from one home to buy another home does not automatically eliminate capital gains tax. That rule changed many years ago. However, you may still qualify for exclusions: If the property was your primary residence, you may be able to exclude up to: • $250,000 of gain if filing single • $500,000 of gain if married filing jointly under the IRS "2 out of 5 year" rule, which generally requires that you lived in the home as your primary residence for at least 2 of the 5 years before the sale. Since the home became a rental: A few additional factors may come into play: • How long it has been rented • Depreciation claimed while it was a rental • Whether you still meet the residence test • Your total gain on the property Even if you qualify for the exclusion, depreciation recapture taxes may still apply. What I usually tell homeowners: Before listing the property, sit down with a CPA and calculate: • Estimated capital gains • Potential exclusion eligibility • Depreciation recapture • Net proceeds after taxes You may discover that your tax liability is much lower than expected—or that there are planning opportunities available before the sale. — Becky Groe Coldwell Banker Realty

Becki CroninAgentFastExpert VerifiedActive and in good standing
Brokerage
F.C. Tucker Co.
License #
IN #RB17000898
Status
Active
Real Estate Agent5 months ago
Semi-Pro72 Answers

While Mary gave an awesome breakdown of that residency rule, another route you could look into is a 1031 Exchange, which lets you defer those gains by rolling the rental proceeds into another investment property. However, that gets super tricky, so I highly recommend sitting down with a tax professional or CPA to map out your exact numbers.

Mary WassefAgentFastExpert VerifiedActive and in good standing
Brokerage
Circa Real Estate
License #
TX #508256
Status
Active
Real Estate Agent5 months ago

The key question is how long the property has been a rental. In general, homeowners may qualify for the capital gains exclusion if they owned and lived in the home as their primary residence for at least two of the five years before the sale. If the property has been rented for more than three years and they have not lived in it during the five-year lookback period, they may no longer qualify for the full exclusion. Buying another home does not automatically allow someone to avoid capital gains taxes on the sale of a rental property. The old "roll the proceeds into another home" rule no longer applies to personal residences. There are several factors that can affect the tax outcome, including the timing of the rental period, depreciation taken while the property was rented, and whether any partial exclusion might apply. This is definitely a situation where a CPA or qualified tax professional should be consulted before the property is sold. Mary Wassef Founder | Broker Associate Circa Real Estate Top Producing Houston Realtor | Luxury & Historic Home Specialist Five Star Professional Award Recipient (15+ Years) | Luxury Home Marketing Guild Member | PRNEWS Award Winner Serving Houston Heights, Woodland Heights, Sunset Heights, Norhill, Garden Oaks, Oak Forest & Spring Branch

Related Questions

I want sale my house

Asked by Thu Thi Hong PhamEmail verified | Portland, OR | 8 views | Selling | 12-04-2026 | Updated 19 hours ago

Sell personal belongings with house

Asked by Eileen BriggsEmail verified | Woodlake, CA | 5 views | Selling | 12-02-2026 | Updated 20 hours ago

What do i do if I think my house is worth. more than the agents I have met with?

Asked by JonEmail verified | Philadelphia, PA | 8 views | Selling | 12-04-2026 | Updated 20 hours ago

how can I make my home more attractive?

Asked by JonEmail verified | St Paul, MN | 21 views | Selling | 12-02-2026 | Updated 2 days ago

How do I know if my home is priced correctly?

Asked by JonEmail verified | Chicago, IL | 38 views | Selling | 11-30-2026 | Updated 4 days ago