How Does Capital Gains Tax Work in Real Estate? A Guide to Maximizing Your Profits

Enrique V Urdaneta

09/4/25

How Does Capital Gains Tax Work in Real Estate? A Guide to Maximizing Your Profits

Selling a property can lead to significant financial gains, but it can also result in a hefty tax bill if you’re not prepared. Capital gains tax is a tax levied on the profit you make from selling a property, and understanding how it works is essential to maximizing your profits. With the right strategies, you can minimize your tax liability and keep more of the money you’ve earned from the sale.

In this article, we’ll explain how capital gains tax works in real estate, including the key factors that determine how much tax you owe, ways to qualify for tax exemptions, and strategies for reducing your overall tax burden.

1. What Is Capital Gains Tax?

Capital gains tax is a tax on the profit you make from selling an asset, such as real estate. In the case of real estate, the capital gain is the difference between what you paid for the property (the purchase price or cost basis) and what you sold it for (the selling price).

  • Short-Term Capital Gains: If you sell a property you’ve owned for less than a year, the profit is considered a short-term capital gain. Short-term gains are taxed at ordinary income tax rates, which can be higher than long-term rates.
  • Long-Term Capital Gains: If you’ve owned the property for more than a year, the profit is considered a long-term capital gain. Long-term gains benefit from lower tax rates, typically ranging from 0% to 20%, depending on your income level.

Think of capital gains tax as the profit factor that affects how much of your property sale earnings you get to keep based on the length of time you owned the property.

2. How to Calculate Capital Gains

To calculate your capital gains, you’ll need to know the property’s cost basis and the selling price. The cost basis includes the original purchase price as well as certain costs associated with buying, improving, or selling the property.

  • Cost Basis: This includes the price you paid for the property, closing costs, and any capital improvements you made over the years (e.g., remodeling, adding square footage, or installing energy-efficient systems). Capital improvements increase the cost basis, reducing the amount of taxable gain.
  • Selling Price: The selling price is the amount you received from selling the property, minus any expenses related to the sale, such as real estate agent commissions and closing costs.

To calculate your capital gain, subtract the cost basis from the selling price. The result is your taxable capital gain.

Example:
If you bought a home for $300,000, spent $50,000 on renovations, and sold it for $450,000, your cost basis is $350,000. Your capital gain is $450,000 (selling price) – $350,000 (cost basis) = $100,000.

Think of calculating capital gains as the deduction factor that helps you lower your taxable profit by factoring in allowable expenses and improvements.

3. Capital Gains Exemptions for Primary Residences

The good news is that if you’re selling your primary residence, you may be eligible for a significant tax break. The IRS allows homeowners to exclude a portion of the capital gains from taxation when selling their primary residence, provided certain conditions are met.

  • Capital Gains Exclusion: You can exclude up to $250,000 of capital gains if you’re a single filer or $500,000 if you’re married and filing jointly, as long as you meet the ownership and use tests.
  • Ownership and Use Tests: To qualify for the exclusion, you must have owned the home for at least two years and lived in it as your primary residence for at least two of the last five years before the sale. You can use the exclusion once every two years.

Example:
If you’re married and sold your primary residence with a capital gain of $300,000, you could exclude $500,000 of gains, meaning you wouldn’t owe any capital gains tax on the sale.

Think of the primary residence exclusion as the savings factor that helps you significantly reduce or eliminate your capital gains tax liability when selling your home.

4. 1031 Exchange for Investment Properties

If you’re selling an investment property, you won’t qualify for the primary residence exclusion, but you can still defer capital gains taxes by using a 1031 exchange. This strategy allows you to reinvest the proceeds from the sale of one investment property into another like-kind property, deferring taxes on the capital gains.

  • How a 1031 Exchange Works: A 1031 exchange allows you to sell an investment property and reinvest the proceeds into another property without paying capital gains taxes immediately. As long as you follow IRS guidelines and timelines, the taxes on your capital gains are deferred until you eventually sell the new property.
  • Strict Timeline Requirements: The IRS requires you to identify a new property within 45 days of selling your original property and close on the new property within 180 days. If you miss these deadlines, you’ll lose the ability to defer the tax.

Think of a 1031 exchange as the deferral factor that allows you to continue growing your real estate portfolio while postponing capital gains taxes.

