📈
Taxes/US Capital Gains Tax Calculator

US Capital Gains Tax Calculator

Calculate federal, NIIT, and state capital gains tax for 2026.

2026 RATES50 statesShort/long termNIIT2026 brackets
$
$
✅ Long-term (>365 days = lower tax)
Stocks/ETFs use the standard 0/15/20% long-term rates.
$
Gross W-2/other income before deductions
$
2026 standard: single $16,100 · married $32,200 · head $24,150
+$35,000Long-term capital gain
Effective rate: 24.3%
Federal Capital Gains Tax−$5250
State Tax (CA)−$3255
Total Tax Owed
$8505
Net Proceeds
$76495
After all federal & state tax
💡 Long-term gains are taxed at 0%, 15%, or 20% — much lower than short-term.
Data Source & Legal Disclaimer
Effective: 2026 tax year (IRS Rev. Proc. 2025-32)Last updated: 3 days agoUpdate: Annual
Sources: IRS Revenue Procedure 2025-32 (2026 inflation adjustments) · IRS.gov — Tax Brackets & Rates · SSA — 2026 Contribution and Benefit Base ($184,500) · IRS Publication 334 — Tax Guide for Small Business (Self-Employed) · IRS Form 1040-ES — Estimated Tax for Individuals · IRS Publication 590-B — Distributions from Retirement Accounts (RMD) · State tax rates: respective state Department of Revenue websites · IRS Pub 550 — Investment Income & Expenses

Long-term capital gains rates (0%/15%/20%) are based on IRS inflation-adjusted brackets for 2026 (Rev. Proc. 2025-32). NIIT (3.8%) applies above $200K/$250K. State rates are simplified. This is for estimation only — consult a tax professional.

See all data sources & update policy →

How capital gains tax works — illustrated

A capital gain is the difference between what you sell an asset for and what you paid for it (your cost basis). The key driver is holding period: sell within 365 days and the gain is short-term, taxed at your ordinary income rate (up to 37% in 2026); hold longer and it becomes long-term, taxed at the preferential 0%, 15%, or 20% rates. The long-term rate you pay depends on your total taxable income, including the gain itself. A 3.8% Net Investment Income Tax (NIIT) can also apply once your income passes $200,000 (single) or $250,000 (married).

Long-term vs short-term capital gains (2026, single)
Which rate applies? The holding period decidesHeld > 365 daysLong-term · 2026 brackets (single)0% · $0 – $49,45015% · $49,450 – $545,50020% · $545,500++ NIIT 3.8% above $200KHeld ≤ 365 daysShort-term · ordinary income rates10% → 37%same brackets as your wagesno 0% band — gains stack with wagestop 37% over $640,600The 365-day boundary decides everything — one extra day can halve the tax rate

Held more than 365 days, a gain qualifies for the long-term ladder: 0% up to $49,450 of taxable income, 15% to $545,500, and 20% above. Held shorter, it is taxed like wages at ordinary rates up to 37%.

Worked example

Priya, a software engineer in Seattle, bought $20,000 of index-fund shares and sold them for $35,000 after 400 days. She has $80,000 of ordinary income and files single.

  1. Gain & holding period:$35,000 − $20,000 = $15,000 gain; held 400 days → long-term
  2. Taxable income:$80,000 ordinary − $16,100 standard deduction + $15,000 gain = $78,900 taxable income
  3. Long-term rate:$95,000 falls in the 15% band, so the whole $15,000 gain is taxed at 15%
  4. NIIT check:$95,000 < $200,000 threshold → no 3.8% NIIT; federal tax on the gain ≈ $2,250
↩ Back to calculator

Short-term gains (held ≤1 year) are taxed as ordinary income; long-term gains (held >1 year) are taxed at 0%, 15%, or 20% depending on your income bracket. Enter your gain to see the exact tax.

FreeToolHub Capital Gains Tax Calculator is a free browser-based tool that calculates tax on stock and crypto gains, no signup, no upload.

About this tool

What is this tool?

Know your after-tax gain before you sell stocks or crypto. Short + long-term, 2026, free.

50 statesShort/long termNIIT2026 brackets

What Is the Capital Gains Tax Calculator?

The Capital Gains Tax Calculator estimates the federal and state tax you owe when selling stocks, crypto, real estate, or other capital assets. It distinguishes between short-term gains (held 365 days or less, taxed at ordinary income rates) and long-term gains (held 366+ days, taxed at preferential 0%/15%/20% rates). The calculator also factors in the Net Investment Income Tax (NIIT) of 3.8% for high earners, and state capital gains tax for all 50 states.

