United States Capital Gains Tax Calculator 2026
Estimate federal capital gains tax on stocks, crypto, and real estate — short-term ordinary rates vs long-term 0%/15%/20%, with optional state tax.
By Sammy S. · Founder · AuthorUpdated for 2026
Calculate United States capital gains tax
Country is pre-selected. Enter purchase/sale details — results update on the right.
Asset details
Calculate tax owed and net profit
US
Net profit after tax
$5,000
+50.0% return · tax $0
$5,000
1.2y
426 days
0.00%
Long-term
$0
Estimates only — confirm unusual situations with a tax professional.
How capital gains tax works in United States
In the United States, capital gains tax depends on how long you held the asset and your taxable income. Assets held one year or less are short-term and taxed as ordinary income (federal brackets up to 37%). Assets held more than one year qualify for long-term rates of 0%, 15%, or 20%.
High earners may also owe the 3.8% Net Investment Income Tax (NIIT) on investment income when MAGI exceeds $200,000 (single) or $250,000 (married filing jointly). Many states tax capital gains as ordinary income on top of federal tax.
This page locks the calculator to US rules so you can model stock, crypto, and real estate sales with live 2026 engine numbers — then compare holding periods before you sell.
United States rates & rules at a glance
Worked examples (2026 engine)
Live numbers from the same calculator above — single-filer defaults unless noted.
Buy $10,000 of stock in Jan 2022, sell for $80,000 in mid-2026 (single filer).
Holding past one year unlocks preferential long-term rates on a large gain.
Buy $10,000 in Jan 2026, sell for $15,000 in Jun 2026 (single filer).
The same $5,000 gain is taxed at ordinary rates when held under a year.
Buy $5,000 of crypto in 2023, sell for $20,000 in 2026.
Crypto follows the same short-/long-term framework as other capital assets.
- Holding period: more than 1 year = long-term; 1 year or less = short-term (count from day after purchase to sale date).
- Cost basis includes purchase price plus certain improvements and fees; selling expenses reduce the amount realized.
- Crypto is property for IRS purposes — trades and disposals are taxable events.
- Wash-sale rules can disallow a loss if you repurchase a substantially identical security within 30 days.
- State capital gains tax often mirrors ordinary income rates; TX/FL/WA and other no-income-tax states have no state CGT.
- Investors comparing selling now vs waiting for long-term rates
- Crypto traders estimating tax on a specific disposal
- Homeowners modeling a primary-residence exclusion
- Anyone planning estimated taxes or year-end harvesting
The capital gains tax shown above comes from the sale price, purchase price, holding period, filing status, and country you enter — not a live tax-authority feed. For US filers the calculator applies 2026 IRS progressive brackets (IRS Rev. Proc. 2025-32) to determine whether each dollar of gain falls in the 0%, 15%, or 20% long-term tier (or ordinary income brackets for short-term gains). Other countries use simplified flat or inclusion-rate models. Below are the exact formulas, the order of operations, and two US worked examples you can verify by hand.
Core formulas
| Metric | Formula |
|---|---|
| Capital gain | Sale price − Purchase price (after optional inflation adjustment) |
| Taxable gain | Capital gain − Primary residence exemption − Capital loss offset − Country allowance |
| Holding period (days) | ⌊(Sale date − Purchase date) ÷ 86,400,000 ms⌋ |
| Short-term (US) | Sale date < one calendar year after purchase date |
| Long-term (US) | Sale date ≥ one calendar year after purchase date → 0% / 15% / 20% preferential rates |
| Federal tax (US, progressive) | Σ (amount in each bracket × bracket rate ÷ 100) |
| State tax (US) | Taxable gain × state rate ÷ 100 (added to federal) |
| Effective tax rate | (Federal tax ÷ Taxable gain) × 100 |
| Net profit after tax | (Sale price − Purchase price) − Total tax owed |
Order of operations
Currency conversion (if applicable)
Converted purchase price = Original purchase price × Exchange rateOnly runs when purchaseCurrency and saleCurrency differ. The purchase price is converted to the sale currency; the sale price is already in the sale currency.
Inflation adjustment (EU countries, optional)
Adjusted purchase price = Purchase price × (Sale-year CPI ÷ Purchase-year CPI)Available for UK, Germany, and France when toggled on. Uses historical CPI data to reduce the nominal gain by the inflation component. US, Canada, and Australia do not use this adjustment.
Calculate capital gain
Capital gain = Sale price − (Inflation-adjusted) purchase priceSimple subtraction. A negative result is a capital loss — no tax is owed, and the loss can offset future gains.
Primary residence exemption (US only)
Exempt amount = min(capital gain, $250,000) for single; $500,000 for married-jointApplies only when isPrimaryResidence is true and the property is in the US. The exempt amount is subtracted from the capital gain before tax.
Capital loss offset + country allowances
Taxable gain = Capital gain − Loss offset − Country allowanceThe entered capital loss offset reduces the taxable gain. Additionally: UK £3,000 annual exempt amount; Germany €1,000 Sparer-Pauschbetrag are automatically applied.
Determine holding period and short/long-term status
isShortTerm = sale date < purchase date + 1 calendar year (US/Australia)US: short-term if held less than one full calendar year — taxed as ordinary income. Long-term if held ≥ 1 year — preferential 0/15/20% rates. UK: holding period is tracked but does not change rates. Germany/France/Canada: no holding-period distinction.
Calculate federal (or national) tax
US: progressive brackets applied to taxable gain. Other countries: flat rate × taxable gainUS applies 2026 IRS brackets progressively. Each dollar in a bracket is taxed at that bracket's rate only. Other countries use simplified flat rates (UK 18%/24%, Germany 26.375%, France 31.4%, Canada 50% inclusion, Australia 32.5%/16.25%).
Add US state tax (if state selected)
State tax = Taxable gain × State rate ÷ 100US states tax capital gains as ordinary income (same as their income tax rate). Only applies when a state is selected. No state capital gains tax in Florida, Texas, Nevada, and 6 other states.
Worked example 1 — US long-term, single filer — stocks held ~4.5 years
Verify by hand: $49,450.00 @ 0% + $20,550.00 @ 15% = $3,082.50 federal tax
| Field | Value |
|---|---|
| Country / asset | US · stocks |
| Purchase price | $10,000.00 |
| Sale price | $80,000.00 |
| Purchase date | 2022-01-10 |
| Sale date | 2026-06-25 |
| Holding period (days) | 1627 |
| Short-term or long-term | Long-term (≥ 1 year) |
| Capital gain | $70,000.00 |
| Taxable gain (no offsets) | $70,000.00 |
| In 0% LT bracket (≤ $49,450) | $49,450.00 |
| In 15% LT bracket | $20,550.00 |
| Federal tax owed | $3,082.50 |
| Effective tax rate | 4.40% |
| Marginal rate | 15% |
| Net profit after tax | $66,917.50 |
Gain: $80,000.00 − $10,000.00 = $70,000.00
Brackets: $49,450.00 @ 0% + $20,550.00 @ 15% = $3,082.50 federal tax
Net: $70,000.00 − $3,082.50 = $66,917.50 net profit
Rate: Effective rate = $3,082.50 ÷ $70,000.00 = 4.40%
Worked example 2 — US short-term, single filer — stocks held ~6 months
Verify by hand: $5,000.00 fits entirely in 10% ordinary income bracket → $500.00 federal tax
| Field | Value |
|---|---|
| Country / asset | US · stocks |
| Purchase price | $10,000.00 |
| Sale price | $15,000.00 |
| Purchase date | 2026-01-10 |
| Sale date | 2026-06-25 |
| Holding period (days) | 166 |
| Short-term or long-term | Short-term (< 1 year) |
| Capital gain | $5,000.00 |
| Taxable gain (no offsets) | $5,000.00 |
| Bracket applied | 10% ordinary income |
| Federal tax owed | $500.00 |
| Effective tax rate | 10.00% |
| Marginal rate | 10% |
| Net profit after tax | $4,500.00 |
Gain: $15,000.00 − $10,000.00 = $5,000.00
Bracket: $5,000.00 fits entirely in 10% ordinary income bracket → $500.00 federal tax
Net: $5,000.00 − $500.00 = $4,500.00 net profit
Rate: Effective rate = $500.00 ÷ $5,000.00 = 10.00%
Note: Short-term gains are taxed as ordinary income — nearly 3× more than the long-term rate on the same $5,000 gain.
Tax rates by country (2026)
| Country | Rate |
|---|---|
| US (long-term) | 0% / 15% / 20% |
| US (short-term) | 10%–37% |
| UK | 18% / 24% |
| Germany | 26.375% |
| France | 31.4% |
| Canada | 7.5%–16.5% |
| Australia (short-term) | 32.5% |
| Australia (long-term) | 16.25% |
Official sources
Other countries
Related tools
Capital gains hub
All countries and educational guides
Crypto capital gains
Crypto-focused calculator defaults
United States income tax calculator
Ordinary income / paycheck estimates
After-tax stock calculator
Compare capital gains vs ordinary income treatment
RSU tax calculator
Equity vesting and withholding
Inflation calculator
Real vs nominal purchasing power
- IRS Publication 550 — Investment Income and Expenses
- IRS Topic No. 409 — Capital Gains and Losses
- IRS — Net Investment Income Tax
Estimates only. United States tax law is complex — confirm unusual situations with a qualified adviser. Last reviewed 2026-07-26.