Capital Gains Tax Calculator for Rental Property Sale
Estimate federal capital gains tax, depreciation recapture, NIIT, and optional state tax when selling an investment rental property.
Expert Guide: How to Calculate Capital Gains Tax on a Rental Property Sale
Selling a rental property often creates one of the largest single tax events in an investor’s financial life. A lot of owners expect one flat capital gains rate, but the actual calculation is layered. In most cases, you need to account for adjusted basis, depreciation recapture, long-term capital gains brackets, possible Net Investment Income Tax (NIIT), and state taxes. The good news is that the process becomes manageable once you break it into discrete steps and understand the formulas.
This guide explains exactly how to calculate rental property capital gains tax in a practical, tax-prep-ready way. It is designed for investors, landlords, and advisors who want a clear framework before they meet with a CPA or enrolled agent. This is educational information, not legal or tax advice.
1) Understand the Tax Building Blocks
When you sell a rental property, the IRS generally looks at your transaction through these key components:
- Amount realized: sale price minus selling expenses (agent commissions, title fees, transfer taxes, legal costs related to sale).
- Adjusted basis: original cost plus capital improvements, minus depreciation deductions taken (or allowable).
- Total gain: amount realized minus adjusted basis.
- Depreciation recapture (unrecaptured Section 1250 gain): portion of gain attributable to depreciation, typically taxed at up to 25% federally.
- Remaining long-term capital gain: taxed at 0%, 15%, or 20% depending on filing status and taxable income.
- NIIT: potentially 3.8% on net investment income for higher-income taxpayers.
2) Start with Adjusted Basis, Not Original Purchase Price
Many investors overpay taxes in estimates because they forget to update basis properly. Your adjusted basis is more than what you paid at closing years ago. You should generally include eligible capital improvements, such as roof replacement, major HVAC upgrade, structural remodels, additions, and long-life improvements. Routine repairs usually do not increase basis.
Formula:
- Original purchase price
- + Capitalized closing costs and acquisition costs (where applicable)
- + Capital improvements over ownership period
- – Depreciation claimed or allowable
- = Adjusted basis
Why depreciation matters so much: depreciation lowers taxable rental income each year, but usually increases taxable gain at sale because your basis is reduced. That lower basis can materially increase the tax impact in strong appreciation markets.
3) Calculate Amount Realized and Total Gain
After finding adjusted basis, calculate your amount realized. This is usually sale price minus selling costs. Then subtract adjusted basis to find total gain. If this number is negative, you may have a capital loss scenario rather than capital gain, and different rules apply.
Formula:
- Amount realized = Sale price – Selling costs
- Total gain = Amount realized – Adjusted basis
For planning, this is the most important inflection point. Once total gain is known, you can split it into depreciation recapture and remaining gain.
4) Apply Federal Long-Term Capital Gains Brackets
If your holding period is more than one year, the remaining gain after depreciation recapture is taxed under long-term capital gains brackets. These federal brackets are lower than ordinary income rates for many taxpayers and are one reason investors hold property beyond one year.
| 2024 Filing Status | 0% Rate Up To | 15% Rate Up To | 20% Rate Above |
|---|---|---|---|
| Single | $47,025 | $518,900 | $518,900 |
| Married Filing Jointly | $94,050 | $583,750 | $583,750 |
| Married Filing Separately | $47,025 | $291,850 | $291,850 |
| Head of Household | $63,000 | $551,350 | $551,350 |
These thresholds are applied against your taxable income position, so the rate on your gain can be split across brackets. For example, part of the gain may fall in 15% and the rest in 20% if your income is high enough.
5) Include Depreciation Recapture and NIIT
Rental property owners often underestimate tax because they focus only on the 15% capital gains headline rate. Depreciation recapture and NIIT can increase effective tax materially. Depreciation recapture is generally taxed up to 25% on the portion of gain attributable to depreciation. NIIT can add 3.8% when income exceeds threshold amounts.
| Federal Parameter | Rate or Threshold | Why It Matters for Rental Sales |
|---|---|---|
| Depreciation recapture (unrecaptured Sec. 1250 gain) | Up to 25% | Applies to depreciation portion of gain, often a major tax layer. |
| Net Investment Income Tax (NIIT) | 3.8% | Additional federal tax for higher-income filers with investment income. |
| NIIT threshold, Single / HOH | $200,000 | Income above threshold can trigger NIIT on investment income. |
| NIIT threshold, Married Filing Jointly | $250,000 | Common trigger point for couples selling appreciated rentals. |
| NIIT threshold, Married Filing Separately | $125,000 | Lower threshold means NIIT may start sooner. |
6) Practical Step-by-Step Example
Suppose an investor sells a rental for $550,000, has $35,000 in selling costs, originally paid $320,000, added $45,000 in improvements, and claimed $70,000 in depreciation.
- Amount realized = $550,000 – $35,000 = $515,000
- Adjusted basis = $320,000 + $45,000 – $70,000 = $295,000
- Total gain = $515,000 – $295,000 = $220,000
- Recapture portion = min($70,000, $220,000) = $70,000
- Remaining long-term gain = $150,000
- Apply long-term rates based on filing status and total taxable income stack
- Check NIIT threshold and compute additional 3.8% if applicable
- Add state tax estimate (if your state taxes capital gain)
This layered approach gives a more realistic estimate than multiplying total gain by one rate. It also highlights planning opportunities like installment sales, timing deductions, or coordinating gain recognition year to year.
7) Common Mistakes That Increase Tax or Create Surprises
- Ignoring depreciation recapture: this is one of the most common underestimation errors.
- Forgetting capital improvements: if not documented, owners may miss legitimate basis increases.
- Using gross sale price instead of amount realized: selling expenses usually reduce taxable gain.
- Not modeling NIIT: high-income filers often discover this only at return time.
- Assuming all gain is taxed at 15%: portions can be 20% plus NIIT and state tax.
- Skipping state analysis: many states tax gain as ordinary income rates.
- Poor recordkeeping: missing invoices for improvements can raise taxable gain.
8) Tax Planning Strategies to Discuss with a Professional
Before listing a property, meet with a CPA and run multiple scenarios. Depending on your goals and timeline, some strategies may reduce or defer tax exposure:
- 1031 exchange: defer gain by exchanging into like-kind real estate under strict IRS rules and timing.
- Installment sale structure: spread recognized gain over years to manage bracket exposure.
- Offsetting with capital losses: harvested losses from other investments may reduce net gain.
- Timing the closing date: year-end timing can shift gain into a lower-income year.
- Reviewing suspended passive losses: disposition can unlock losses that offset income.
- Entity and ownership review: filing status and ownership structure can change outcomes.
Each approach has tradeoffs in liquidity, diversification, debt constraints, compliance complexity, and estate planning implications. Planning should align with cash-flow needs and long-term portfolio strategy, not tax rate alone.
9) Documentation Checklist Before You Sell
To protect your basis and speed accurate tax prep, organize records before the sale closes:
- HUD-1 or closing disclosure from purchase and sale
- Capital improvement invoices and proof of payment
- Depreciation schedules from prior tax returns
- Settlement statements and broker commissions
- Property tax and insurance records related to settlement adjustments
- Entity documents if property is held in LLC or partnership
Good documentation does not just reduce stress. It can directly reduce taxes by supporting higher basis and deductible selling costs.
10) Authoritative Sources You Should Review
For official rules and current updates, review IRS publications and federal law references directly:
- IRS Publication 544: Sales and Other Dispositions of Assets
- IRS Topic No. 409: Capital Gains and Losses
- Cornell Law School (LII): 26 U.S. Code Section 1411, Net Investment Income Tax
Final Takeaway
Calculating capital gains tax on a rental property sale is a multi-step process, but it is not guesswork. If you correctly compute adjusted basis, split gain into depreciation recapture and remaining long-term gain, then layer in NIIT and state tax, your estimate becomes much more accurate and useful for decision-making. Use the calculator above to build a first-pass projection, then validate assumptions with a qualified tax professional before closing.
Important: Tax rules can change, and your actual liability may differ based on passive loss carryforwards, installment treatment, 1031 timelines, entity structure, AMT interactions, and state-specific law. Always confirm final numbers with licensed tax counsel or a CPA.