Skip to main content
Home›United States›Taxes and pay›Capital Gains Tax Calculator

Capital Gains Tax Calculator

Work out the federal and state tax on selling stocks, funds, crypto or property in 2026, with short and long-term rates, the 3.8% investment tax, losses and the home sale exclusion.

Checked by the SumAtlas teamUpdated October 7, 2026SourcesHow we check our figuresIndependent: not a government website

Your capital gain

The sale
How long you owned it
Your taxes
Filing status
More optionsOptional. The defaults suit most people; change these if your situation is different.

Free to use. Your details are not saved to an account.

Your summary

Tax on your gain$2,168
You keep$17,833
Federal capital gains tax$2,168

Your long-term gain is $20,000. Federal tax on it is $2,168, so you keep $17,833.

10.8% of the gainLong-term ratesNo NIIT

THE COMPLETE PICTURE

Your results in detail

Gain$20,000
Taxable gain$20,000
Federal tax$2,168
State tax$0
What we assumed
Tax year
2026
Other income
$60,000 of ordinary income, standard deduction
Federal rates
0%, 15% or 20%, stacked on your other income
State
Texas: no income tax on gains
Not included
28% collectibles rate, 25% depreciation recapture, AMT

Not right for you? Change it under More options.

Where your gain goes

Your profit split into taxes and what you keep.

You keep$17,833
Federal capital gains tax$2,168

How the gain fills the brackets

Long-term gains sit on top of your other taxable income.

ItemGainTax
Taxed at 0%$5,550$0
Taxed at 15%$14,450$2,168
Taxed at 20%$0$0
Federal total$20,000$2,168

You have $5,550 of room left in the 0% band (up to $49,450 of taxable income).

Short-term or long-term

The same gain, held for different lengths of time.

HeldFederal tax
A year or less (short-term)$3,750
More than a year (long-term)$2,168Saves $1,583

Worth knowing

Before you sell.

Crypto and collectibles

Crypto is taxed like other property: the same short and long-term rules apply. Long-term gains on collectibles such as art, coins and gold are taxed at up to 28%.

Estimate for tax year 2026. Not tax advice.

THE CAPITAL GAINS TAX GUIDE

How capital gains are taxed in 2026

When you sell stocks, funds, crypto, a home or other property for more than you paid, the profit is a capital gain. How much federal tax you pay depends on how long you held it and on the rest of your income. This guide explains the 2026 rules with worked examples.

1In brief

The short answer

  • Gain = sale price − cost basis − selling costs.
  • Held a year or less: taxed like wages, at 10% to 37%.
  • Held more than a year: taxed at 0%, 15% or 20%, depending on your total taxable income.
  • High earners may add the 3.8% net investment income tax, and most states tax gains too.
0%
Long-term rate up to $49,450 taxable income, single
$98,900
Top of the 0% band, joint
$250,000
Home sale exclusion ($500,000 joint)
$3,000
Net loss you can deduct each year
2Basics

What a capital gain is

A capital asset is almost anything you own for personal use or investment: shares, ETFs and mutual funds, bonds, crypto, your home, land, a rental property, art and collectibles. You have a gain only when you sell or swap the asset. A rise in value while you keep holding it is an unrealized gain and is not taxed.

Mutual funds also pay out capital gain distributions each year, which are taxed as long-term gains even if you never sold a share.

3Basis

Cost basis

Your cost basis is what you paid, plus buying costs such as commissions. For a home it also includes the cost of improvements (a new roof or a kitchen, not repairs). Reinvested dividends add to the basis of a fund. Inherited assets get a "stepped-up" basis equal to the value on the date of death, so gains before then are never taxed. Gifts usually keep the giver’s basis.

Keep your records

Brokers report basis on Form 1099-B for shares bought since 2011. For older holdings, crypto and property, it is up to you to prove it.

4Holding period

Short-term and long-term

The holding period starts the day after you buy and includes the day you sell. More than one year is long-term. Selling one day too soon can cost real money:

Short-term: $20,000 gain, single, $60,000 wages
Federal tax
$3,750
Share of the gain
18.8%
Long-term: $20,000 gain, single, $60,000 wages
Federal tax
$2,167.50
Share of the gain
10.8%
5Rates

The 2026 long-term rates

2026 long-term capital gains and qualified dividends, by total taxable income
Filing status0% up to15% up to20% above
Single$49,450$545,500$545,500
Married filing jointly$98,900$613,700$613,700
Married filing separately$49,450$306,850$306,850
Head of household$66,200$579,600$579,600

Qualified dividends from most US shares and many foreign ones use the same rates.

6Method

How gains stack on your income

Long-term gains are counted last, on top of your ordinary taxable income (wages, interest and short-term gains after deductions). The part of the gain that fits under the 0% line is tax-free, the next part is taxed at 15%, and anything above the 15% line at 20%. Your gain never pushes your wages into a higher bracket.

7Example

Example: a $20,000 gain

