Skip to content

Capital Gains Tax Calculator

New
Calculatorsβ€’Client-Side & Private

Work out US federal tax on a stock or crypto sale: long-term or short-term gain, 2026 0/15/20% bands, the 3.8% NIIT and after-tax proceeds.

Tool workspace

Work out the federal tax on a sale, long-term or short-term.

What you paid, including purchase costs.

What you received for the sale.

Your other taxable income β€” the gain stacks on top of it.

Formula: gain = sell price βˆ’ buy price. Held over 365 days is long-term; 365 days or less is short-term. Long-term gains stack on top of your other taxable income: the part below the 0% threshold is taxed at 0%, the part up to the 15% threshold at 15%, and the rest at 20% (2026 thresholds: Single $49,450 / $545,500; Married filing jointly $98,900 / $613,700; Head of household $66,200 / $579,600; Married filing separately $49,450 / $306,850). Short-term gains are taxed at your ordinary marginal rate. A 3.8% net investment income tax applies to the part of the gain above $200,000 ($250,000 married filing jointly, $125,000 married filing separately).

Loading tool controls…

Calculations processed locally β€” numerical inputs never leave your browser
Free Instant Private

Verify it yourself: press F12, open the Network tab, and use this tool β€” your inputs never leave your browser.

Capital Gains Tax Calculator at a glance

Price
Free
Account
Not required
File uploads
None β€” your files are never uploaded
Category
Calculators

Who uses Calculators?

Students, homeowners and small businesses working out money, health or study figures β€” from mortgages to BMI.

How to Use Capital Gains Tax Calculator

Follow these simple steps to get instant results in your browser.

1

Enter Buy Price, Sell Price and Holding Days

Type what you paid, what you sold for, and how many days you held the investment β€” more than 365 days is long-term.

2

Pick Filing Status and Other Income

Choose your filing status and enter your other income, since the long-term rates stack on top of it.

3

Read Federal Tax, NIIT & After-Tax

Review the gain, the federal tax, any Net Investment Income Tax, the effective rate, and what you keep after tax.

πŸ’‘

What is Capital Gains Tax Calculator & How Does It Work?

The Capital Gains Tax Calculator estimates the US federal tax on selling an investment β€” stocks, crypto, or property β€” from the buy and sell prices, how long you held it, your filing status, and your other income.

Holding for more than 365 days makes the gain long-term, taxed at the preferential 0%, 15%, or 20% rates that stack on top of your other income; holding a year or less makes it short-term, taxed as ordinary income. The tool also adds the 3.8% Net Investment Income Tax when your modified AGI is above $200,000 (single) or $250,000 (married filing jointly).

All calculations run client-side in your browser. Your prices, income, and filing status are never sent to a server.

Disclaimer: This tool estimates US federal tax only β€” it does not include state tax, and it is not tax advice. A loss means no federal capital gains tax. Actual tax depends on deductions, other gains and losses, and the year’s tax law; confirm the figures with the IRS or a tax professional before filing.

⚑

Key Features & Capabilities

βœ“

Long-Term vs Short-Term

Applies the 0%/15%/20% preferential rates for gains held over 365 days and ordinary rates otherwise.

βœ“

Four Filing Statuses

Single, married filing jointly, head of household, and married filing separately, each with its own thresholds.

βœ“

Net Investment Income Tax

Adds the 3.8% NIIT on the part of the gain above the MAGI threshold.

βœ“

Stacking on Other Income

Long-term gains fill the 0% bracket only after your other income, so the same gain can be taxed at 0% and 15%.

βœ“

After-Tax Proceeds

Shows the effective rate and exactly what you keep after federal tax.

Pro Tips

  • β€’Bookmark this tool for instant one-click access anytime.
  • β€’Adjust values using direct input or sliders for instantaneous recalculation.
  • β€’All processing happens in your browser session for maximum speed and data safety.

🎯 Common Use Cases

