DEV Community

Lina Reeves
Lina Reeves

Posted on

Capital Gains Tax on Real Estate: What Most Investors Miss

You closed on a rental property in 2020 for $320,000. You put $20,000 into a new roof and $8,000 into HVAC work. Now, in 2026, you are selling for $435,000. Your realtor takes 6%. Your profit looks simple: sale price minus purchase price. That is wrong, and it costs you.

The capital gains tax on real estate is the single largest expense most investors underestimate. In 2026, the long-term capital gains tax rates remain at 0%, 15%, and 20%, depending on your taxable income. But that is only the federal piece. Add state taxes (California at 13.3%, Texas at 0%) and the 3.8% Net Investment Income Tax (NIIT) for high earners. Your effective rate can hit 23.8% federal plus state. On a $100,000 gain, that is $23,800 gone.

The mistake? Most investors calculate gain as sale price minus purchase price. That ignores cost basis adjustments, depreciation recapture, and selling costs.

Here is the real math on that $320,000 property.

Step 1: Adjusted Cost Basis

You bought for $320,000. You added $28,000 in capital improvements (roof and HVAC). Repairs are not improvements. Your adjusted basis is $348,000. But you also claimed depreciation over 5 years. For residential rental property, depreciation is 27.5 years. On a $320,000 building (assume $80,000 land value, $240,000 building), annual depreciation is about $8,727. Over 5 years, that is $43,636 in depreciation claimed. Your adjusted basis drops to $304,364 ($348,000 minus $43,636).

Step 2: Capital Gain vs. Depreciation Recapture

You sell for $435,000. Subtract 6% commission ($26,100) and closing costs (title, transfer taxes, about $4,000). Net sale proceeds: $404,900.

Gain: $404,900 minus adjusted basis of $304,364 = $100,536.

Here is the split. Depreciation recapture is taxed at a flat 25% on the depreciation claimed. That is $43,636 x 25% = $10,909. The remaining gain ($100,536 - $43,636 = $56,900) is taxed at your long-term capital gains rate. At 20% federal plus 3.8% NIIT, that is 23.8%. That equals $13,542.

Total federal tax: $10,909 + $13,542 = $24,451. Add state tax (say 5% flat) on the full gain: $5,027. Total tax: $29,478.

You thought profit was $115,000. After tax, you keep $85,522. That is a 25% tax hit, not 15%.

The Depreciation Trap

Many investors skip depreciation to avoid recapture. That is a mistake. Depreciation reduces your taxable income each year at your ordinary rate (often 24% or 32%). Recapture is only 25%. You come out ahead by claiming it. But you must track it.

Use a Depreciation Calculator to model your exact building value, land allocation, and recovery period. It shows your annual deduction and cumulative recapture liability. Run the numbers before you sell, not after.

How to Defer the Tax: 1031 Exchange

The IRS Section 1031 exchange lets you defer all capital gains and depreciation recapture taxes if you reinvest into a like-kind property. In 2026, this still applies to real estate held for investment or business use. You have 45 days to identify replacement properties and 180 days to close.

The math: You sell for $404,900 net. Your gain is $100,536. You want to avoid $29,478 in taxes. You find a replacement property for at least $404,900. You put all proceeds into it. Tax deferred. Zero due now.

But timing is tight. Missing the 45-day identification window kills the exchange. Use a 1031 Exchange Calculator to see how much equity you must reinvest to fully defer. It shows your boot (cash not reinvested) and taxes on that boot.

Primary Residence Exclusion

If you lived in the property for 2 of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (married). This is the single biggest tax break in real estate. It applies to your primary residence, not rentals. But you can convert a rental to your primary residence, live in it for 2 years, then sell tax-free on the gain (subject to some phase-in rules for depreciation recapture after 2009).

Example: You bought a duplex in 2020, rented both sides. In 2024, you move into one unit. In 2026, you sell. You qualify for the exclusion on the appreciation during your ownership, but you still pay recapture on depreciation claimed after May 6, 1997. Smart planning.

Hard Money and Conventional Financing in 2026

In 2026, conventional 30-year fixed rates hover around 7.5%. Hard money loans for fix-and-flip run 12% interest plus 2-4 points. That high cost eats into your net proceeds. If you financed a flip with hard money at 12% for 6 months on a $250,000 loan, that is $15,000 in interest plus $7,500 in points. That $22,500 reduces your gain by that amount, lowering your tax bill. But it also lowers your profit.

Run your ROI before and after taxes. A Real Estate ROI Calculator helps you see the full picture including financing costs, holding costs, and tax impact. For rental properties, use the Rental Property ROI to factor in depreciation, mortgage interest, and capital gains at exit.

The Capital Gains Tax Calculator

Before you list a property, calculate your estimated tax. The Capital Gains Tax Calculator takes your purchase price, improvements, depreciation claimed, sale price, and your tax bracket. It splits out recapture vs. capital gain and shows state tax estimates. I ran the numbers above using it. It took 2 minutes.

What Most Investors Miss

Three things.

  1. Cost basis adjustments. Every capital improvement adds to basis. Repairs do not. Keep receipts for roofs, HVAC, windows, flooring, plumbing, electrical. These reduce your gain dollar for dollar. Most investors lose $5,000 to $15,000 in tax deductions by missing improvement documentation.

  2. Depreciation recapture rate. It is 25% flat. Not your ordinary rate.

Top comments (0)