Capital Gains Tax Calculator for Rental Property Sales
Estimate depreciation recapture, federal capital gains tax, NIIT, state tax, and after-tax proceeds in one view.
How to Calculate Capital Gains Tax on the Sale of a Rental Property
Selling a rental property can trigger one of the largest tax events in an investor’s life. Unlike the sale of a primary residence, most rental sales face multiple layers of tax: depreciation recapture, long-term capital gains tax, potential Net Investment Income Tax, and state income tax. If you want to accurately calculate capital gains tax on sale of rental property, you need a clear process and a solid understanding of each component. This guide walks you through the full framework so you can estimate your tax bill before you list, negotiate more intelligently, and avoid expensive surprises at closing.
Step 1: Determine Your Adjusted Basis
Your adjusted basis is the tax foundation used to measure gain. Start with your purchase price, then add costs that are capitalized (such as certain closing costs and major improvements), and subtract depreciation you claimed or were allowed to claim. A common source of underestimation is forgetting to reduce basis by depreciation. Even if you did not claim all depreciation, the IRS generally treats allowable depreciation as reducing your basis, which can increase gain on sale.
- Starting basis: purchase price of the building and land.
- Additions: settlement costs allocable to basis, major capital improvements, additions, structural upgrades.
- Reductions: depreciation deductions over the ownership period.
Formula: Adjusted Basis = Purchase Price + Capitalized Costs + Improvements – Depreciation.
Step 2: Calculate Amount Realized
Amount realized is what you effectively receive from the sale after direct selling costs. This usually includes the contract sale price reduced by real estate commissions, legal fees, transfer taxes, and other allowable selling expenses. Investors sometimes confuse mortgage payoff with selling costs. Your loan payoff impacts cash at closing, but it does not reduce taxable gain directly. Taxable gain is based on amount realized versus adjusted basis, not your remaining debt.
Formula: Amount Realized = Sale Price – Selling Expenses.
Step 3: Compute Total Gain (or Loss)
Once adjusted basis and amount realized are known, gain is straightforward:
Total Gain = Amount Realized – Adjusted Basis.
If this number is negative, you may have a capital loss. If positive, your gain often gets split into at least two tax buckets for rental property: depreciation recapture and remaining capital gain.
Step 4: Separate Depreciation Recapture from Remaining Gain
For most depreciable real property, the portion of gain tied to prior depreciation is generally taxed as unrecaptured Section 1250 gain, with a maximum federal rate of 25%. This recapture portion is usually the lesser of total depreciation taken and total gain. The remaining gain is generally taxed at long-term capital gains rates (0%, 15%, or 20%) if holding period exceeds one year.
- Calculate total gain.
- Recapture portion = lesser of total depreciation and total gain.
- Remaining long-term gain = total gain – recapture portion.
Important: The exact treatment can vary in edge cases, entity structures, installment sales, or mixed-use property. Use this as a high-quality estimate framework, then confirm with a CPA or enrolled agent.
Federal Tax Rate Comparison Data (2025 Reference Brackets)
The long-term capital gains rates are tiered and depend on filing status and taxable income. The table below shows commonly referenced 2025 thresholds. Always verify current-year values before filing.
| Filing Status | 0% LTCG Rate Up To | 15% LTCG Rate Up To | 20% LTCG Rate Above | NIIT Threshold (MAGI) |
|---|---|---|---|---|
| Single | $47,025 | $518,900 | Over $518,900 | $200,000 |
| Married Filing Jointly | $94,050 | $583,750 | Over $583,750 | $250,000 |
| Married Filing Separately | $47,025 | $291,850 | Over $291,850 | $125,000 |
| Head of Household | $63,000 | $551,350 | Over $551,350 | $200,000 |
These rates stack on top of your taxable income before the sale. That means two investors with the same property gain can owe very different tax depending on income, filing status, and deductions.
State Tax Differences Can Be Material
Many investors focus only on federal tax, but state tax can significantly alter net proceeds. Some states tax capital gains as ordinary income, some have no wage income tax, and some apply special treatment. The examples below are broad directional references and should be validated for your filing year and residency facts.
| State (Selected) | General Treatment of Capital Gains | Approximate Top Marginal Rate Context | Planning Impact |
|---|---|---|---|
| California | Taxed as ordinary income | Up to about 13.3% | Can materially reduce after-tax proceeds on large exits |
| New York | Taxed as ordinary income at state level | Top state rates above 10% | High-income sellers should model combined federal and state burden |
| Texas | No state personal income tax | 0% state income tax | Federal tax usually dominates projection |
| Florida | No state personal income tax | 0% state income tax | Useful benchmark when comparing relocation scenarios |
| Washington | Has a state capital gains tax with exemptions and thresholds | 7% tax above applicable exemption levels | Check whether real estate transaction falls within exemptions |
Worked Example: Full Rental Property Tax Estimate
Suppose you purchased a rental property for $300,000, added $6,000 in capitalizable closing costs, made $50,000 in improvements, and claimed $80,000 depreciation. You sell for $550,000 and pay $35,000 in selling costs. Your taxable income before sale is $120,000 filing jointly.
- Adjusted basis = 300,000 + 6,000 + 50,000 – 80,000 = $276,000
- Amount realized = 550,000 – 35,000 = $515,000
- Total gain = 515,000 – 276,000 = $239,000
- Depreciation recapture portion = min(80,000, 239,000) = $80,000
- Remaining LTCG = 239,000 – 80,000 = $159,000
Then apply federal rates, NIIT if applicable, and state tax. This calculator automates those steps and shows your estimated tax breakdown visually so you can compare strategies, including holding longer, accelerating improvements before sale, or exploring a 1031 exchange for deferral (when eligible).
Common Mistakes When Estimating Capital Gains Tax
- Ignoring depreciation recapture: This is often the largest surprise because it can be taxed up to 25% federally.
- Using sale price instead of amount realized: Selling expenses reduce gain and should be included.
- Forgetting basis adjustments: Improvements increase basis; depreciation reduces it.
- Assuming one flat federal rate: Long-term gains may cross multiple brackets.
- Skipping NIIT: High-income taxpayers can owe an additional 3.8%.
- Missing state tax: State impact can rival federal in high-tax jurisdictions.
Tax Planning Moves Before You Sell
Effective planning starts months before listing. If you are near a bracket breakpoint, timing income can improve the blended rate on long-term gain. If your property needs major work, distinguish repairs from capital improvements and keep complete records. For larger portfolios, evaluate installment sale structures, entity-level considerations, and partial disposition accounting for renovated components. If your objective is deferral rather than exit, a properly structured 1031 exchange may defer gain and recapture, although strict deadlines apply.
Also consider charitable strategies or harvesting other capital losses in the same year to offset capital gains where permitted. Keep in mind that personal cash flow decisions should not override tax fundamentals. Sometimes paying tax now and redeploying capital can outperform a forced hold based on tax aversion alone.
Authoritative Sources You Should Review
- IRS Publication 523 (Selling Your Home, includes basis and gain concepts)
- IRS Topic No. 409 (Capital Gains and Losses)
- Cornell Law School Legal Information Institute: U.S. Tax Code (26 U.S.C.)
IRS guidance and tax code language can be technical, but they are the best primary references when you need precision. Use this calculator for decision support, and confirm final reporting positions with a licensed tax professional.
Bottom Line
To calculate capital gains tax on sale of rental property correctly, treat it as a multi-step analysis, not a single percentage. Build adjusted basis carefully, subtract selling costs, split gain into recapture and long-term components, and apply federal, NIIT, and state layers. With clean records and a structured estimate, you can set realistic net proceeds, negotiate confidently, and avoid unpleasant tax surprises.