Single, $60,000 of wages, $20,000 long-term gain
  1. Taxable wages ($60,000 − $16,100)$43,900
  2. Room left under $49,450$5,550
  3. $5,550 of the gain at 0%$0
  4. $14,450 of the gain at 15%$2,167.50
Federal tax on the gain$2,167.50

That is 10.8% of the gain. The tax on the wages themselves is unchanged.

80% rate

The 0% rate

Many people pay no federal tax on long-term gains at all. A married couple filing jointly with $100,000 of wages has $67,800 of taxable income, so a $20,000 gain fits under the $98,900 line and is taxed at 0%. With the standard deduction, a couple can have up to $131,100 of total income, gains included, and still pay 0% on the gains.

Retirees and people between jobs often use low-income years to "harvest" gains at 0%: sell, then buy back straight away to reset the cost basis higher. The wash-sale rule only applies to losses, not gains.

9Surtax

The 3.8% net investment income tax

The net investment income tax (NIIT) adds 3.8% on the smaller of your investment income and your modified AGI above $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These lines are not raised for inflation.

Single, $250,000 of wages, $50,000 long-term gain
  1. 15% of $50,000$7,500
  2. NIIT: 3.8% of $50,000$1,900
Federal tax on the gain$9,400
10Table

Tax on a $50,000 gain at different incomes

Single, standard deduction, 2026: federal tax caused by a $50,000 gain
Other income (wages)Long-termShareShort-term
$20,000$6681.3%$6,180
$40,000$3,6687.3%$8,350
$60,000$6,66813.3%$10,350
$100,000$7,50015.0%$11,564
$200,000$9,40018.8%$16,470
$400,000$9,40018.8%$19,400
$20,000 wages$668
$60,000 wages$6,668
$100,000 wages$7,500
$200,000 wages$9,400

Long-term tax on a $50,000 gain. The $200,000 and $400,000 rows include the 3.8% NIIT.

11Losses

Capital losses

Losses offset gains first: short-term losses against short-term gains, long-term against long-term, then across. If losses are bigger, up to $3,000 of the net loss ($1,500 married filing separately) comes off your other income each year, and the rest carries forward with no time limit.

A single person with $60,000 of wages, a $4,000 gain and $10,000 of losses has a $6,000 net loss. They deduct $3,000 this year, saving $360 of federal tax at 12%, and carry $3,000 forward to 2027.

The wash-sale rule

If you buy the same or a substantially identical security within 30 days before or after selling at a loss, the loss is disallowed for now and added to the basis of the new shares.

12Your home

Selling your home

If you owned your main home and lived in it for at least 2 of the 5 years before the sale, up to $250,000 of gain is tax-free, or $500,000 for a married couple filing jointly where both meet the living test. You can use the exclusion once every two years. A loss on your own home is not deductible.

Married filing jointly, $600,000 gain on a home, $150,000 of wages
  1. Gain$600,000
  2. Home sale exclusion−$500,000
  3. Taxable long-term gain$100,000
Federal tax (15%)$15,000

Improvements over the years raise your basis and shrink the gain, so keep the receipts. A partial exclusion may apply if you move early for a new job, health or another unforeseen reason. Planning the next purchase? The mortgage calculator and home affordability calculator help with the numbers.

13Property

Rental and investment property

Rental and second homes do not get the exclusion. Depreciation you claimed (or could have claimed) is "recaptured" and taxed at up to 25%, with the rest of the gain at the normal long-term rates. A 1031 like-kind exchange can defer the tax if you reinvest in other investment real estate within strict time limits.

14Special cases

Crypto, collectibles and special cases

  • Crypto is property. Selling, swapping one coin for another or spending it is a sale. A single person with $45,000 of wages who makes a $5,000 short-term crypto gain pays $600 (12%).
  • Collectibles (art, coins, stamps, gold and silver, including many metal ETFs) are taxed at up to 28% when long-term.
  • Small business stock (section 1202) can be partly or wholly tax-free if held long enough.
  • Very large gains run into the 20% rate: a single person with $100,000 of wages and a $1 million gain pays $211,120 of federal tax on it, including $34,200 of NIIT.
15State

State tax on gains

Most states tax capital gains as ordinary income at their normal rates, stacked on your other income. The calculator works out your state’s tax with and without the gain using its 2026 brackets: for a single person earning $60,000, a $30,000 gain adds about $2,485 of California tax, $1,627 in New York and $1,485 in Illinois. States with no income tax (Texas, Florida, Nevada and others) do not tax gains, with one exception: Washington taxes long-term gains on stocks and similar assets above a yearly standard deduction ($270,000 for 2024, raised for inflation) at 7%, and at 9.9% on gains over $1 million from 2025. Real estate is exempt there. Some states, such as Arkansas and Wisconsin, tax only part of long-term gains.

16Planning

