Selling an investment property often triggers a hefty tax bill—especially if you don’t plan ahead. Between federal, state, and depreciation recapture taxes, a large chunk of your profit may go to the IRS.
Learning how capital gains taxes work on real estate can help you reduce the amount you owe. With smart planning, it is often possible to keep more of your gains and avoid costly surprises at tax time.
What Are Capital Gains Taxes?
Capital gains taxes apply when you sell a capital asset—like stocks, cryptocurrency, or real estate—for more than your adjusted basis. These taxes apply to both personal and investment property. The tax rate depends on your income, filing status, and how long you held the asset before selling it.
How Does Capital Gains Tax on a Rental Property Work?
Capital gains tax on a rental property applies when you sell the property for more than your adjusted basis. The Internal Revenue Service categorizes the gain as either short-term or long-term based on your holding period.
Short-Term vs Long-Term Capital Gains Tax
Gains on property held for one year or less are classified as short-term capital gains and taxed as ordinary income, which is up to 37% depending on your taxable income. Gains from property held for more than a year are classified as long-term gains and taxed at more favorable rates of 0%, 15%, or 20%, also based on your total taxable income.
Investors with significant investment income from rentals may also owe the 3.8% net investment income tax (NIIT) on top of capital gains tax (see Question 8).
Calculating a Capital Gain or Loss
Your capital gain or loss is the difference between the property’s selling price and its adjusted basis.
Calculation
- Start with your property’s selling price.
- Subtract selling costs like legal fees and closing costs.
- Subtract the adjusted basis (your original purchase price, plus capital improvements, minus any depreciation deductions).
- If the result is positive, that is your realized capital gain.
- If negative, a capital loss is realized because the property sold for less than its adjusted basis.
Example
You sell a rental property for $600,000. Your selling costs, including legal fees and closing costs, total $20,000. Your original purchase price was $400,000. You invested $50,000 in capital improvements and claimed $60,000 in depreciation.
Your adjusted basis is:
$400,000 + $50,000 – $60,000 = $390,000
Your gain is:
$600,000 – $20,000 – $390,000 = $190,000 realized capital gain
Depreciation Recapture Explained
Depreciation recapture applies when you sell a rental property for more than the adjusted basis. The IRS tax code requires you to “recapture” the depreciation deductions. This portion of the gain is taxed separately from your long-term capital gains.
Depreciation recapture is taxed at a maximum rate of 25%, regardless of your regular capital gains rate. It applies only to the amount of depreciation you claimed—or could have claimed—on the property. Even if you did not deduct depreciation, the IRS still treats it as if you did when calculating your tax liability.
Long-Term Investment Properties
If you have owned your rental for many years, depreciation recapture can sharply increase your tax bill. Your real estate CPA professionals will calculate how much of your gain is subject to the 25% recapture rate and how it affects your total liability.
The good news? You may still be able to defer or minimize capital gains, even when recapture applies.
Avoid Capital Gains Taxes When Selling Property
Real estate investors can use several legal strategies to reduce or defer their capital gains tax liability. The right approach depends on your income, property type, and future investment plans. The following are the most effective methods.
Section 1031 Exchange
The Internal Revenue Code’s Section 1031 allows you to defer capital gains taxes by reinvesting the sale proceeds into another like-kind property. This strategy is common among real estate investors upgrading or diversifying their investment portfolios. You must identify the replacement property within 45 days and close within 180 days to qualify.
Use a 721 Exchange to Convert It Into a REIT
A Section 721 exchange lets you contribute investment property to a real estate investment trust (REIT) without triggering an immediate capital gain. Instead of selling the property, you transfer it to the REIT’s operating partnership in exchange for partnership units that represent ownership.
This strategy defers your obligation to pay capital gains taxes until you eventually sell those REIT shares. It is a smart move for investors who want to exit active property management but still generate passive income and long-term growth. To learn more about how the 721 exchange works, check out our article: What Is a 721 Exchange in Real Estate?
Convert Your Rental Property Into Your Primary Residence
Living in a rental property for at least two years may allow you to claim the primary residence exclusion. To qualify, you must meet the IRS ownership and use tests. In 2025 as a single filer, you can exclude up to $250,000 in gains; if you are married filing jointly, you can exclude up to $500,000.
Example
You sell your primary home that you have lived in for more than two years taking advantage of the primary residence exclusion. You move into your rental property. After living there for at least two years, you decide to sell it.
As long as you meet the IRS requirements, part of your gain may qualify for the exclusion—despite the property’s prior use as a rental.
Use an Installment Sale to Spread Gains Over Time
An installment sale spreads capital gains across multiple years, lowering your taxable income in any single year. This may reduce your capital gains rate and avoid slipping into higher brackets. Only the gain portion of each payment is taxed annually; the rest is the return of basis or interest.
It is critical to work with a CPA who specializes in real estate services to structure the agreement and forecast the long-term tax impact.
Sell During a Low-Income Year
Selling investment property when your taxable income is lowest may lower your capital gains tax rate. If your income drops into the 0% or 15% capital gains bracket, your tax bill could be significantly reduced.
Use Tax-Loss Harvesting to Offset Capital Gains
Tax-loss harvesting allows you to sell underperforming investments to realize a loss. You can then use that capital loss to offset capital gains from profitable sales of your property investments. This reduces your total tax liability.
You can deduct up to $3,000 in capital losses against ordinary income per year if your losses exceed your gains. Unused losses carry forward to future years.
Example 1
You sell a rental property and realize a $100,000 long-term capital gain. In the same year, you sell other capital assets at a $20,000 loss. You can use the $20,000 loss to reduce your taxable capital gain to $80,000.
Example 2
You sell an investment at a $15,000 loss but have no capital gains that year. You deduct $3,000 from your ordinary income and carry the remaining $12,000 loss forward. The following year, you sell a property from your investment portfolio for a capital gain and use the remaining $12,000 loss to reduce your capital gains taxes.
Invest in a Qualified Opportunity Fund
Reinvesting capital gains into a Qualified Opportunity Fund (QOF) will defer taxes. Investors have 180 days from the date of the sale to reinvest the gains into a QOF. The fund must meet Internal Revenue Code criteria to qualify for deferral and possible reduction of future tax liability.
Can You Use QOFs With Installment Sales?
You can also use QOFs with installment sales. Each time you receive a payment that includes eligible capital gain, you have 180 days from the date you receive that payment to reinvest it in a QOF (see Question 17). This lets you defer tax on gains received over multiple years, as long as each installment is reinvested on time.
Track Capital Improvements and Expenses
Add capital improvements and allowable costs to your adjusted basis to reduce your gain. This includes renovations, major repairs, and legal fees. Accurately tracking these expenses increases your adjusted basis and lowers your realized capital gain.
Work With a Real Estate-Savvy CPA
Real estate tax rules are complex—and one mistake can cost you thousands. CPAs with real estate investment taxation expertise can help you calculate capital gains, account for depreciation, and reduce your overall tax liability. They will also flag potential tax traps early—like depreciation recapture or exposure to the net investment income tax—so you can plan ahead and avoid surprises.
State-Level Capital Gains Tax Rules Vary
State tax laws differ on how they treat capital gains, and these differences will impact your total tax bill. Some states, like California, tax all capital gains as ordinary income. Others, like Florida, have no state income tax—so no state capital gains tax applies.
If you invest or sell property across multiple states, your tax liability may change significantly based on location. Some states offer exclusions, while others conform to federal rules. Always consult a CPA who specializes in multistate taxation to understand how the relevant state treats capital gains on investment property and how to plan accordingly.
Common Mistakes to Avoid
Investors often make avoidable errors that increase their capital gains tax liability. These mistakes can trigger unexpected tax bills or disqualify you from potential savings.
Forgetting depreciation recapture is a major one. The IRS will tax that portion of the gain with rates up to 25% when you sell—even if you did not actually take the depreciation deduction.
Missing 1031 exchange deadlines (e.g., identifying a replacement property within 45 days and closing within 180 days) can result in the full taxation of your sale.
Underestimating the impact of the 3.8% net investment income tax (NIIT) can also cause surprises. A CPA will evaluate your exposure and structure transactions accordingly.
Maximize Your Profit, Minimize the Tax Hit
Capital gains taxes on investment property can take a serious bite out of your profits if you are not prepared. From depreciation recapture to net investment income tax, there are multiple layers to consider—and each one affects your bottom line. The key is knowing how these rules apply to your property, your income, and your long-term goals.
Work with a CPA experienced in real estate to build a tax strategy that protects your gains and minimizes taxes. The right advisor will help you calculate your exposure, time your sale, and take advantage of every available deduction or deferral. With proactive planning, you can keep more of what you earn and avoid costly surprises when it’s time to sell.