Skip to main content
Written by Jere SalmistoReviewed by CalcFi EditorialLast verified:

Capital Gains Tax Calculator — Know Your Tax Bill Before You Sell

Calculate short-term and long-term capital gains tax on investments.

Verified · Checked against IRS, Fed & Treasury sources

Free · No signup · Verified

For tax bracket calculation

Assumptions· 2026
  • ·2026 long-term LTCG rates: 0% / 15% / 20% by taxable income
  • ·Short-term gains taxed at ordinary income marginal rate
  • ·1-year holding period distinguishes short-term vs. long-term
  • ·Federal tax only; state tax on gains not included
When this is wrong
  • ·NIIT 3.8% surtax on net investment income (MAGI > $200k single)
  • ·State capital gains tax (California taxes gains as ordinary income)
  • ·Wash-sale rule impact on loss harvesting
  • ·Qualified Opportunity Zone deferral elections
Example: Selling VTI after 4 years

Rachel, 37, marketing director in Seattle, WA, bought $60,000 of VTI in a taxable brokerage in early 2021. In 2025 her position is worth $96,000. She wants to sell to fund a kitchen renovation. Single filer, $130,000 W-2 income.

  • Cost basis: $60,000
  • Sale proceeds: $96,000
  • Long-term capital gain: $36,000 (held >1 year — IRC §1222)
  • W-2 income: $130,000
  • Combined income for LTCG bracket: $166,000
  • LTCG rate (2025, single, $47k–$519k): 15%
  • WA state capital gains tax: $0 (below $262k threshold — ESSB 5096)
Federal capital gains tax owed
$5,400

Takeaway: Rachel's gain is fully in the 15% LTCG bracket — holding just over 12 months saved her from ordinary income rates of 32% on this gain, a $6,120 difference. Washington's 7% capital gains tax (ESSB 5096) applies only above $262,000 in gains — she owes nothing to the state. Net proceeds after federal tax: $90,600.

When this calculator is wrong
  • Primary residence §121 exclusion

    Gains up to $250k (single) / $500k (MFJ) on a primary residence are excluded under §121 if you owned and used the home as primary residence for 2 of the last 5 years. This calc does not apply §121 — you may want to subtract the excludable amount manually before entering the gain.

    Home Sale Capital Gains Calculator
  • Wash-sale rule disallows loss harvesting (§1091)

    If you sell a security at a loss and repurchase the same or "substantially identical" security within 30 days before or after the sale, §1091 disallows the loss. The disallowed amount adds to the basis of the replacement shares — deferring rather than eliminating the benefit.

    Wash Sale Calculator
  • Holding period straddles the short/long boundary

    Short-term gains (≤365 days) are taxed as ordinary income — up to 37% federal. Long-term gains (>365 days) are taxed at 0%, 15%, or 20%. Selling on day 364 vs. day 366 on a $100k gain in the 32% bracket costs an extra $17,000 in federal tax.

  • Net Investment Income Tax (NIIT) at §1411

    Long-term gains above the MAGI threshold ($200k single / $250k MFJ) are also subject to 3.8% NIIT. A single filer with $220k MAGI including $50k LTCG pays 23.8% on the $20k above threshold — not the 15% shown for a standard LTCG bracket.

  • Collectibles and crypto carry different rate rules

    Collectibles (art, coins, gold, gems) face a 28% maximum long-term capital gains rate per §1(h)(5), not the 20% rate for stocks. Crypto is treated as property (IRS Notice 2014-21), subject to standard LTCG rates — but NFTs may qualify as collectibles and face the 28% cap.

Your Results

Based on your inputs

Demo numbers · replace inputs to see yours
Capital Gain
$15,000positivepositive trend

Long-term rate applies

Tax Owed
$2,250positive

Rate: 15.0%

Gain
$15,000
Federal Tax
$2,250
State Tax
$0
Net Proceeds
$22,750

Gain Breakdown

Money Score: Analyze 3 calcs across rent, debt, and savings to unlock.

More actions
Embed
Saved
Money Score
--

Analyze 3 calcs to unlock

0 of 3 analyzed

View your saved analyses
Published byJere Salmisto· Founder, CalcFiReviewed byCalcFi EditorialEditorial standardsMethodology

Primary sources & authoritative references

Every formula on this page traces to a federal agency, central bank, or peer-reviewed institution. We cite the rule-makers, not secondhand blogs.

Found an error in a formula or source? Report it →

Calculations are for educational purposes only. Consult a qualified financial advisor for personalized advice.