Capital Gains Tax Calculator for Rental Property Sales
Estimate adjusted basis, depreciation recapture, long-term capital gains, state tax, and potential NIIT impact before you sell.
Your Results
Enter your numbers and click Calculate to see your estimated capital gains tax breakdown.
How to Calculate Capital Gains on Sale of Rental Property: Expert Guide for Investors
When you sell a rental property, your tax bill is not based only on your profit at closing. It is based on a series of tax calculations that include your adjusted basis, selling expenses, depreciation claimed over the years, holding period, and federal and state tax rules. Many landlords are surprised because the check they receive at closing can look strong, but their after-tax proceeds are lower than expected once depreciation recapture and capital gains taxes are applied. This guide shows how to calculate capital gains on sale of rental property step by step so you can make informed decisions about pricing, timing, and tax strategy.
Why rental property gains are taxed differently
Rental real estate is investment property, not a primary residence in most cases. That means your gain is generally taxable. You may owe multiple layers of tax:
- Depreciation recapture tax on depreciation deductions previously claimed (often up to 25% federally on unrecaptured Section 1250 gain).
- Long-term capital gains tax at 0%, 15%, or 20% depending on taxable income if held more than one year.
- Short-term tax at ordinary rates if held one year or less.
- State income tax in most states.
- Net Investment Income Tax (NIIT) of 3.8% for certain higher-income taxpayers.
If you want a realistic estimate, you must separate the gain into components, especially depreciation recapture versus remaining appreciation gain. The calculator above does that in a practical way for planning purposes.
Step 1: Determine adjusted basis correctly
Your adjusted basis is the starting point for gain calculation. It usually begins with what you paid for the property and then gets adjusted over time.
- Start with purchase price.
- Add basis-increasing costs such as certain acquisition closing costs and capital improvements.
- Subtract depreciation taken or allowable depreciation.
Formula:
Adjusted Basis = Purchase Price + Buying Costs + Capital Improvements – Depreciation Claimed
Important note: repairs typically are not added to basis, but capital improvements generally are. A new roof may be a capital improvement, while minor patch repairs usually are not.
Step 2: Determine amount realized on sale
Your sale price is not automatically your taxable proceeds. Selling costs reduce the amount realized.
Amount Realized = Sale Price – Selling Costs
Selling costs can include agent commissions, transfer taxes, title fees, and certain attorney fees directly tied to the transaction. Keeping documentation matters because these costs can reduce taxable gain.
Step 3: Compute total gain
Total Gain = Amount Realized – Adjusted Basis
If total gain is negative, you have a loss for tax purposes, and separate tax rules may apply for deductibility depending on your full return. If total gain is positive, then continue into the recapture and capital gain split.
Step 4: Split gain into depreciation recapture and remaining capital gain
The part of your gain equal to prior depreciation is often taxed differently from pure appreciation. A common planning approximation is:
- Depreciation Recapture Portion = lesser of total gain or total depreciation claimed
- Remaining Capital Gain = total gain – recapture portion
This split is the biggest reason rental property tax estimates differ from simple sale-price-minus-purchase-price math.
Step 5: Apply federal, state, and NIIT rates
For long-term holdings, federal tax often combines recapture tax and long-term capital gains tax. For short-term holdings, gains are usually taxed at ordinary income rates. State tax is then added. NIIT may apply based on modified adjusted gross income thresholds and net investment income calculations.
| Federal Tax Component | Reference Rate | Planning Relevance | Source |
|---|---|---|---|
| Long-term capital gains rate | 0%, 15%, 20% | Applies to long-term gain after recapture segment | IRS |
| Depreciation recapture on Section 1250 gain | Up to 25% | Applies to gain linked to prior depreciation deductions | IRS |
| Net Investment Income Tax | 3.8% | Potential extra layer for qualifying higher-income taxpayers | IRS |
Real tax data points that matter for rental owners
Many owners focus only on market appreciation and ignore the tax structure that created cash-flow benefits during ownership. Depreciation deductions lowered taxable income during the hold period, but they can create recapture tax at sale. This is not a penalty; it is part of the tax system balancing prior deductions against realized gain. Knowing this in advance helps you budget reserves and avoid surprise tax stress after closing.
| Property/Tax Rule Comparison | Residential Rental | Nonresidential Real Property | Source |
|---|---|---|---|
| MACRS recovery period | 27.5 years | 39 years | IRS Publication 946 |
| Depreciation method under MACRS (general) | Straight-line | Straight-line | IRS Publication 946 |
| Potential depreciation recapture impact at sale | Common and often material | Common and often material | IRS guidance on gains and losses |
Example walkthrough
Assume you bought a rental for $300,000, paid $8,000 in basis-related acquisition costs, completed $45,000 in capital improvements, claimed $70,000 of depreciation, then sold for $550,000 with $38,000 in selling costs. Adjusted basis is $283,000. Amount realized is $512,000. Total gain is $229,000. Recapture portion is $70,000 (the lesser of gain or depreciation). Remaining long-term capital gain is $159,000. If you use a 25% recapture rate, 15% long-term rate, 5% state rate, and NIIT off, estimated tax is:
- Recapture tax: $70,000 x 25% = $17,500
- Federal long-term tax: $159,000 x 15% = $23,850
- State tax: $229,000 x 5% = $11,450
- Total estimated tax: $52,800
This type of breakdown is exactly what the calculator delivers instantly so you can test price and expense scenarios in seconds.
Common mistakes that inflate your tax estimate or create filing issues
- Ignoring selling costs: commissions and fees can meaningfully reduce amount realized.
- Forgetting improvements: some owners miss basis additions from major capital work.
- Using repairs as basis: routine maintenance generally is not basis.
- Not tracking depreciation accurately: depreciation claimed or allowable matters for recapture calculations.
- Assuming all gain is taxed at one rate: recapture and long-term gain can be taxed differently.
- Skipping state tax modeling: state liability can be substantial.
- Not evaluating NIIT exposure: this extra 3.8% can materially affect net proceeds.
How to reduce taxes legally before a rental sale
Tax planning is most effective before the listing goes live. Once the closing statement is final, your options narrow. Consider these areas with your CPA or tax attorney:
- Installment sale structure in some cases to spread gain recognition over time.
- Section 1031 exchange strategy if replacing with like-kind investment property and meeting strict timelines.
- Timing sale by tax year to align with lower-income years where rates may be reduced.
- Harvesting capital losses elsewhere in portfolio to offset gains.
- Basis documentation cleanup before sale to capture all eligible capitalized costs.
This calculator provides planning estimates, not legal or tax advice. Final liability depends on your complete return, income level, filing status, passive activity rules, and current law.
Records you should gather before running calculations
- HUD-1 or closing statement from original purchase
- Improvement invoices and proof of payment
- Depreciation schedules from prior tax returns
- Expected listing agreement commission and seller-paid closing costs
- Current estimated federal and state bracket information
- Any prior casualty, insurance, or basis adjustments
Good records lead to better estimates and fewer filing problems later. If your records are incomplete, ask your tax professional to reconstruct basis before listing the property.
When this calculator is most useful
This tool is ideal for pre-listing planning, offer evaluation, and deciding whether to sell now or hold longer. Investors often run three scenarios: conservative sale price, expected sale price, and optimistic sale price. By viewing the tax result each time, you can set minimum acceptable net proceeds and negotiate with confidence.
Authoritative resources for current rules
- IRS Publication 544 (Sales and Other Dispositions of Assets)
- IRS Publication 946 (How to Depreciate Property)
- IRS Topic No. 409 (Capital Gains and Losses)
Final takeaway
To calculate capital gains on sale of rental property accurately, focus on structure, not guesses. Build adjusted basis correctly, reduce proceeds by true selling costs, separate depreciation recapture from remaining gain, and then apply the right federal, state, and NIIT assumptions. That framework helps you avoid underestimating taxes and gives you a clear net-proceeds view before signing a contract. Use the calculator above as your first-pass model, then confirm details with a qualified tax professional based on your full financial profile.