Can I sell my house and buy another without paying capital gains?

Asked by: Prof. Tanner Hermann DVM  |  Last update: July 17, 2026
Score: 4.5/5 (54 votes)

Yes, you can sell your primary residence and buy another without paying capital gains tax (or by minimizing it) if you meet specific IRS requirements. You can exclude up to $ 250 , 000 $ 2 5 0 , 0 0 0 (single) or $ 500 , 000 $ 5 0 0 , 0 0 0 (married filing jointly) of the gain if you lived in and owned the home for at least two of the last five years.

Can you avoid capital gains tax by buying another house?

You can't entirely avoid capital gains by buying another home, but you can defer them for investment properties using a 1031 Exchange (rolling profits into a similar property within 180 days) or potentially exclude some gain on a primary home sale using the $250k/$500k exclusion if you meet ownership/use tests (IRS Pub 523). Buying another personal residence no longer postpones taxes on your primary home's sale.

Can I sell my house and use the money to buy another house?

Absolutely. I have done this every time I have sold my home and purchased a new one. The tricky part is timing the sale of your existing home and purchasing the new home so that you can avoid moving into temporary housing between the two transactions, which increases your costs and can be very inconvenient.

How long do you have to buy another house after selling to avoid capital gains?

You don't have a strict timeline to buy another home to avoid capital gains on your primary residence; instead, you must meet the IRS's "2-out-of-5-year rule" for ownership and use of the sold home, allowing you to exclude up to $250k/$500k profit, but you can't use the exclusion again for two years if you sold another home recently, while deferring taxes on investment property requires a strict 45/180-day timeline for a 1031 exchange.

How much capital gains do I pay on $100,000?

On a $100,000 capital gain, you'll likely pay 15% for long-term gains, resulting in about $15,000 in federal tax (plus potential state tax), but it could be 0% or 20% depending on your total taxable income and filing status, while short-term gains are taxed as ordinary income (potentially 22-24%). 

How to LEGALLY Pay 0% Capital Gains Tax on Real Estate

29 related questions found

What is the 3-3-3 rule in real estate?

The "3-3-3 rule" in real estate isn't a single guideline but refers to different strategies: for buyers, it's about financial readiness (3 months savings, 3 months reserves, 3 property comparisons) or a financial affordability check (30% income, 30% down, 3x income); for agents, it's a marketing habit (call 3, note 3, share 3) or prospecting (talking to everyone within 3 feet). There's also a developer rule (1/3 land, 1/3 build, 1/3 profit), though it's considered outdated by some.

What is the 2 year 5 year rule?

The "2-year, 5-year rule" primarily refers to the IRS rule allowing homeowners to exclude up to $250,000 (or $500,000 married) of capital gains from the sale of their primary residence if they owned and lived in it as their main home for at least 2 years out of the 5 years before the sale, meeting both ownership and use tests within that 5-year window. There's also a "5-year rule" for Roth IRAs, requiring separate 5-year periods for contributions and conversions to avoid taxes. 

What is the 7% sell rule?

The 7% sell rule is a stock trading guideline to cut losses quickly, advising you to sell a stock if it drops 7-8% below your purchase price to protect capital, remove emotion, and prevent small losses from becoming catastrophic, a strategy popularized by William O'Neil's CAN SLIM method for growth investing. It assumes that truly strong stocks typically don't fall much below their buy point, so a dip signals something is wrong, requiring you to exit the trade to preserve funds for better opportunities.
 

What is the one-time capital gains exemption?

The primary "one-time" capital gains exemption in the U.S. allows single filers to exclude up to $250,000 (or $500,000 for married couples filing jointly) of profit from selling their main home, provided they've owned and lived in it for at least two of the last five years before the sale. While it's often called a one-time exclusion, you can use it multiple times, but you must wait two years before claiming it again on another property.
 

What is the 6 year rule for capital gains?

The "6-year rule" for Capital Gains Tax (CGT) in Australia allows you to treat a former main residence as tax-exempt for up to six years after you move out, even if you rent it out, enabling you to avoid CGT on any growth during that period. You qualify by moving out, choosing to treat it as your main home for tax, and can reset the rule by moving back in. If you rent it out for longer than six years, only the portion of the gain after the six-year mark becomes taxable.
 

How to avoid capital gains tax when buying a house?

To qualify for the capital gains tax exemption on a home sale, you generally must have owned and lived in the home as your primary residence for at least two of the past five years—and not used the exemption on another home in the last two years.

What happens if you sell your house and don't buy another one?

If you sell your house and don't buy another, you'll have cash proceeds (after paying off the mortgage and selling costs) and need to decide on new housing, often renting or moving in with family; financially, you might benefit from the IRS capital gains exclusion (up to $250k/$500k profit if you've lived there two of the last five years), but you'll pay tax on gains beyond that, while also managing the new costs of renting or storage.

How long do I have to buy a house after selling?

If you sell after two years, you won't pay capital gains taxes on profits less than $250,000 (or $500,000 for jointly owned homes). There's no additional requirement to purchase a new home.

What is the 7 year rule for taxes?

If no return was filed, the period to file a claim is 2 years from the date the tax was paid. 7 years - For filing a claim for credit or refund due to an overpayment resulting from a bad debt deduction or a loss from worthless securities, the time to make the claim is 7 years from the date the return was due.

How much is capital gains tax on a $500,000 house?

When you sell your primary residence, $250,000 of capital gains (or $500,000 for a couple) are exempted from capital gains taxation. This is generally true only if you have owned and used your home as your main residence for at least two out of the five years prior to the sale.

How can I legally avoid capital gains tax?

A common way to defer or reduce your capital gains taxes is to use tax-advantaged accounts. Retirement accounts such as 401(k) plans, and individual retirement accounts offer tax-deferred investment. You don't pay income or capital gains taxes on assets while they remain in the account.

How long to live in a house before selling?

The five-year rule

This has to do with the amount of equity the average homeowner has built in their home after five years of possession, and it also takes into account the costs associated with selling a home (and, if applicable, with purchasing a new one).