Planners About

Income & Taxes · Investments

Capital Gains Tax Calculator

Updated October 5, 2026 · See your federal, state, and NIIT capital gains tax in seconds.

This calculator applies the standard 0/15/20% long-term and ordinary short-term rates to every asset type. The note below says what that does and does not cover for your selection.

cost basis

Original cost basis of the asset.

proceeds

Price you sold or plan to sell the asset.

shares, coins, etc.

Number of shares, coins, or units sold.

excluding this gain

Total taxable income excluding this capital gain. For the 3.8% Net Investment Income Tax test, we estimate your AGI by adding back the standard deduction.

Your Capital Gains Tax Results

Total Tax Owed

$0

Long-term at 0%

Assumptions applied

— Federal
Federal Tax —
State Tax —

For a $5,000 capital gain (sold $15,000 asset purchased for $10,000): If held over 1 year, you pay 15% long-term rate = $750 tax. If held 1 year or less, you pay your ordinary income rate (22-37%) = $1,100 tax. Holding longer saves you $350.

Typical scenario — enter your purchase and sale details for your personalized estimate.

Holding Period

Days held 0

Short-term or long-term is decided by the calendar, not by this day count. Your holding period starts the day after you bought and includes the day you sold; a gain is long-term only if you held the asset more than one year, which means selling after the one-year anniversary of the purchase date. A sale on the anniversary itself is short-term, even when a leap day makes the count look longer.

Investment Summary

Purchase cost $0
Sale proceeds $0
Capital gain / loss $0
After-tax total return (not annualized) 0%

Tax Breakdown

Tax classification Long-Term
Federal tax rate (effective) 15%
Federal tax owed $0
$0 0 $0 $0 Long-term $0

Not Tax Advice — IRS Circular 230 Notice: To comply with requirements imposed by the IRS under Circular 230, we inform you that any U.S. federal tax information provided by this calculator is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing, or recommending to another party any tax-related matter. Tax laws change frequently. This calculator is not affiliated with the IRS or any government agency. Consult a qualified tax professional, CPA, or enrolled agent for advice specific to your situation.

See how this is calculated ↓

Short-Term vs Long-Term Capital Gains

The single biggest lever in capital gains tax planning is your holding period. Selling one day after the one-year anniversary of your purchase, rather than on it, flips your gain from ordinary-income rates (10–37%) to preferential long-term rates (0%, 15%, or 20%).

Short-term versus long-term capital gains: holding period, federal tax rate range, and an example for each classification
Classification Holding Period Tax Rate Example
Short-Term 1 year or less 10% – 37%
(ordinary income rates)
Buy stock Jan 1, sell Dec 31 same year
Long-Term More than 1 year 0%, 15%, or 20%
(preferential rates)
Buy stock Jan 1, sell Jan 2+ next year

Why It Matters

For someone in the 24% tax bracket, holding an investment one more day (selling the day after the one-year anniversary of the purchase instead of on it) can drop the federal tax rate from 24% to 15% — a 9 percentage point swing on every dollar of gain.

The One-Year Rule

To qualify for long-term capital gains treatment, you must hold the asset for more than one year. The holding period starts the day after you purchase the asset and includes the day you sell it.

2026 Capital Gains Tax Brackets

Long-term capital gains tax rates depend on your taxable income and filing status. The 2026 brackets below are the official values published by the IRS in Rev. Proc. 2025-32 (October 2025):

2026 long-term capital gains tax brackets by filing status (single, married filing jointly, head of household), per IRS Rev. Proc. 2025-32
Tax Rate Single Filers Married Filing Jointly Head of Household
0% Up to $49,450 Up to $98,900 Up to $66,200
15% $49,451 – $545,500 $98,901 – $613,700 $66,201 – $579,600
20% Over $545,500 Over $613,700 Over $579,600

Net Investment Income Tax (NIIT): High earners may also owe an additional 3.8% surtax on capital gains if MAGI exceeds $200,000 (single), $250,000 (married filing jointly) or $125,000 (married filing separately). This can bring the effective top federal rate to 23.8%.

How to Reduce Capital Gains Taxes

Hold Investments Longer

The simplest strategy: hold assets for more than one year to qualify for the lower long-term capital gains rates (0%, 15%, or 20%) instead of paying ordinary income rates up to 37%.

Harvest Tax Losses

