Capital Gains Tax Calculator

Estimate your federal and state tax on investment gains by holding period and filing status.

Your trade

$
$
Holding period
$

Top-marginal state rate used as a simplification.

Total tax
$11,320
28.30% effective
Federal tax
$6,000
Top marginal 15.00%
State tax
$5,320
Net proceeds
$78,680
Gain
+$40,000
Taxable event
Holding term
Long-term
Preferential rates apply

Where your sale proceeds go

How this calculator works

The calculator uses published IRS brackets for the selected filing status and holding period. For long-term gains (held ≥ 1 year), the 0%/15%/20% capital gains brackets apply. For short-term gains (held < 1 year), the same income is taxed at ordinary income brackets (10%-37%).

Your gain is layered on top of your existing taxable income, and the progressive brackets are applied only to the slice of gain that falls within each bracket. The state tax estimate applies the top marginal state income tax rate as a simplification — several states have special treatments for capital gains (e.g., exclusions, different brackets) that this calculator does not model.

Understanding capital gains taxation

Capital gains tax is owed on the profit from selling an investment for more than your cost basis. The federal rate depends on two factors: how long you held the investment and your filing status and income. Assets held less than a year trigger short-term capital gains, taxed as ordinary income at rates from 10% to 37%. Assets held a year or more trigger long-term capital gains, taxed at preferential rates (0%, 15%, or 20%).

The long-term rate structure is remarkably generous. In 2025, single filers with taxable income up to $48,350 pay 0% on long-term gains. Married filing jointly enjoys the 0% rate up to $96,700. Many retirees strategically harvest gains during low-income years to rebalance portfolios tax-free. For high earners, long-term gains still benefit from the 15-20% ceiling compared to the 37% top marginal income tax rate.

State taxation adds another layer. California, Hawaii, and New Jersey tax capital gains at rates exceeding 10%; nine states (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington*, Wyoming, New Hampshire) impose no state income tax. The exact impact depends on your state's specific rules — some exclude a portion of capital gains or apply separate brackets.

Strategic harvesting can meaningfully reduce your lifetime tax bill. Common techniques include: (1) holding investments beyond the one-year mark to convert short-term to long-term, (2) tax-loss harvesting (realizing losses to offset gains), (3) gifting appreciated assets to family members in lower brackets, and (4) charitable donations of appreciated securities. A tax professional can help tailor strategies to your situation.

Frequently Asked Questions

Short-term vs long-term — how does the timing work?
The 1-year clock starts the day after you buy and ends the day you sell. Selling on the exact one-year anniversary still counts as short-term; you need to hold through the following day to qualify for long-term. For options, futures, and other derivatives, different rules may apply.
Does this include the NIIT?
The Net Investment Income Tax (NIIT) adds 3.8% to investment income for high earners (MAGI over $200K single / $250K MFJ). This calculator does not include NIIT — add 3.8% manually if your income exceeds those thresholds and you want a complete estimate.
How are crypto gains taxed?
Crypto is treated as property by the IRS. The same short-term (ordinary income) vs long-term (capital gains) rules apply based on holding period. Crypto-to-crypto trades are also taxable events — swapping ETH for SOL triggers gains or losses, even though no USD changed hands.
Can I use losses to offset gains?
Yes. Capital losses offset capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income per year, and carry the remainder forward indefinitely. This is the mechanism behind tax-loss harvesting.
What about real estate?
Primary residences qualify for a Section 121 exclusion: up to $250K of gain excluded for single filers, $500K for married filing jointly, if you've lived in the home 2 of the last 5 years. Real estate investments (rental property) have additional complications including depreciation recapture. Consult a tax professional for real estate.