Capital Gains Calculator: What a Sale Actually Costs You
Short answer: your capital gains tax is not one rate applied to one number. A real estate or business sale produces up to four separate layers — unrecaptured §1250 gain at a 25% ceiling, §1245 recapture at ordinary rates, long-term capital gain at 0/15/20%, and the 3.8% net investment income tax — plus state tax on top. Most online calculators model only the third one, which is why their answer is usually low by six figures.
Enter your numbers below. The calculator separates the layers, then shows what the same sale looks like under a 1031 exchange, a deferred sales trust, a charitable trust, and an IRC §453 installment sale.
What is the tax bill on your sale going to be?
Send me the sale price and rough basis and I'll email you the actual number within one business day — plus the Seller's Guide to §453. If it doesn't fit your deal, I'll tell you that plainly.
No retainer · no obligation · the carrier compensates the broker, not you.
What the calculator is actually doing
1. Adjusted basis, not purchase price. Your basis is what you paid, plus capital improvements, minus all depreciation allowed or allowable (§1016(a)(2)). Twenty years of depreciation on a building can cut basis by more than half, and it counts even if you never claimed the deduction.
2. The gain is split into layers before any rate applies.
The 25% figure is a ceiling, not a rate. Unrecaptured §1250 gain stacks on your ordinary income and fills the ordinary brackets until it reaches 25%, so a seller with modest other income pays less than 25% on that layer — a distinction almost no calculator makes.
3. State tax is not a footnote. California taxes capital gains as ordinary income, up to 13.3% including the 1% mental health surcharge above $1,000,000. On a $2,000,000 gain that layer alone can exceed $250,000, and it is not deductible against federal tax beyond the SALT cap.
4. Selling costs reduce the gain. Commissions, escrow, title and transfer taxes come off the amount realized before any of the above.
The input that changes the answer most
The land share. Land is never depreciated, so only the building portion generates unrecaptured §1250 gain. If a calculator assumes 20% land and your county assessor says 47%, it overstates your 25% layer by more than half.
Real assessor splits from recent California parcels:
Your county assessor publishes the land/improvement split on the parcel record for free. Use the ratio from the year you bought, applied to what you actually paid. That single number can move the tax by six figures on a mid-size building.
Why "defer" is not the same as "avoid"
Each alternative the calculator models solves a different problem:
- 1031 exchange — full deferral, but you must stay in real estate, identify replacement property in 45 days and close in 180. Excellent if you want to keep owning. Useless if you are exiting.
- Deferred sales trust — a non-statutory structure sold by promoters. It has no code section of its own and has drawn IRS attention. Read the audit-risk analysis before anyone charges you a setup fee.
- Charitable remainder trust — real deferral, a current deduction, and an income stream, but the remainder goes to charity rather than your heirs. Right answer only if you already intend to give.
- IRC §453 installment sale — you are paid over time and report gain as payments arrive. The gain is taxed in slices, often at lower brackets, and the full pre-tax dollar keeps working in the meantime.
The §453 comparison is the one that surprises people: paying the tax at closing means only about 65 cents of each dollar goes back to work. Spreading the same gain keeps the whole dollar working and taxes it in smaller annual slices, usually at lower marginal rates.
What it cannot spread
Two things survive every structure above:
- §1245 recapture. §453(i) forces it into the year of sale regardless of when you are paid.
- Debt above basis. If the buyer takes on a mortgage that exceeds your adjusted basis plus selling expenses, that excess is treated as a payment received in the year of sale. On a heavily leveraged, heavily depreciated building this can push the gross profit percentage to 100%, making every dollar you later receive fully taxable.
Both are decided by the purchase and sale agreement, which means both have to be modeled before you sign, not at tax time.
Frequently asked
Q: How do I calculate capital gains on a rental property? A: Start with the sale price minus selling costs. Subtract your adjusted basis — purchase price plus improvements, minus all depreciation allowed or allowable. The result splits into unrecaptured §1250 gain equal to the depreciation taken, taxed at up to 25%, and the rest as long-term capital gain at 0/15/20%, with 3.8% NIIT and state tax on top.
Q: Is capital gains tax 15% or 20%? A: Both, depending on taxable income, and neither applies to the whole gain on a depreciated property. Long-term capital gain falls in the 0%, 15% or 20% bracket, while the depreciation portion is taxed separately at a 25% ceiling or, for §1245 property, at ordinary rates up to 37%.
Q: Does the calculator include depreciation recapture? A: Yes. It separates unrecaptured §1250 gain on the building from §1245 recapture on equipment and fixtures, because the two are taxed at different rates and only one of them can be spread over an installment sale.
Q: How much capital gains tax will I pay on a $1 million profit? A: On a California rental with substantial depreciation, a $1,000,000 gain commonly produces $300,000 to $400,000 of combined federal and state tax once the 25% recapture layer, 20% capital gain rate, 3.8% NIIT and state tax are stacked. The precise figure turns on your other income, how much depreciation you took, and the land share of your purchase price.
Q: What is the 3.8% net investment income tax? A: A surtax under §1411 on investment income, including capital gains, for taxpayers with modified adjusted gross income above $200,000 single or $250,000 married filing jointly. It applies on top of the capital gains rate and is one of the layers generic calculators omit.
Q: Can I avoid capital gains tax by reinvesting? A: Only through a qualifying structure. Simply buying something else with the proceeds does not defer anything. A 1031 exchange defers it if you stay in like-kind real estate and meet the 45- and 180-day deadlines; an IRC §453 installment sale spreads it over the years you are paid; a charitable remainder trust defers it but sends the remainder to charity.
Q: Does the primary residence exclusion apply? A: §121 excludes up to $250,000 of gain single, $500,000 married filing jointly, if you owned and lived in the home two of the last five years. Two limits bite. §121(d)(6) keeps depreciation taken after May 6, 1997 taxable, and §121(b)(5) prorates the exclusion away for post-2008 periods of non-qualified use — so a rental you later moved into loses the exclusion on the rented share of the appreciation too. Renting it out after you moved out is carved out of that rule by §121(b)(5)(C)(ii)(I).
Q: When do I have to decide how to structure the sale? A: Before the purchase and sale agreement is signed. An installment sale has to be provided for in the contract, a 1031 requires a qualified intermediary in place before closing, and a charitable trust must own the asset before it sells. After closing there is nothing left to structure.
Related
- Capital gains exit calculator — the four-way comparison on its own
- Depreciation recapture — the 25% layer and why it is a ceiling, not a rate
- Depreciation recapture calculator — just the recapture piece
- California capital gains tax calculator — state layer in detail
- Structured installment sale — spreading the gain under §453
- Form 6252 — how the spread is actually reported
- IRC §453 — the installment sale statute, subsection by subsection
Run your specific numbers
The calculator runs your sale through real 2026 federal + state tax brackets and shows §453 savings vs lump sum side-by-side.
Run the calculator → 317-463-6659