Offset capital gains by selling losing investments. Capital losses reduce gains dollar-for-dollar; if losses exceed gains, deduct up to $3,000 per year against ordinary income and carry the rest forward.

Use Tax-Advantaged Accounts

Invest through IRAs, 401(k)s, or other retirement accounts where gains grow tax-deferred or tax-free. Roth IRAs allow completely tax-free withdrawals in retirement, including capital gains.

Time Your Sales Strategically

Consider spreading large gains across multiple tax years, selling in lower-income years, or using the 0% long-term rate if your income is low enough (under $49,450 single / $98,900 married for 2026 per IRS Rev. Proc. 2025-32).

Frequently Asked Questions

Capital gains tax is a tax on the profit made from selling an investment or asset. The tax rate depends on how long you held the asset: short-term capital gains (held 1 year or less) are taxed as ordinary income at rates from 10% to 37%, while long-term capital gains (held more than 1 year) are taxed at preferential rates of 0%, 15%, or 20% depending on your income.

The key difference is the holding period and tax rate. Short-term capital gains are for assets held 1 year or less and are taxed at ordinary income rates (10–37%). Long-term capital gains are for assets held more than 1 year and are taxed at preferential rates (0%, 15%, or 20%).

Yes, capital losses offset capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income. Excess losses carry forward indefinitely. This is the basis for "tax-loss harvesting."

Yes — the IRS treats cryptocurrency as property, so capital gains tax applies when you sell crypto for a profit. Same short-term vs long-term rules apply. Even crypto-to-crypto trades are taxable events.

Tax-loss harvesting is selling investments at a loss to offset capital gains from profitable investments. Be aware of the wash sale rule, which disallows the loss if you buy a "substantially identical" security within 30 days before or after the sale.

Several legal strategies: (1) hold over one year for lower long-term rates, (2) tax-loss harvesting, (3) use tax-advantaged accounts (401(k)s, IRAs, Roth), (4) time sales for lower-income years (qualify for the 0% rate), (5) donate appreciated assets to charity, (6) use 1031 exchanges for real estate.

Yes — eight states have no state capital gains tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, and Wyoming. New Hampshire is the most recent addition — it taxed interest and dividends until that tax was repealed for taxable periods beginning after December 31, 2024, and it has never taxed capital gains. Washington has no income tax but levies a separate capital gains excise tax: 7% on long-term gains above an inflation-indexed deduction ($278,000 for 2025), plus 9.9% on gains above $1 million.

The NIIT is an additional 3.8% surtax on investment income for high-income taxpayers with MAGI above $200,000 (single), $250,000 (married filing jointly) or $125,000 (married filing separately). It applies to the lesser of net investment income or the excess MAGI above the threshold.

How This Calculator Works

This calculator first determines whether your gain is short-term or long-term from the purchase and sale dates you enter, then applies the matching tax treatment: short-term gains stack on top of your ordinary income and are taxed at your regular income-tax brackets, while long-term gains use the separate, lower long-term capital-gains brackets. On top of either result, it adds the Net Investment Income Tax surcharge when your modified adjusted gross income clears the statutory NIIT threshold for your filing status. See Official Sources below for the IRS guidance behind each piece.

Official Sources

  1. IRS Topic No. 409: Capital Gains and Losses (opens in new tab) — Authoritative IRS guidance on capital gains tax rates, holding periods, and reporting.
  2. IRS Publication 550: Investment Income and Expenses (opens in new tab) — Comprehensive guide on investment income, including capital gains, dividends, and tax-loss harvesting.
  3. IRS Topic No. 559: Net Investment Income Tax (opens in new tab) — Official guidance on the 3.8% NIIT surtax including MAGI thresholds and computation rules.
  4. IRS: Qualified Opportunity Zones FAQ (opens in new tab) — QOZ program rules for deferring capital gains via investments in designated communities.
  5. Tax Foundation: State Individual Income Tax Rates and Brackets, 2026 (opens in new tab) — State-by-state income tax rates that determine state-level capital gains treatment. 2026 edition, published February 2026.

Content reviewed by Mark at Markco Labs. Calculations verified against IRS guidelines. Learn more about our accuracy standards.

Last updated:

Editorial Note: DigitalCalculator.info publishes educational content about personal finance. This article is for informational purposes only and does not constitute financial or legal advice. Consult a licensed professional before making financial decisions.