What this measures
Every year you own a rental, depreciation lowers your taxable income. When you sell, that deduction comes back. The IRS lowers your basis by the depreciation you took (or were allowed to take), so your gain is bigger than the price you paid suggests.
The gain is taxed in two layers. The part equal to your depreciation is unrecaptured section 1250 gain, taxed at your ordinary rate but never above 25%. The rest is long-term capital gain at 0%, 15%, or 20%. Higher earners can owe the 3.8% net investment income tax on top, and most states tax the gain too.
Then the calculator runs the other side. If you keep the property, you collect cash flow, the price can rise, and the loan gets paid down. If you sell, you can invest the after-tax cash. It shows which pile is bigger at the end and the break-even return and growth rate.
Formula
Amount realized = sale price − selling costs. Adjusted basis = purchase price + improvements − depreciation. Gain = amount realized − adjusted basis. Estimated depreciation = (purchase + improvements − land) ÷ 27.5 × years owned.
Recapture tax = the smaller of depreciation and gain × your bracket, capped at 25%. Capital gains tax = the rest of the gain × 0%, 15%, or 20%. NIIT = gain × 3.8% if you turn it on. State tax = gain × state rate. Net after tax = amount realized − mortgage payoff − all the tax.
Keep: future price = sale price × (1 + appreciation)^years. You end with the future price minus selling costs, the loan balance then, and the tax then, plus the cash flow along the way. Sell: you end with the net after tax × (1 + return)^years.
Example
Example
The sample rental: bought for $250,000, $20,000 of improvements, $50,000 of land, owned 8 years, worth $400,000 today with 7% selling costs and a $160,000 mortgage. Depreciation is $64,000 and the gain is $166,000. In a 24% bracket at 15% long-term rate and 5% state, recapture is $15,360, capital gains tax is $15,300, and state tax is $8,300. Keeping 5 more years at 3% growth and $6,000 a year of cash flow ends at $263,964. Selling and earning 7% ends at $242,698. Tax if you sell today is $38,960. Net after tax today is $173,040. Keeping vs. selling is +$21,267.
Illustrative example. The price, loan, and tax rates are sample inputs so the math is visible. They are not a real property or anyone's tax return. The step-by-step version with the same numbers is in the depreciation recapture guide.
IRS sources
Gain, basis, and depreciation recapture on a sale: IRS Publication 544 (Sales and Other Dispositions of Assets). Rental depreciation and the 27.5-year recovery period: IRS Publication 527 (Residential Rental Property) and Publication 946. The 25% maximum rate on unrecaptured section 1250 gain and the 0%, 15%, and 20% brackets: IRS Tax Topic 409. The 3.8% net investment income tax: Form 8960 and Tax Topic 559.
A 1031 like-kind exchange can defer the tax if you buy another investment property under strict rules (Form 8824). This calculator does not model one, and whether it makes sense for you is a question for your CPA.
Example
Second example
Illustrative example. A rental sells for $600,000 with 6% selling costs and no mortgage. The owner paid $300,000 and took $100,000 of depreciation, so the gain is $364,000. In the 35% bracket, recapture is capped at 25%: $25,000. The other $264,000 at 20% is $52,800, and the 3.8% NIIT adds $13,832. Total tax $91,632 with no state tax, leaving $472,368. These figures are made up. They are not the sample in the form above.
When this ratio misleads
The answer leans hard on two guesses: appreciation and the return you would earn on the cash. Move either by a point or two and the winner can flip, which is why the calculator shows the break-even for both. It also treats the yearly cash flow and the investment return as untaxed, so it is a side-by-side, not a full tax projection.
Common pitfalls
Thinking you skip recapture because you never claimed depreciation. The IRS lowers your basis by depreciation you were allowed to take, claimed or not.
Depreciating the land. Only the building and improvements wear out. Use the county assessor's land and building split, or your appraisal.
Comparing the sale price to the mortgage and calling the difference profit. Selling costs, recapture, capital gains, and state tax can take a big bite before the cash reaches you.
Questions
How is depreciation recapture taxed on a rental property?
The part of your gain equal to the depreciation you took (or could have taken) is taxed at your ordinary rate, capped at 25%. The IRS calls it unrecaptured section 1250 gain. Any gain above that is taxed at the long-term capital gains rate.
Do I pay recapture if I never claimed depreciation?
Usually yes. The rule is depreciation allowed or allowable, so your basis drops even if you skipped the deduction. A CPA can tell you whether you can still catch up the missed deduction.
Does the 3.8% net investment income tax apply to a rental sale?
It can if your modified adjusted gross income is over $200,000 single or $250,000 married filing jointly. The calculator applies it to the whole gain when you turn it on, which is the worst case. Form 8960 has the real math.
Can a 1031 exchange avoid the tax?
A 1031 like-kind exchange can defer it if you buy another investment property and follow strict timing and intermediary rules. It is an option to ask your CPA about. This calculator does not model it.
Is it better to keep or sell a rental property?
It depends on the cash flow, how fast the property grows, and what you could earn on the cash. The calculator shows the break-even return and growth rate so you can see how close the call is.
Is this tax advice?
No. It is a simplified federal estimate with a flat state rate, built from the numbers you type. Your real tax depends on your whole return. Talk to a CPA or tax advisor before you sell.