5. Reducing Capital Gains with Deductions and Losses

In addition to the primary residence exclusion and 1031 exchanges, there are other strategies for reducing your capital gains tax liability. Taking advantage of deductions and offsetting gains with losses can help minimize the amount you owe.

  • Capital Losses: If you’ve sold other investments (such as stocks or bonds) at a loss, you can use those losses to offset your capital gains from the sale of your property. This is known as tax-loss harvesting.
  • Selling Costs: Expenses related to selling the property, such as real estate agent commissions, title insurance, and legal fees, can be deducted from the selling price, reducing your overall capital gain.
  • Home Improvements: Major improvements that increase the value of your home, such as adding a new roof, building a deck, or remodeling the kitchen, can be added to your cost basis, lowering your taxable gain.

Think of these deductions and losses as the offset factor that reduces the overall capital gains tax you owe by taking advantage of allowable expenses and losses.

6. Capital Gains for Second Homes and Vacation Properties

If you’re selling a second home or vacation property, the rules for capital gains tax are different from those for your primary residence. You won’t qualify for the exclusion, but there are still ways to reduce your tax liability.

  • Mixed-Use Properties: If you use the property as both a second home and a rental, you may be able to split the capital gains between personal use and rental use. The portion related to rental use may qualify for a 1031 exchange, while the portion related to personal use could be taxed as a capital gain.
  • Converting a Second Home into a Primary Residence: If you’ve lived in your second home for at least two of the last five years before selling it, you may qualify for the primary residence exclusion. This can significantly reduce your capital gains tax liability.

Think of second homes as the dual-use factor that requires careful planning to reduce tax liabilities through strategies like converting to a primary residence or using 1031 exchanges.

7. Key Considerations and Risks

While there are several strategies for minimizing capital gains taxes, it’s important to be aware of potential risks and considerations when selling real estate.

  • Depreciation Recapture: If you’ve claimed depreciation on an investment property, you’ll need to pay depreciation recapture tax when you sell the property. This tax is assessed at a rate of 25% on the amount of depreciation you claimed.
  • Changing Tax Laws: Tax laws related to capital gains can change, and it’s important to stay informed about any updates that may impact your tax liability. Consulting with a tax professional can help you navigate these changes and stay compliant with the law.
  • Careful Record-Keeping: Keeping detailed records of your property’s purchase price, improvements, and selling costs is essential for accurately calculating your capital gains and reducing your tax liability.

Think of these risks as the compliance factor that ensures you’re following tax laws and staying on top of potential changes that could impact your real estate transactions.

8. The Bottom Line: How Capital Gains Tax Works in Real Estate

Capital gains tax is an important consideration when selling real estate, but with the right strategies, you can minimize your tax liability and keep more of the profits. Whether you’re selling your primary residence, an investment property, or a vacation home, understanding how capital gains tax works—and taking advantage of exclusions, 1031 exchanges, and deductions—can help you make the most of your real estate sale. Consulting with tax professionals and real estate experts can also ensure that you’re maximizing your financial benefits while staying compliant with tax laws.

If this information has been useful to you and you think other people can also benefit from these tips on how to find great real estate opportunities, feel free to share this article!  In addition, we invite you to visit and subscribe to our YouTube channel. There you can find valuable content and constant updates that will keep you abreast of the latest trends and opportunities in the real estate market. 

 

Enrique Vicente Urdaneta 

Real Estate Consultant | eXp Realty | EVU Luxury Homes 

📞 305.209.6418 

📧 [email protected]   

🌐 https://evuluxuryhomes.com   

📺 Subscribe to our channel on YouTube 

 

Disclaimer: The information provided is intended to provide a general overview and should not be considered legal, tax, accounting or financial advice. Complex and changing laws make consultation with qualified professionals essential. As a real estate agent, I offer guidance on real estate aspects of your investment strategy, but it is crucial to consult specialized professionals for legal, tax and financial planning matters

¿Eres Agente de Bienes Raíces y Hablas Español? Únete a nuestro equipo

Asóciese conmigo y obtendrá coaching GRATUITO sobre bienes raíces, ventas y marketing en español

Are you a Real Estate Agent and do you speak Spanish? Join our team

Partner with us and get FREE real estate, sales, and marketing coaching in Spanish
*Please note the training is entirely in Spanish.*

Follow Me on Instagram