Capital gains tax on real estate calculator

Estimate the federal tax on selling a home or investment property in 2026. The calculator applies IRS rules for the home sale exclusion, the 0%, 15% and 20% long-term rates, depreciation recapture and the net investment income tax.

On this page

Real estate capital gains tax calculator

The starting figures describe a hypothetical married couple selling their main home of more than two years. Tax figures are for sales in tax year 2026, from IRS Revenue Procedure 2025-32, checked October 19, 2026.

Commission, title, transfer taxes
Closing costs and capital improvements that add to basis
For rental or business use; 0 if none
After deductions, before this sale
Owned and lived in it 2 of the last 5 years
Estimated federal tax
$21,392
3.4% of the total gain
Total gain
$634,000
Amount realized $1,034,000 − basis $400,000
Taxable gain
$134,000
$500,000 excluded as a home sale
Capital gains tax
$20,100
At 0%, 15% or 20%
Depreciation recapture tax
$0
Up to 25% on depreciation claimed
Net investment income tax
$1,292
3.8% above the income threshold

Formula: Gain = (sale price − selling costs) − (purchase price + purchase costs and improvements − depreciation). Taxable gain = gain − home sale exclusion. Depreciation is taxed at ordinary rates capped at 25%; the rest of a long-term gain at 0%, 15% or 20%, stacked on top of other taxable income.

This is a federal estimate for planning, not tax advice. It leaves out state and local tax, 1031 exchanges, partial exclusions, installment sales, and capital losses from other investments. The net investment income tax uses other taxable income plus the gain in place of modified adjusted gross income. Check your figures with a tax professional before you file.

All real estate calculators

How capital gains tax on real estate is calculated

The IRS works from the gain, not the sale price. Here are the default home sale and a rental sale, both worked through with 2026 figures.

  1. Find the gain

    The couple sells for $1,100,000 and pays $66,000 in selling costs, for an amount realized of $1,034,000. Their basis is the $350,000 purchase price plus $50,000 of purchase costs and improvements: $400,000. The gain is $634,000.

  2. Apply the home sale exclusion

    Married couples filing jointly who meet the ownership and use tests can exclude up to $500,000 of gain on a main home; most other filers can exclude up to $250,000. That leaves $134,000 taxable.

  3. Apply the long-term rate

    Their other taxable income of $150,000 is already above the 2026 top of the 0% bracket for joint filers, $98,900, and the gain stays below the 15% ceiling of $613,700. So $134,000 × 15% = $20,100.

  4. Add the net investment income tax

    The 3.8% tax applies to the smaller of the taxable gain or income above $250,000 for joint filers. $150,000 + $134,000 − $250,000 = $34,000, so the tax is $1,292. Total estimate: $21,392, or 3.4% of the gain.

  5. Rental example

    A single filer with $100,000 of other taxable income sells a rental for $500,000, pays $30,000 to sell and bought it for $300,000. After claiming $60,000 of depreciation, the basis is $240,000 and the gain is $230,000. No exclusion applies. The $60,000 of depreciation is taxed at ordinary rates up to 25%: $14,286. The other $170,000 is taxed at 15%: $25,500. The 3.8% tax on $130,000 adds $4,940. Total estimate: $44,726.

If the same rental had been owned one year or less, the whole $230,000 would be taxed at ordinary rates and the estimate would rise to about $72,497.

IRS rules behind the numbers

Figures are for tax year 2026. The IRS adjusts brackets each year, so check the current revenue procedure for later sales.

2026 long-term rates

0% up to $49,450 of taxable income for single filers, $98,900 for joint filers and $66,200 for heads of household. 15% up to $545,500, $613,700 and $579,600. 20% above that. Married filing separately: 0% to $49,450, 15% to $306,850.

Home sale exclusion

Up to $250,000 of gain, or $500,000 for most joint filers, if you owned and lived in the home for at least 24 months of the 5 years before the sale. You generally cannot use it if you excluded gain on another home in the previous 2 years.

Depreciation recapture

Depreciation allowed or allowable on a rental or home office is taxed at up to 25% as unrecaptured section 1250 gain, and the home sale exclusion does not cover depreciation taken after May 6, 1997.

Net investment income tax

3.8% on the smaller of net investment income or modified adjusted gross income above $200,000 for single filers and heads of household, $250,000 for joint filers and $125,000 for married filing separately. Gain excluded as a home sale is not counted.

Frequently asked questions

QUICK ANSWERS

How we reviewed this

IRS sources reviewed October 19, 2026. Tax figures apply to tax year 2026. The worked examples are hypothetical.

Sources