How the math works
Capital gains calculator methodology
Updated 2026-08-18 · Educational only — not tax advice
8 layers
From holding period to after-tax proceeds
50 states
Cited state revenue sources on each page
2025–2026
Federal brackets from Rev. Proc. 2025-32
What this page covers
The calculator estimates US capital gains tax for a sale you enter: stocks, crypto, real estate, collectibles, and related planning cases. Federal long-term and ordinary brackets for tax year 2026 followIRS Revenue Procedure 2025-32. Holding-period rules followIRS Topic 409. State tax uses a cited model for each of the 50 states.
Results are planning estimates — not a filed return and not a substitute for a CPA. Use this page to see the eight calculation layers, primary sources, and where the model is simplified on purpose.
Engine
Eight calculation layers
Holding period
Day count from buy to sell classifies short-term vs long-term and flags the 30-day cliff when you are close to one year.
Short-term vs long-term →Raw gain or loss
Sale proceeds minus adjusted basis minus selling costs. Unrealised paper gains are not taxed until you sell.
How we calculate gain →Asset-class rules
Collectibles can use a 28% long-term federal ceiling. Primary homes may use Section 121. Real estate can include depreciation concepts. QSBS has Section 1202 hooks.
Collectibles and gold →Federal tax
Short-term gains use ordinary brackets. Most long-term gains use 0%, 15%, or 20% with stacking on other taxable income.
2026 federal rates →NIIT
An extra 3.8% Net Investment Income Tax can apply when MAGI exceeds $200,000 (single), $250,000 (joint), or $125,000 (married filing separately).
NIIT 3.8% →State tax
Zero, flat, graduated, or special-rule models — including Washington, North Dakota, and Montana — each with a cited state source.
All 50 state calculators →Optimisation hints
Planning tips such as waiting for long-term treatment, wash-sale warnings on securities, and harvest context in a taxable account.
Tax-loss harvesting →Output
Federal tax, NIIT, state tax, total tax, effective rate, and after-tax proceeds for the sale you entered.
Open the calculator →
Primary sources
- IRS Topic 409 (opens in a new tab)
Capital gains and losses, holding period, and basis basics.
- Rev. Proc. 2025-32 (PDF) (opens in a new tab)
Inflation-adjusted 2026 brackets and related amounts.
- NIIT overview (opens in a new tab)
IRC Section 1411 and Form 8960 thresholds.
- State calculator hub
Each state page cites that state’s revenue agency.
Known limits
Graduated states
Many graduated-rate states apply the top modeled rate to taxable gains. Your actual marginal state rate may be lower.
Massachusetts
Modeled as a 5% flat state rate in this calculator — not a short-term vs long-term split.
Washington
The long-term capital-gains surtax uses the $262,000 threshold encoded in our data. Confirm the current-year statute before filing.
California MHST
Estimates do not include the 1% Mental Health Services Tax.
Lots and crypto
The engine is strongest on a single sale (or a small order log). Multi-wallet crypto lots are approximate.
1031 and equity comp
A completed 1031 exchange is not fully modeled. RSU/option wage income at vest or exercise is separate from the later capital-gain sale leg.
How we update the model
When IRS revenue procedures or state statutes change, we update federal bracket tables and state rate models, extend automated tests, and redeploy the static site. Last content pass on this page:2026-08-18.
Simplified graduated-state modeling, single-lot crypto estimates, and approximate depreciation inputs are documented limits — not hidden rounding. If you spot a rate that no longer matches an official source, contact us.