Who Should Use This Tool?

This calculator is for investors, day traders, crypto holders, real estate sellers, and anyone selling assets for a profit. Whether you are selling stocks on Robinhood, crypto on Coinbase, or a rental property, you need to know your tax liability before tax season. If you sold assets held less than one year, you face short-term rates (10%-37%); if held longer than one year, you benefit from long-term rates (0%, 15%, or 20%).

How Does This Tool Work?

Enter your purchase price, sale price, holding period (in days), filing status, ordinary income, and state. The calculator: (1) Determines if your gain is short-term or long-term based on the 365-day threshold. (2) For long-term gains, applies the 2026 LTCG brackets: 0% for income up to $47,025 (single) / $94,050 (married), 15% for income up to $518,900 / $583,750, 20% above. (3) Adds NIIT (3.8%) if your modified AGI exceeds $200,000 (single) / $250,000 (married). (4) Adds state capital gains tax (most states tax capital gains as ordinary income; 9 states have no income tax). (5) Shows effective rate and net proceeds after tax.

How Much Tax Do You Owe on a $40,000 Long-Term Stock Gain?

A single filer in California with $60,000 ordinary income sells stock for a $40,000 long-term gain: • Federal LTCG (15% bracket): $6,000 • NIIT (3.8% on $40K, since AGI $100K < $200K threshold): $0 • California state tax (~9.3%): ~$3,720 • Total tax: ~$9,720 (24.3% effective rate) • Net proceeds: $30,280 If held less than 365 days, the $40,000 would be taxed at ordinary rates (~22% fed + 9.3% CA = ~$12,520), costing $2,800 more in tax.

Frequently Asked Questions

What is the difference between short-term and long-term capital gains?

Short-term capital gains (assets held 365 days or less) are taxed at your ordinary income tax rate, which ranges from 10% to 37% in 2026. Long-term capital gains (assets held 366 days or more) are taxed at preferential rates: 0%, 15%, or 20%, depending on your income. For most taxpayers, the long-term rate is 15%.

What are the 2026 long-term capital gains tax brackets?

For 2026, the LTCG brackets are: 0% for taxable income up to $47,025 (single) or $94,050 (married filing jointly); 15% for income up to $518,900 (single) or $583,750 (MFJ); 20% for income above those thresholds. These brackets are adjusted annually for inflation.

What is the Net Investment Income Tax (NIIT)?

The NIIT is a 3.8% surtax on investment income (including capital gains, dividends, interest, and rental income) for taxpayers with modified AGI above $200,000 (single) or $250,000 (married filing jointly). It applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.

Do states tax capital gains?

Most states tax capital gains as ordinary income at their standard income tax rates. Nine states have no income tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. California has the highest top rate (13.3%) on capital gains.

How is crypto taxed?

The IRS treats cryptocurrency as property. Selling crypto for a profit triggers capital gains tax, just like stocks. Short-term if held 365 days or less, long-term if held 366+ days. Using crypto to purchase goods or services also triggers a taxable event. Mining income is taxed as ordinary income.

Can I offset capital gains with losses?

Yes. You can use capital losses to offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income ($1,500 if married filing separately) and carry forward remaining losses to future years.

How can I reduce my capital gains tax?

Strategies include: (1) Hold assets for 366+ days to qualify for long-term rates. (2) Harvest tax losses to offset gains. (3) Use a 1031 exchange for investment real estate. (4) Gift appreciated stock to charity. (5) Invest through tax-advantaged accounts (IRA, 401k) where gains are tax-deferred or tax-free.

What happens if I do not report capital gains?

Brokerages report your sales to the IRS via Form 1099-B. Crypto exchanges issue Form 1099-DA starting in 2026. Failing to report capital gains can result in IRS penalties, interest, and potential audit. The IRS matches 1099 forms to your tax return automatically.

Other names for this tool

This tool is also known by these tasks — each link opens the same tool with a focused guide:

Related tools

Joke of the Day
Sep 6

What do you call a crab that plays baseball?

100% Free, Forever

Keep Tools Free for Everyone

No paywalls, no signups, no data sold. Built by a solo developer who believes useful tools should be accessible to everyone.

Support me on Ko-fi— keep tools free

100% of proceeds go towards hosting & building more free tools.