What This Calculator Does
This tool estimates the federal capital gains tax and depreciation recapture you may owe when selling a rental or investment property in the United States. Figures are estimates only and assume long-term ownership; consult a tax professional for your exact situation. State taxes, the 3.8% Net Investment Income Tax, and Section 121 exclusions are not included.
How to Use It
Enter your sale price and selling costs (agent commissions, closing fees), your original purchase price, the cost of any capital improvements, and the total depreciation you have claimed over the years. Choose your long-term capital gains rate (commonly 0%, 15%, or 20% depending on income). The calculator returns your adjusted basis, total taxable gain, and the tax broken into its two parts.
The Formula Explained
First, the adjusted cost basis equals purchase price + improvements − depreciation. The total taxable gain is net proceeds (sale price − selling costs) minus that basis. Because the IRS taxes the depreciation you previously deducted at up to 25%, that portion is separated out. The remaining capital gain is taxed at your chosen rate. The recaptured part is the smaller of the depreciation or the total gain (none on a loss). Total tax = capital gain × rate + recapture × 25%.
$$\begin{gathered} \text{Total Tax} = C \cdot \dfrac{\text{Rate \%}}{100} + 0.25 \cdot R \\[1.5em] \text{where}\quad \left\{ \begin{aligned} R &= \min\!\left(\text{Depreciation},\; \max(0,\, G)\right) \\ C &= \max\!\left(0,\; G - R\right) \\ G &= \left(\text{Sale} - \text{Costs}\right) - B \\ B &= \text{Purchase} + \text{Improvements} - \text{Depreciation} \end{aligned} \right. \end{gathered}$$Worked Example
Sell for $500,000 with $30,000 selling costs → net proceeds $470,000. Bought for $300,000, added $20,000 improvements, took $50,000 depreciation → adjusted basis $270,000. Total gain = $200,000. Recapture = $50,000 taxed at 25% = $12,500. Remaining $150,000 capital gain at 15% = $22,500. Total tax = $35,000.
$$\text{Net proceeds} = 500{,}000 - 30{,}000 = 470{,}000$$$$B = 300{,}000 + 20{,}000 - 50{,}000 = 270{,}000$$$$G = 470{,}000 - 270{,}000 = 200{,}000$$$$\text{Recapture} = 50{,}000 \cdot 0.25 = 12{,}500$$$$\text{Capital gain tax} = 150{,}000 \cdot 0.15 = 22{,}500$$$$\text{Total Tax} = 22{,}500 + 12{,}500 = 35{,}000$$
Long-Term Capital Gains Tax Brackets (US)
These are the US federal long-term capital gains rate thresholds for the 2024 tax year, based on IRS figures (Revenue Procedure 2023-34). The thresholds apply to taxable income and are adjusted for inflation every year, so check IRS.gov for the year in which you sell. They apply only to US federal tax and do not include state taxes.
| 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 |
- Unrecaptured Section 1250 gain: the part of your gain that comes from depreciation you claimed on real property is taxed at a maximum federal rate of 25%. If your ordinary rate is lower than 25%, the lower rate applies. This calculator uses a flat 25% for recapture.
- Net Investment Income Tax (NIIT): an additional 3.8% may apply to net investment income, including rental property gains, when modified adjusted gross income exceeds $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These NIIT thresholds are not indexed for inflation. The NIIT is not included in this calculator's result.
Key Terms: Basis, Recapture and Section 1250
- Adjusted cost basis
- Your original purchase price plus capital improvements, minus accumulated depreciation. In this calculator: \(B = \text{Purchase} + \text{Improvements} - \text{Depreciation}\).
- Capital improvements vs. repairs
- Improvements add value, extend the useful life or adapt the property to a new use (a new roof, an addition, a remodeled kitchen). They increase basis. Ordinary repairs that only keep the property in working condition (fixing a leak, repainting) are generally deducted as expenses in the year incurred and do not increase basis.
- Accumulated depreciation
- The total depreciation deductions you claimed, or were allowed to claim, on the rental over the years you owned it. It lowers your basis. In the US, residential rental buildings are generally depreciated over 27.5 years.
- Depreciation recapture (unrecaptured Section 1250 gain)
- The portion of your gain, up to the depreciation taken, that is taxed at a maximum federal rate of 25% rather than at the 0/15/20% capital gains rates.
- Net proceeds / selling costs
- Net proceeds are the sale price minus selling costs such as agent commissions, title and escrow fees, and legal fees. Total gain is net proceeds minus adjusted basis.
- Long-term vs. short-term holding period
- A property held for more than one year is long-term and qualifies for the preferential capital gains rates. A property held for one year or less produces short-term gain, taxed at ordinary income rates, which this calculator's rate input does not model unless you enter your ordinary rate.
- Net Investment Income Tax (NIIT)
- A 3.8% federal surtax on net investment income, which can include rental property gains, for taxpayers above certain income thresholds.
This is general information, not tax advice. Consult a qualified tax professional about your situation.
Scenario Comparison: How Inputs Change the Tax
All scenarios use a $500,000 sale price, $30,000 in selling costs, a $300,000 purchase price and $20,000 in improvements (net proceeds $470,000). Only the depreciation and the capital gains rate change. The formulas are \(B = P + I - D\), \(G = (S - K) - B\), \(R = \min(D, \max(0, G))\), \(C = \max(0, G - R)\) and Total Tax \(= C \times \text{rate} + 0.25 \times R\). Net profit after tax is total gain minus total tax.
| Scenario | Net proceeds | Adjusted basis | Total gain | Recapture tax | Capital gain tax | Total tax | Net profit after tax |
|---|---|---|---|---|---|---|---|
| A: $50,000 depreciation, 0% rate | $470,000 | $270,000 | $200,000 | $12,500 | $0 | $12,500 | $187,500 |
| B: $50,000 depreciation, 15% rate | $470,000 | $270,000 | $200,000 | $12,500 | $22,500 | $35,000 | $165,000 |
| C: $50,000 depreciation, 20% rate | $470,000 | $270,000 | $200,000 | $12,500 | $30,000 | $42,500 | $157,500 |
| D: no depreciation, 15% rate | $470,000 | $320,000 | $150,000 | $0 | $22,500 | $22,500 | $127,500 |
| E: $100,000 depreciation, 15% rate | $470,000 | $220,000 | $250,000 | $25,000 | $22,500 | $47,500 | $202,500 |
Scenario B in detail
\(B = 300{,}000 + 20{,}000 - 50{,}000 = 270{,}000\)
\(G = (500{,}000 - 30{,}000) - 270{,}000 = 200{,}000\)
\(R = \min(50{,}000,\, 200{,}000) = 50{,}000\)
\(C = \max(0,\, 200{,}000 - 50{,}000) = 150{,}000\)
\(\text{Total Tax} = 150{,}000 \times 0.15 + 0.25 \times 50{,}000 = 22{,}500 + 12{,}500 = 35{,}000\)
Takeaways: Moving from a 0% to a 20% rate changes only the capital gain portion. Depreciation lowers basis dollar for dollar, so it raises the total gain by the same amount. That depreciation is then taxed at up to 25%, so the net profit figure is higher mainly because you already received the depreciation deductions during ownership. These figures exclude state tax and the 3.8% NIIT.
FAQ
Why is depreciation taxed separately? Depreciation lowered your taxable income while you owned the property, so the IRS "recaptures" it at sale, capped at a 25% rate.
Does this include the 3.8% NIIT? No. High earners may owe an additional 3.8% Net Investment Income Tax not modeled here.
What rate should I pick? Most filers use 15%; use 20% for high income or 0% for low income, based on your total taxable income.