Capital Gains Tax Calculator 2025
See your federal capital gains tax on stocks, crypto, or property — short-term vs long-term rates, the 0%/15%/20% brackets, NIIT, and exactly what you keep after tax.
How the Capital Gains Tax Calculator Works
This calculator turns four numbers you already know — what you paid, what you sold for, how long you held the asset, and your other income — into the federal tax you owe and the cash you actually keep. It starts by computing your gain (sale price minus cost basis). If you held the asset one year or less, that gain is short-term and taxed at your ordinary income rate, so we stack the gain on top of your other taxable income and apply the 2025 federal brackets. If you held longer than a year, the gain qualifies for the preferential long-term rates of 0%, 15%, or 20%, again stacked on your income to find the right band.
On top of that, the tool automatically adds the 3.8% Net Investment Income Tax when your income plus the gain crosses the high-earner threshold. The headline result shows your tax owed and net proceeds, and the comparison panel and chart put short-term and long-term side by side so you can see precisely what holding more than a year is worth. Defaults reflect a typical 2025 scenario, so the page is useful the moment it loads — just replace the numbers with your own.
Who Benefits Most From This Calculator
- Investors selling stocks, ETFs, or mutual funds who want to know the tax bill before they hit the sell button.
- Crypto traders estimating tax on coins sold or swapped during the year.
- Anyone near the one-year mark deciding whether waiting a few more weeks for long-term treatment is worth it.
- Early retirees and low-income years checking whether a gain fits inside the 0% bracket.
- High earners who need to factor in the 3.8% NIIT surtax.
Who Should Look Elsewhere
This tool estimates federal capital gains tax on a single sale. If you need to model state capital gains tax, an aggregate of many lots, or specialized situations, you'll want dedicated software or a tax professional. It does not handle depreciation recapture on rental property (taxed up to 25%), the 28% collectibles rate on art and precious metals, qualified small business stock (Section 1202) exclusions, or like-kind (1031) exchanges. For a primary-home sale, apply your $250,000/$500,000 exclusion first and enter only the taxable remainder. And if you're estimating your overall income tax rather than a specific gain, start with the federal income tax calculator instead.
Tax Implications of Capital Gains
Short-term vs long-term. The single biggest lever is the holding period. Sell within a year and your gain is taxed as ordinary income (up to 37%); hold beyond a year and it drops to 0%, 15%, or 20%. Crossing the one-year line can cut the tax on the same profit by a third or more.
The 0% bracket. For 2025, long-term gains are taxed at 0% when total taxable income stays under $48,350 (single) or $96,700 (married filing jointly). Because gains stack on income, only the portion that fits under the ceiling gets the 0% rate.
NIIT 3.8%. A 3.8% Net Investment Income Tax adds to the bill once modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly), pushing the top long-term rate to 23.8%.
State capital gains. Most states tax capital gains as ordinary income, with no special low rate — so a resident of California or New York can owe a substantial additional state tax that this federal calculator does not include. Nine states (such as Florida, Texas, and Washington for most income) levy no state income tax on gains.
Primary-home exclusion. When selling your main residence, the Section 121 exclusion lets you shield up to $250,000 of gain (single) or $500,000 (married filing jointly) if you owned and lived there two of the last five years. Only the excess is taxable. These are estimates — consult a tax professional for your situation.
Tips, Tricks & Things to Watch
- Hold for more than one year whenever you can — the jump from ordinary rates to 0/15/20% is the easiest tax cut available to an investor.
- Harvest losses before year-end to offset gains and deduct up to $3,000 against ordinary income, carrying forward the rest.
- Mind the wash-sale rule — wait 31 days or buy a similar-but-not-identical fund so a harvested loss isn't disallowed.
- Remember the step-up in basis — inherited assets reset to their value at the date of death, often erasing decades of gain for heirs.
- Harvest gains in 0% bracket years — in low-income years, sell winners tax-free and rebuy to raise your basis (the wash-sale rule doesn't apply to gains).
- Use tax-advantaged accounts — gains inside an IRA or 401(k) aren't taxed until withdrawal (or ever, in a Roth).
Capital Gains Tax Formula (2025)
How your gain, holding period, and income combine into the tax you owe.
Gain = Sale Price − Purchase Price (cost basis)Example:
Bought $10,000 of stock, sold for $18,000
Variables:
Tax = Gain × Applicable RateExample:
$8,000 long-term gain, single, $75,000 other income (15% band)
Variables:
Net Proceeds = Sale Price − (Capital Gains Tax + NIIT)Example:
$8,000 long-term gain, $1,200 tax, no NIIT
Variables:
These formulas provide the mathematical foundation for the calculations. Actual results may vary based on rounding, compounding frequency, and specific lender policies.
How We Calculate & Keep This Accurate
Short-term gains are taxed as the top slice of your ordinary income: we compute tax on (other income + gain) minus tax on other income alone, using the 2025 federal brackets. Long-term gains use the 2025 0%/15%/20% rate thresholds, stacked on top of your other taxable income so each portion of the gain is taxed at the rate of the band it lands in. The 3.8% NIIT is added on the lesser of the gain or the amount your income exceeds the filing-status threshold.
We model federal tax only. State capital gains tax, depreciation recapture, the 28% collectibles rate, Section 1202 small-business stock, and 1031 exchanges are not included. Results are estimates for planning and may differ from your filed return.
Primary Sources
Data & Freshness
Figures reflect 2025 tax-year data.
Last updated June 9, 2026 · Maintained by the Financial Calculator editorial team.
Estimate only. This calculator provides a federal capital gains tax estimate for planning purposes and is not tax advice. It does not include state taxes, depreciation recapture, or special asset rules. Consult a qualified tax professional before making decisions.
Capital Gains Tax Calculator — Frequently Asked Questions
Answers to the most common questions about short-term vs long-term gains, the 0% bracket, NIIT, home sales, and loss harvesting.