Can You Avoid Capital Gains Tax by Buying Another House

Can You Avoid Capital Gains Tax by Buying Another House

Wealth Preservation: Can You Avoid Capital Gains Tax by Buying Another House?

The journey of property ownership is often marked by the desire to move upward—selling a starter home to fund a dream residence or liquidating an investment to acquire a more lucrative asset. However, in the 2026 real estate landscape, the excitement of a high-value sale is often met with a pressing question: how much will the government take? For many, the instinctive query is, “Can you avoid capital gains tax by buying another house?” While the tax code has evolved, the strategic use of property transitions remains one of the most effective ways to preserve your hard-earned equity.

Whether you are a first-time homebuyer planning your next move, a self-employed home buyer seeking to shield business-driven assets, or a real estate investor scaling a portfolio, understanding the relationship between sales and taxes is vital. During the phase of preparing to buy your next property, your focus should not just be on the purchase price, but on the tax liability you are carrying from your current one. By navigating the current IRS exemptions and specialized exchange rules, you can ensure that your move into your next home is a leap toward financial freedom, not a step toward a massive tax bill.

What Are Capital Gains Taxes?

In the simplest terms, capital gains taxes are the fees you pay to the government on the profit you make from selling an asset. In real estate, your “gain” is the difference between your adjusted cost basis (what you paid plus improvements) and the final sales price. If you bought a home for $300,000 and sold it for $500,000, that $200,000 profit is potentially subject to tax.

For individuals preparing to buy their next home, the tax rate depends on how long you held the property. If you sold in less than a year, it is a short-term gain, taxed at your ordinary income rate. However, most real estate falls under long-term capital gains (held for more than a year), which are taxed at more favorable rates—typically 0%, 15%, or 20%, depending on your income level. For asset-rich individuals seeking for real estate investments, managing these rates is a core part of their annual financial planning.

primary residence

Ways to Avoid Capital Gains Taxes on Real Estate

The most important thing to clarify for 2026 is that simply “buying another house” does not automatically wipe away the taxes from your previous sale. The old “rollover rule” that allowed people to defer gains into a new home regardless of circumstances was replaced years ago. However, there are still robust, legal ways to keep your profits in your pocket.

The Section 121 Primary Residence Exclusion

For most people in the homeownership journey, the Section 121 exclusion is the most powerful tool available. If the home you are selling was your “principal residence,” the IRS allows you to exclude a massive portion of the profit from being taxed at all. In 2026, the limits remain consistent:

  • Single Filers: Can exclude up to $250,000 in profit.
  • Married Filing Jointly: Can exclude up to $500,000 in profit.

To qualify, you must meet the “Ownership and Use” tests: you must have owned the home and lived in it as your primary residence for at least two out of the last five years before the sale. This is why many real estate investors use a “live-in flip” strategy—moving into a property for two years to capture that tax-free profit before preparing to buy the next one.

1031 Like-Kind Exchange: The Investor's Strategy

If you are selling an investment property rather than your main home, the Section 121 exclusion doesn’t apply. This is where the 1031 exchange becomes the primary answer to “can you avoid capital gains tax by buying another house.” Section 1031 of the Internal Revenue Code allows you to sell a business or investment property and defer all capital gains taxes by reinvesting the proceeds into a “like-kind” property.

This is a favorite strategy for retirees and asset-rich individuals seeking for real estate investments because it allows for indefinite deferral. You can keep “swapping” properties as you grow your portfolio, only paying the tax if you eventually cash out without reinvesting. However, the 1031 exchange has strict rules that must be followed during the phase of preparing to buy the replacement:

Requirement2026 Rule
Qualified Intermediary (QI)You must use an independent third party to hold the funds; you cannot touch the money.
The 45-Day Identification RuleYou have exactly 45 days from the sale of your old property to identify potential replacements.
The 180-Day Closing RuleYou must close on the new property within 180 days of the sale of the first one.
Like-Kind DefinitionBroadly defined; you can swap an apartment building for raw land or a rental house for a commercial storefront.

Write Off Improvements on the Home

One of the most overlooked ways to minimize capital gains taxes is by increasing your “cost basis.” Your basis is essentially the total amount you have invested in the property. The higher your basis, the lower your taxable profit. While you cannot write off “repairs” (like fixing a leaky faucet), you can include “capital improvements” that add value, prolong the life of the home, or adapt it to new uses.

When you are preparing to buy your next home, gather the receipts from your current one. Examples of improvements that increase your basis include:

  • Adding a new roof or HVAC system.
  • Kitchen and bathroom remodels.
  • Adding a deck, patio, or swimming pool.
  • New flooring or windows.
  • Major landscaping projects.
investment property

If you bought your home for $400,000 and spent $50,000 on a permitted basement renovation, your new cost basis is $450,000. If you sell for $600,000, your taxable gain is now $150,000 instead of $200,000. For a self-employed home buyer, keeping meticulous records of these improvements is just as important as keeping business expense receipts.

Other Ways to Minimize Capital Gains Taxes

