How to Minimize Capital Gains Tax on Real Estate in 2024
Capital gains tax is a tax on the profit you make when you sell a property for more than what you paid for it. This tax can take a significant portion of your profit any time you sell real estate, which is why many property owners look for ways to minimize it.
Several tax exclusions, deferral options, and strategic methods can reduce the amount of capital gains tax you owe. In this guide, we’ll break down how capital gains tax works on different types of properties and share strategies to help you keep more money in your pocket when you sell.
Table of Contents Skip to Section
- What is capital gains tax on real estate?
- How does capital gains tax on a primary residence work?
- How does capital gains tax on rental and investment properties work?
- How to avoid capital gains tax on a home sale
- How to avoid capital gains tax on a rental property sale
- How home improvements affect capital gains
- FAQ
What is capital gains tax on real estate?
Capital gains tax on real estate is a tax imposed on the profit made when you sell a property for more than you paid for it.
The profit, or “capital gain,” is the difference between your selling price and your cost basis—the original purchase price plus any qualifying improvements or expenses related to the sale.
The two types of capital gains are short-term and long-term.
- Short-term capital gains apply if you’ve owned the property for less than a year and are taxed at your ordinary income tax rate, which can be as high as 37%.
- Long-term capital gains, for properties held longer than a year, are taxed at lower rates—0%, 15%, or 20%, depending on your income level. Various exemptions and strategies, such as the primary residence exclusion and 1031 exchanges, can help reduce or defer your capital gains tax liability on real estate.
How is capital gains tax calculated?
Calculating capital gains tax on real estate follows a step-by-step process; here’s how it works:
Step 1: Determine the net selling price
Start by calculating the property’s net selling price. To find this number, subtract the amount the property was sold for from any agent fees or closing costs.
Selling price – (Agent fees + Closing costs) = Net selling price
Step 2: Calculate the cost basis
The cost basis is what you originally paid for the property plus certain acquisition costs, such as title, legal, recording, survey, and inspection fees.
Original purchase price + Acquisition costs = Cost basis
Step 3: Adjust the cost basis
The adjusted cost basis reflects any sizable upgrades you made or any property damage or depreciation you may have claimed on your taxes (if the property was rented out or used for business purposes).
Cost basis + Capital improvements – casualty losses – Depreciation = Adjusted cost basis
Step 4: Figure the capital gain
To find the total capital gain, subtract the adjusted home basis from the net selling price:
Net selling price – Adjusted home basis = Capital gain
Step 5: Apply the relevant tax rate
Capital gains tax rates vary based on how long you owned the property. If you kept the property for less than a year, you’re taxed at your standard income tax rate, which could be as high as 37%. If you held the property for more than a year, the rates are lower—either 0%, 15%, or 20%, depending on your income level.
How does capital gains tax on a primary residence work?
Capital gains taxes are treated differently depending on whether you used the property as your primary residence or for investment purposes. When you sell your primary residence, the IRS offers tax breaks that can reduce or eliminate the capital gains tax you owe.
To qualify as your primary residence, the property must meet the following conditions in the five years leading up to the sale:
- You owned the property for a minimum of two years
- You used the property as your main home for at least two years (doesn’t need to be consecutive)
If the property passes these two tests, you may qualify for the home sale exclusion. This allows you to reduce the amount of capital gains by $250,000 for someone filing as an individual or $500,000 if you’re married and filing jointly.
In cases where the amount of the exclusion is larger than the capital gain, you don’t need to report the sale of your home to the IRS. If the exclusion doesn’t cover the capital gain, you’ll need to file Form 8949 with the IRS and pay taxes on the remaining amount.
Let’s look at a couple of examples to see how this might work.
Example 1: Capital gains fully covered by exclusion
A married couple bought a home in 1995 for $75,000 and invested $50,000 in improvements, totaling $125,000.
They sold it in 2024 for $400,000, resulting in a capital gain of $275,000 ($400,000 – $125,000). Because the home sale exclusion for married couples is $500,000, this gain is fully covered, so they owe no capital gains tax.
Example 2: Capital gains partially covered by exclusion
A single homeowner bought a home for $200,000 in 2018 and added $10,000 in improvements, totaling $210,000.
When they sold it in 2024 for $500,000, the capital gain was $290,000 ($500,000 – $210,000). With a single filer exclusion of $250,000, $40,000 of the gain is taxable ($290,000 – $250,000).
What if the property isn’t your primary residence?
When the property doesn’t qualify as your primary residence, you may still be able to claim a partial exclusion. This is typically available if you’re required to move unexpectedly—for example, if you sell your home for one of the following reasons:
- Job relocation
- Poor health
- Death of property co-owner
- Divorce
- Natural disaster
- Unemployment
- Relative needing care
Claiming a partial exclusion can reduce the taxable portion of your gain based on how long you owned and lived in the home.
How does capital gains tax on rental and investment properties work?
When you sell a rental or investment property, the IRS treats any profit from the sale as a capital gain. Because they’re not your primary residence, rental properties and other types of investment real estate don’t qualify for the home sale exclusion.
Investment property owners also need to account for depreciation when calculating capital gains, which homeowners typically don’t need to consider. The IRS allows property owners to deduct 3.636% of the property’s cost basis each year for 27 ½ years to account for depreciation.
This deduction provides tax benefits during ownership but lowers the adjusted basis, making the difference between the selling price and adjusted basis larger when the property is sold. Here are examples to illustrate:
Example 1: Calculate capital gains with depreciation for a rental
An investor bought a rental property for $150,000 in 2004 and added $10,000 in improvements, making the initial cost basis $160,000. The IRS allows a depreciation deduction of 3.636% annually, so the owner deducted $5,454 per year ($150,000 x 0.03636). Over 20 years, this totaled $109,080 in depreciation deductions.
When they sold the property in 2024 for $300,000, the capital gain calculation was as follows:
Adjusted basis: $160,000 (purchase + improvements) – $109,080 (depreciation) = $50,920
Capital gain: $300,000 (selling price) – $50,920 (adjusted basis) = $249,080
The depreciation deduction reduced the adjusted basis, resulting in a higher capital gain.
How to report the sale of an investment property
To report the sale of an investment or rental property, you’ll need to use IRS Form 8949. On the form, you’ll enter details on the sale to calculate the capital gain or loss. This number is then transferred to Schedule D on Form 1040, where the appropriate tax rate is applied to determine how much you owe.
Example 2: Depreciation recapture tax calculation
You’ll pay a separate depreciation recapture tax when you sell the property is sold. The purpose of this tax is to offset the tax benefits you received from annual depreciation deductions. The tax rate varies by income but is capped at 25% of the depreciation claimed.
Here’s how it works:
Using the same property above, the owner claimed $109,080 in depreciation over 20 years. Since the IRS applies a separate depreciation recapture tax (up to 25%) to offset the tax benefits received, the calculation is:
Depreciation recapture tax: $109,080 x 0.25 = $27,270
This recapture tax is reported separately from the capital gains tax and should be documented on Form 4797.
How to avoid capital gains tax on a home sale
Strategy 1: Home sale exclusion
The best way to avoid paying capital gains tax on the sale of your home is by using the home sale exclusion. If you’ve owned and lived in the home for two of the past five years, you can reduce your capital gains by $250,000 for a single person or $500,000 for a married couple filing together.
If you haven’t owned the home or lived there for at least two years, you may want to consider delaying the sale to take advantage of exclusion benefits. You don’t need to live there for two consecutive years, so you might meet the residency requirement by moving back temporarily. Here’s how this could work:
- You bought a home three years ago and lived in it for one year before renting it out.
- Now, you’re thinking about selling, but you don’t meet the two-year residency requirement for the capital gains exclusion.
- If you move back into the home and live there for another year, you’ll meet the two-year residency requirement within the five-year period.
- Meeting this requirement qualifies you for the full exclusion, which could reduce or eliminate your taxable gain.
Even if you don’t qualify for the full exclusion, check out situations where a partial exclusion is permitted, which you can find in IRS Publication 523.
Strategy 2: Home improvements
Home improvements increase your home’s adjusted cost basis, which reduces your taxable gains when you sell. Capital gain is calculated by subtracting the adjusted basis from the selling price, so the higher your basis, the lower your gain.
For example:
- You purchased a home for $200,000 and spent $50,000 on improvements, making your adjusted cost basis $250,000
- If you sell the home for $400,000, your capital gain is $150,000. ($400,000 – $250,000)
- Without improvements, your capital gain would be $200,000 ($400,000 – $200,000).
Keeping records of improvements allows you to lower the amount subject to capital gains tax, potentially saving you money when you sell.
The first option I suggest to clients to reduce their capital gains tax on real estate sales is to make it their primary residence for at least two years prior to selling. So if you have a second home that you can live in on a basically permanent basis, you can switch that to be your primary residence. Once you have hit the two-year period, sell it and move back into your previous residence.
Rand Millwood, CFP®
How to avoid capital gains tax on a rental property sale
Though you can’t claim a home sale exclusion on rental properties, there are a couple of ways to avoid capital gains tax, reduce the amount you’re required to pay or defer payment.
Strategy 1: 1031 exchange
The first option is a 1031 exchange that allows you to defer capital gains tax; this is done by reinvesting the proceeds from the sale of your property into another similar property. To qualify for a 1031 exchange, you must meet two requirements:
- Identify the new property at least 45 days after the old one has sold and purchase it within 180 days.
- Purchase a “like-kind” property, meaning another rental or investment property.
Remember that this does not eliminate the capital gains tax altogether; it merely delays it for as long as you own the new property.
One additional note: There are real estate investment funds that focus specifically on 1031 exchanges where you could invest your proceeds in one of these funds rather than needing to purchase another property directly.
Rand Millwood, CFP®
Strategy 2: Invest in underdeveloped communities
Another way to defer or reduce your capital gains tax load is by investing in underdeveloped communities (Opportunity Zones) through a Qualified Opportunity Fund (QOF).
When you invest gains from the sale of your rental property into a Qualified Opportunity Fund, that money can help struggling communities by supporting businesses, increasing job availability, improving infrastructure, and building new housing.
The main benefits of investing in Opportunity Zones are:
1. Defer capital gains
By investing in an Opportunity Zone, you can defer paying taxes on capital gains until you sell the investment or until December 31, 2026, whichever comes first.
2. Reduce taxable gains
Holding your Opportunity Zone investment can reduce the amount of your original gain that’s taxed:
- 5-year hold: After five years, your gain basis increases by 10%, meaning only 90% of the original gain is taxed.
- 7-year hold: After seven years, the basis increases by another 5%, reducing the taxable gain to 85%.
For example, if you defer a $100,000 gain, a 10% basis increase means $90,000 is taxable after five years. After seven years, only $85,000 of the gain is taxable.
3. Exclude new gains
If you hold your Opportunity Zone investment for at least 10 years, any new gains from the investment can be excluded from federal capital gains tax.
For example, if your $100,000 investment grows to $300,000 over 10 years, you can exclude the $200,000 gain from federal taxes, paying only on the original deferred gain.
Important dates
- Step-ups: You must invest by the end of 2021 or 2019, respectively, to qualify for the 10% or 15% basis increases.
- 10-year exclusion: Available until December 31, 2047, for investments made by the end of 2037.
How home improvements affect capital gains tax
Making improvements to your home can help reduce the capital gains tax you owe once you sell the property. Home improvements increase the property’s adjusted cost basis, effectively lowering the taxable capital gain.
But standard maintenance doesn’t qualify; it must be a “capital improvement” that adds value to the property, extends its life, or adapts it for a new use. Examples of qualifying home improvements include:
- Renovating a room, e.g., kitchen, bathroom, or bedroom
- Installing solar panels, a new HVAC system, or an in-ground pool
- Replacing the roof, siding, flooring, or windows
- Constructing a new addition
- Building a deck or patio
Whenever you make major improvements to your home or investment property, be sure to keep all relevant receipts. This will help you accurately adjust the cost basis and get all the tax benefits you deserve. Without documentation, the IRS may not approve the adjustment to your cost basis.
Where to go for help with capital gains tax on real estate
Calculating capital gains tax on real estate can be complex, especially when you consider all the various exclusions, deductions, and strategies that may apply.
If you’re planning to sell your home or investment property and want to minimize your tax burden, consider working with a CPA or tax relief company. For more immediate help, check out our guide on how to get out of tax debt for additional strategies on how to manage and reduce your tax liability.
FAQ
Is there a capital gains tax exemption for homeowners over age 55?
The over-55 home sale exemption no longer exists as a separate rule. Before 1997, homeowners over the age of 55 could exclude up to $125,000 in capital gains from the sale of their primary residence.
However, the Taxpayer Relief Act of 1997 replaced this with the current Primary Residence Exclusion, which applies to all qualifying homeowners regardless of age. Under this rule, you can exclude up to $250,000 in capital gains if you’re single, or $500,000 if you’re married and filing jointly, as long as you’ve lived in the home for at least two of the past five years.
How does capital gains tax work if you sell your home after divorce?
If you sell your home after a divorce, the capital gains tax rules may depend on your filing status and ownership structure. If the home was jointly owned, you and your ex-spouse may each qualify to exclude up to $250,000 in capital gains, provided you both meet the ownership and use tests (living in the home for at least two of the last five years).
If only one spouse remains in the home after the divorce, they may still qualify for the $250,000 exclusion if they meet the requirements. Special rules may also apply depending on how the property was transferred during the divorce settlement.
How does capital gains tax on real estate affect military personnel?
Military personnel who don’t meet the standard residency requirements may benefit from special provisions that make it easier to avoid capital gains tax on the sale of a home.
Typically, to exclude up to $250,000 (or $500,000 for married couples) in capital gains, you must have lived in the home for two of the last five years. However, military members can suspend this five-year period for up to 10 years if they are on qualified extended duty at least 50 miles from their home or living in government quarters, meaning they can sell their home and still qualify for the exclusion, even if they were stationed elsewhere.
Do widowed taxpayers need to pay capital gains tax on real estate?
Widowed taxpayers can benefit from special rules that may help them avoid or reduce capital gains tax when selling real estate. If the home was jointly owned and sold within two years of the spouse’s death, the surviving spouse could use the full $500,000 capital gains exclusion for married couples.
After two years, the exclusion reverts to $250,000 for single taxpayers. This gives widowed homeowners a window of time to sell their homes without being subject to the higher capital gains tax threshold for single filers.
Do I need to pay capital gains tax on inherited real estate?
In most cases, you don’t pay capital gains tax when you inherit real estate, but you might when you sell it. Inherited property benefits from a “step-up in basis,” meaning the property’s value resets to its market value at the time of the previous owner’s death.
When you sell the property, your capital gains tax liability is based on the difference between the sale price and the stepped-up basis, which can reduce your tax burden.
The post How to Minimize Capital Gains Tax on Real Estate in 2024 appeared first on LendEDU.