Selling StockSee the tax on a stock sale before deciding whether to sell this year or next.
Short-Term vs Long-TermCompare the tax on the same gain held 400 days versus 300 days β€” waiting past a year can cut the bill sharply.
Planning a Big SaleWork out the federal tax on a large gain and whether the Net Investment Income Tax applies.
A Loss Means No TaxEnter a sell price below the buy price to confirm a loss gives zero federal capital gains tax.
Filing Status MattersRun the same gain as single and as married filing jointly to see how the 0% room changes.
πŸ“

Capital Gains Tax

Formula Equation:
Gain = sell price βˆ’ buy price; federal tax = long-term preferential rates (0%/15%/20%) if held > 365 days, else ordinary income tax rates

The gain is the sell price minus the buy price; a loss means zero federal capital gains tax. Long-term gains stack on top of your other income: the part of the gain that fits under the 0% threshold (single $49,450 for 2026) is taxed at 0%, the part up to the 20% threshold ($545,500 single) at 15%, and the rest at 20%. The 3.8% Net Investment Income Tax applies only to the part of the gain above the MAGI threshold ($200,000 single, $250,000 married filing jointly).

✏️

Worked Example

  1. 1Buy $10,000 Β· Sell $25,000 Β· Held 400 days (long-term) Β· Single Β· Other income $40,000
  2. 2Gain = $25,000 βˆ’ $10,000 = $15,000
  3. 30% room = $49,450 βˆ’ $40,000 = $9,450 taxed at 0%
  4. 4Remaining $5,550 taxed at 15% = $832.50
  5. 5Federal tax = $832.50 Β· NIIT = $0 (MAGI $55,000 is below $200,000)
  6. 6Total tax = $832.50 Β· Effective rate = $832.50 Γ· $15,000 = 5.55%
  7. 7After-tax proceeds = $25,000 βˆ’ $832.50 = $24,167.50.
πŸ“š

Sources & Further Reading

Frequently Asked Questions about Capital Gains Tax Calculator

Frequently asked questions

A gain is long-term if you held the asset for more than one year, and short-term if you held it for one year or less. Long-term gains are taxed at the lower 0%, 15% or 20% rates. Short-term gains are taxed at your ordinary income rate, which is usually higher. The holding period is counted from the day after you bought to the day you sold.

It uses the 2026 long-term thresholds from IRS Revenue Procedure 2025-32, section 4.03. The 0% rate covers taxable income up to $49,450 for single filers, $98,900 for married filing jointly, $66,200 for head of household and $49,450 for married filing separately. The 20% rate starts above $545,500 single, $613,700 joint, $579,600 head of household and $306,850 separately.

The 3.8% net investment income tax applies to the part of your gain above a modified adjusted gross income of $200,000 for single and head-of-household filers, $250,000 for married filing jointly, and $125,000 for married filing separately. It is added on top of the capital gains tax. These thresholds are fixed by law and are not adjusted for inflation.

No β€” it covers US federal tax only. Most states tax capital gains as ordinary income, and a few states have no income tax at all. Add your state rate separately, and remember this is an estimate, not tax advice. A tax adviser can help with wash sales, loss harvesting and multi-year planning.

You pay no federal capital gains tax β€” a loss means the gain is zero or negative, so the federal tax and the Net Investment Income Tax are both zero. Enter a sell price below the buy price in the calculator to see this: the gain, tax, and effective rate all show zero.

A lot. On a $15,000 gain with $40,000 of other income as a single filer, holding 400 days (long-term) gives $832.50 of federal tax β€” an effective rate of 5.55% β€” because $9,450 of the gain fits in the 0% band and only $5,550 is taxed at 15%. The same gain held 300 days (short-term) is taxed as ordinary income: $2,260, an effective rate of 15.07%.

Complementary utilities for your workflow

View all β†’
You are here

Capital Gains Tax Calculator

Work out US federal tax on a sale: gain, 2026 bands, NIIT and after-tax proceeds.

Current tool
New

Stock Profit Calculator

Work out stock trade profit, ROI and break-even price from shares, prices and commissions.

Try tool
New

Crypto Profit Calculator

Work out crypto profit, ROI and break-even price from buy/sell prices, quantity and fees.

Try tool
Popular

ROI Calculator

Calculate total ROI %, annualized CAGR %, net profit, and investment multiples.

Try tool