If you don’t meet the full primary residence exclusion or aren’t doing a 1031 exchange, there are still creative ways to lower the bill during the homebuying process:

  • Partial Exclusions: The IRS allows for “prorated” exclusions if you have to sell before the two-year mark due to unforeseen circumstances like a job relocation, health issues, or military service.
  • Tax-Loss Harvesting: If you have a large gain on a home sale, you can potentially sell other assets (like underperforming stocks) at a loss to offset the gain on your tax return.
  • Holding for Long-Term: Always ensure you have owned the property for at least 366 days. The jump from short-term to long-term tax rates can save you 10% to 20% on the spot.
  • Qualified Opportunity Zones: For real estate investors, reinvesting gains into designated distressed areas can lead to significant deferrals and even permanent tax exclusions on future appreciation.
Homeownership

Conclusion: Strategic Planning for Your Next Move

While the old rule of “just buy another house” has been replaced by more specific regulations, the opportunity to avoid or defer capital gains tax is still very much alive in 2026. By understanding the Section 121 exclusion for your home and the 1031 exchange for your investments, you can move through the phase of preparing to buy with the confidence that your wealth is protected. Homeownership is a marathon of equity building, and tax efficiency is the fuel that keeps you going. Always consult with a tax professional to ensure you are meeting the exact requirements for your specific situation.

FAQ's

Yes. The IRS offers partial exclusions if you are forced to move for specific “unforeseen circumstances,” such as:

  • A change in place of employment (usually more than 50 miles away).

  • Health issues or caring for a sick family member.

  • Unforeseeable events like divorce, multiple births from a single pregnancy, or a disaster.

  • Improvement (Adds to Basis): New roof, swimming pool, central air, or a room addition. These prolong the life of the home.

  • Repair (Not Deductible): Fixing a leaky faucet, painting a room, or replacing a broken window pane. These are considered routine maintenance.

Every dollar you spend on “capital improvements” (not basic repairs) is added to your cost basis.

  • Example: You bought a home for $300k and spent $50k on a kitchen remodel. Your new basis is $350k. If you sell for $650k, your taxable “gain” is now $300k instead of $350k. This is vital if your profit is close to the $250k/$500k limit.

If you are using a 1031 exchange for an investment property, the clock starts the day you sell:

  • 45 Days: You must identify potential replacement properties in writing.

  • 180 Days: You must officially close on the new property.

  • Missing either deadline results in the full tax bill becoming due.

The $250k/$500k exclusion does not apply to rental or business properties. To avoid taxes when “buying another house” in this scenario, you must use a 1031 Like-Kind Exchange. This allows you to defer taxes by reinvesting the proceeds into a similar investment property within 180 days.

Yes. You can generally use this exclusion every time you sell a primary residence, provided you haven’t used it for another home sale in the two years leading up to the current sale.

To qualify for the tax-free profit mentioned above, you must meet two criteria:

  • Ownership: You owned the home for at least two of the last five years.

  • Use: You lived in the home as your primary residence for at least two of the last five years.

  • Note: These two years do not have to be consecutive.

This is the primary way homeowners avoid tax. If the home was your primary residence, the IRS allows you to exclude a significant amount of profit from being taxed:

  • Single filers: Up to $250,000 in profit is tax-free.

  • Married filing jointly: Up to $500,000 in profit is tax-free.

No. This is a common myth. The “rollover” rule, which allowed homeowners to avoid taxes by reinvesting their profit into a more expensive home, was repealed in 1997. Today, tax avoidance is based on the Section 121 Exclusion, which focuses on how long you lived in the home, not what you buy next.

Capital gains tax is a tax on the profit you make when you sell an asset for more than you paid for it. In real estate, your “gain” is the difference between your adjusted cost basis (what you paid plus improvements) and the final sale price (minus selling costs like commissions).

Shining Star Funding

527 Sycamore Valley Rd W, Danville, CA 94526
Toll Free Call : (866) 280-0020

For informational purposes only. No guarantee of accuracy is expressed or implied. Programs shown may not include all options or pricing structures. Rates, terms, programs and underwriting policies subject to change without notice. This is not an offer to extend credit or a commitment to lend. All loans subject to underwriting approval. Some products may not be available in all states and restrictions may apply. Equal Housing Opportunity.
Interactive calculators are self-help tools. Results received from this calculator are designed for comparative and illustrative purposes only, and accuracy is not guaranteed. Shining Star Funding is not responsible for any errors, omissions, or misrepresentations. This calculator does not have the ability to pre-qualify you for any loan program or promotion. Qualification for loan programs may require additional information such as credit scores and cash reserves which is not gathered in this calculator. Information such as interest rates and pricing are subject to change at any time and without notice. Additional fees such as HOA dues are not included in calculations. All information such as interest rates, taxes, insurance, PMI payments, etc. are estimates and should be used for comparison only. Shining Star Funding does not guarantee any of the information obtained by this calculator.

Privacy Policy | Accessibility Statement | Term of Use | NMLS Consumer Access 

CMG Mortgage, Inc. dba Shining Star Funding, NMLS ID# 1820 (www.nmlsconsumeraccess.org, www.cmghomeloans.com), Equal Housing Opportunity. Licensed by the Department of Financial Protection and Innovation (DFPI) under the California Residential Mortgage Lending Act No. 4150025. To verify our complete list of state licenses, please visit www.cmgfi.com/corporate/licensing