Capital Gains Tax Calculator for Rental Property Sale
Estimate federal capital gains tax, depreciation recapture, NIIT, state tax, and after-tax proceeds.
How to Calculate Capital Gains Tax on Rental Property Sale: Expert 2024 Guide
If you are selling a rental property, your tax bill is usually made up of more than one line item. Many owners only plan for a single capital gains percentage, but the actual result can include depreciation recapture, long-term capital gains tax, a possible Net Investment Income Tax surcharge, and state-level tax. The goal of this guide is to show a practical framework so you can estimate your tax impact before you list your property, negotiate a sale, or close escrow.
At a high level, the process is simple: determine your gain, split it into the correct tax buckets, apply your federal and state rates, and then estimate after-tax cash. In practice, each step has detail. You need an accurate adjusted basis, the right treatment of depreciation, and a realistic estimate of your filing status and other income in the tax year of sale.
Step 1: Determine Amount Realized
Your amount realized is generally the gross sale price minus selling expenses. For rental real estate, selling expenses often include broker commissions, escrow and title charges, transfer taxes, and legal fees tied directly to the transaction.
- Amount Realized = Sale Price – Selling Costs
- Use the final settlement statement so your estimate matches actual closing numbers.
- Do not confuse selling expenses with mortgage payoff. Loan payoff affects cash to seller, but not taxable gain calculation.
Step 2: Calculate Adjusted Basis Correctly
Adjusted basis is your tax cost basis after required increases and decreases. This is where many errors happen because owners forget basis adjustments over years of ownership.
- Start with original purchase price.
- Add purchase closing costs that are basis-eligible.
- Add capital improvements (new roof, additions, major system upgrades).
- Subtract depreciation allowed or allowable on the building portion.
Adjusted Basis = Purchase Price + Basis-Eligible Closing Costs + Capital Improvements – Depreciation
Important point: for federal tax, depreciation recapture can apply to depreciation that was allowable even if you did not claim it. That is one reason complete records are critical.
Step 3: Compute Total Gain
Once you have amount realized and adjusted basis, your preliminary gain is straightforward:
- Total Gain = Amount Realized – Adjusted Basis
If this number is negative, you have a loss rather than a gain. Loss handling can be complex and depends on passive activity rules, suspended losses, and overall tax profile. The calculator above focuses on gain scenarios but still flags if a loss is present.
Step 4: Separate Depreciation Recapture from Remaining Gain
For many rental owners, this is the most expensive surprise. The portion of gain attributable to depreciation is generally taxed as unrecaptured Section 1250 gain, often up to a 25% federal rate. In practical planning, this is commonly modeled as:
- Depreciation Recapture Portion = lesser of total gain or total depreciation
- Recapture Tax Rate = up to 25% (and often limited by your ordinary bracket)
The remainder of gain may qualify for long-term capital gains rates if you held the property for more than one year.
Step 5: Apply Federal Capital Gains Rates and NIIT
Long-term capital gains rates are tied to taxable income levels. If your gain pushes your total taxable income into higher bands, parts of the gain can be taxed at different rates. That is why progressive treatment matters. In addition, high-income taxpayers may owe the 3.8% Net Investment Income Tax.
The calculator uses 2024 federal thresholds and computes long-term gain tax progressively based on your taxable income excluding the gain, then layers in the gain amount. It also estimates NIIT when selected.
| 2024 Federal Thresholds | Single | Married Filing Jointly | Head of Household | Married Filing Separately |
|---|---|---|---|---|
| Long-term gain 0% bracket top | $47,025 | $94,050 | $63,000 | $47,025 |
| Long-term gain 15% bracket top | $518,900 | $583,750 | $551,350 | $291,850 |
| NIIT MAGI threshold | $200,000 | $250,000 | $200,000 | $125,000 |
| NIIT rate | 3.8% | 3.8% | 3.8% | 3.8% |
Step 6: Add State Tax and Estimate Net Proceeds
Many sellers live in states with separate taxation of capital gains, often at ordinary income rates. A clean planning model includes a state tax estimate as a percentage of total taxable gain. The calculator applies your state percentage input to the total gain so you can see a fast net estimate:
- Total Estimated Tax = Federal Components + NIIT + State Tax
- Net Proceeds After Estimated Tax = Amount Realized – Total Estimated Tax
This is not a substitute for a return-level calculation, but it is excellent for decision support when comparing sale timing, pricing options, or reinvestment strategies.
Depreciation and Recapture Reference Data You Should Know
Even experienced investors sometimes underestimate how much depreciation reduces basis over time. Knowing these core figures helps you avoid surprises at closing.
| Depreciation Statistic | Residential Rental Property | Nonresidential Real Property |
|---|---|---|
| MACRS recovery period | 27.5 years | 39 years |
| Straight-line annual rate (full-year equivalent) | About 3.636% per year | About 2.564% per year |
| Typical max federal rate on unrecaptured Section 1250 gain | Up to 25% | Up to 25% |
Advanced Planning Levers Before You Sell
1) Improve Basis Documentation
If you cannot prove a capital improvement, you may not get basis credit. Build a digital file with invoices, permits, contractor agreements, and payment records. The time spent here can materially reduce taxable gain.
2) Coordinate Sale Timing with Income
Because federal long-term gain rates depend on taxable income, sale timing can matter. A year with lower ordinary income may allow more gain to fall into lower bands. For high earners near NIIT thresholds, timing can also affect the NIIT portion.
3) Evaluate Installment Sale Treatment
In some transactions, spreading gain recognition over multiple years can help smooth brackets and possibly reduce immediate tax burden. However, depreciation recapture is generally recognized in the year of sale, so the benefit depends on structure.
4) Consider 1031 Exchange Eligibility
A properly structured like-kind exchange may defer gain recognition rather than eliminate it. Rules are strict and timeline-sensitive. If this is part of your strategy, involve your qualified intermediary and tax advisor before you sign contracts.
5) Account for Passive Activity Carryforwards
Some owners have suspended passive losses that become usable when disposing of the entire interest in the passive activity in a taxable transaction. This can materially change final tax due.
Common Mistakes When Estimating Rental Property Capital Gains Tax
- Using market value as basis: basis starts from tax cost, not current appraisal value.
- Ignoring depreciation recapture: this often creates the largest gap between expectation and reality.
- Forgetting selling costs: these reduce amount realized and can meaningfully reduce gain.
- Treating all gain at one flat rate: federal gain may be split across 0%, 15%, and 20% bands.
- Overlooking NIIT: higher-income taxpayers may owe the additional 3.8%.
- Missing state tax impact: state treatment varies and can significantly change net proceeds.
Worked Example Concept
Assume a rental sells for $550,000 with $35,000 in selling costs. Amount realized is $515,000. If adjusted basis is $281,000, total gain is $234,000. If depreciation taken was $65,000, then up to $65,000 may be recapture bucket, with the balance potentially taxed at long-term capital gains rates. Add NIIT and state tax, and the final number can be much larger than a simple 15% assumption. That is why component-level estimates are better for planning.
Authoritative Sources for Rules and Current Guidance
Use primary sources whenever possible. These are high-quality starting points:
- IRS Publication 544 (Sales and Other Dispositions of Assets)
- IRS Publication 527 (Residential Rental Property)
- IRS Tax Topic 559 (Net Investment Income Tax)
Final Takeaway
To calculate capital gains tax on rental property sale correctly, think in layers: amount realized, adjusted basis, total gain, depreciation recapture, long-term gain bands, NIIT, and state tax. A structured estimate helps you negotiate with confidence, choose timing deliberately, and understand true after-tax liquidity. Use the calculator above as a planning tool, then confirm your final numbers with a qualified tax professional who can review your exact depreciation schedules, closing documents, and return-level data.