Ways to lower the tax

  • Hold for more than a year to get the long-term rates.
  • Harvest losses to offset gains, minding the wash-sale rule.
  • Use the 0% band in low-income years, such as early retirement.
  • Invest through a 401(k) or IRA, where gains are not taxed each year. The Roth IRA calculator shows tax-free growth.
  • Give appreciated shares to charity instead of cash: no gain is taxed and you may deduct the full value.
  • Spread a big sale across two tax years, or use an installment sale for property.
17Paperwork

Reporting and paying

Sales are reported on Form 8949 and totaled on Schedule D of your Form 1040. Brokers send Form 1099-B; crypto platforms send Form 1099-DA from 2025 sales. Tax on a big gain is due during the year, so you may need an estimated payment for the quarter of the sale to avoid a penalty; the self-employment tax calculator lists the 2026 due dates. The federal income tax calculator puts gains together with the rest of your return.

18Income

Dividends and interest

Qualified dividends, paid by most US companies and many foreign ones on shares you have held for more than 60 days around the dividend date, get the same 0%, 15% and 20% rates as long-term gains. Ordinary dividends, such as those from REITs and money market funds, and interest from savings accounts, CDs and bonds are taxed as ordinary income. All of them count toward the 3.8% net investment income tax.

19Funds

Funds and ETFs in a taxable account

Mutual funds must pass the gains they make on to shareholders, so you can owe tax in a year you sold nothing. ETFs usually pay out far fewer gains because of the way shares are created and redeemed. Index funds with low turnover are generally the most tax-efficient choice outside a retirement account. When you sell part of a holding, your broker uses first in, first out unless you choose specific lots, which can let you sell the shares with the highest cost first. The compound interest calculator shows how much tax drag on returns adds up over the years.

20Pitfalls

Common mistakes

  • Selling a few days before the one-year mark and paying short-term rates.
  • Forgetting reinvested dividends in the cost basis, which leads to paying tax twice on the same money.
  • Leaving home improvements out of the basis when you sell a house.
  • Buying back the same shares within 30 days of a loss sale (the wash-sale rule).
  • Ignoring state tax, which can add 5% or more in many states.
  • Not making an estimated payment after a large sale, which can bring an underpayment penalty.
21Family

Gifts and inheritances

Giving away an asset does not trigger capital gains tax, but the person who receives it usually takes over your cost basis and pays the tax when they sell. Inherited assets are treated differently: the basis steps up to the value on the date of death, so the gain built up during the owner’s lifetime is never taxed. That is why many people keep their most appreciated shares or property until death and give cash or high-basis assets during their lifetime. Inherited assets also count as long-term, however briefly the heir holds them.

22Summary

Key numbers for 2026

0% / 15% / 20%
Long-term rates
$49,450
0% band ends, single
$545,500
20% starts, single
$613,700
20% starts, joint
3.8%
NIIT over $200,000 single
28%
Top rate on collectibles
$500,000
Home exclusion, joint
$3,000
Yearly loss deduction
Questions

Frequently asked

What are the capital gains tax rates for 2026?

Long-term gains (assets held more than a year) are taxed at 0%, 15% or 20%. For single filers, 0% applies up to $49,450 of total taxable income and 20% above $545,500. Short-term gains are taxed at ordinary rates of 10% to 37%.

How much tax will I pay on a $20,000 gain?

A single person with $60,000 of wages pays $2,167.50 of federal tax on a $20,000 long-term gain in 2026, or $3,750 if it is short-term.

How long do I have to hold an investment for long-term rates?

More than one year. The holding period starts the day after you buy, so sell no earlier than the day after the one-year anniversary.

Do I pay capital gains tax when I sell my house?

Usually not. If you owned and lived in it for 2 of the last 5 years, up to $250,000 of gain is tax-free, or $500,000 for married couples filing jointly.

Can I pay 0% on capital gains?

Yes, on the part of a long-term gain that fits under $49,450 of taxable income for single filers or $98,900 for married couples filing jointly in 2026.

What is the net investment income tax?

A 3.8% tax on investment income, including gains, for people with modified AGI over $200,000 single, $250,000 married filing jointly or $125,000 married filing separately.

How much of a capital loss can I deduct?

Losses offset gains in full. A net loss reduces other income by up to $3,000 a year ($1,500 married filing separately), and the rest carries forward.

How is crypto taxed?

As property. Selling, swapping or spending crypto is a sale, taxed at short or long-term rates depending on how long you held it.

Do states tax capital gains?

Most states tax them as ordinary income. States without income tax do not, except Washington, which taxes large long-term gains on stocks and similar assets.

Do capital gains push my wages into a higher bracket?

No. Long-term gains are stacked on top of your other income, so they never change the tax on your wages, though they can raise the rate on the gain itself and affect phase-outs.

When do I pay capital gains tax?

With your 2026 return by April 15, 2027, but a large gain may call for an estimated payment in the quarter of the sale to avoid a penalty.

What is cost basis?

What you paid for the asset plus buying costs, adjusted for things like reinvested dividends and home improvements. Inherited assets take their value at the date of death.

Good to know

Estimate for tax year 2026. State figures use your state's flat rate or the rate you enter. Not tax advice.