ToolNimba

๐Ÿ“ˆ Capital Gains Tax Calculator

By ToolNimba Editorial Team ยท Reviewed by ToolNimba Review Team, personal finance and tax content review ยท Updated 2026-06-20

This tool gives a simplified estimate of US federal capital gains tax and is not tax, legal, or financial advice. It ignores state taxes, the 3.8% Net Investment Income Tax, losses, and other rules. Confirm your numbers with a qualified tax professional.

Long-term rate is set by your taxable income band (2025 US federal brackets).

Capital gain
-
Tax rate applied
-
Estimated capital gains tax
-
Net proceeds after this tax
-

Estimate only. Covers US federal long-term capital gains brackets and treats short-term gains as ordinary income at the rate you enter. It does not include the 3.8% Net Investment Income Tax, state taxes, or capital losses. This is not tax advice.

When you sell an asset such as a stock, fund, or property for more than you paid, the profit is a capital gain, and the tax you owe depends on how long you held it and how much you earn. This capital gains tax calculator works out your gain, applies the right federal rate, and shows the estimated tax plus what you keep after it. Long-term gains use the 0%, 15%, or 20% brackets, while short-term gains are taxed as ordinary income at the rate you enter.

What is the Capital Gains Tax Calculator?

A capital gain is simply the profit on an asset: sale price minus your cost basis (what you paid, including commissions and improvements). If you bought shares for 10,000 dollars and sold them for 16,000 dollars, your capital gain is 6,000 dollars. That gain is what gets taxed, not the full 16,000 dollars of proceeds, because you are only taxed on the increase in value, not on the return of your own money.

The single biggest factor in how much tax you pay is the holding period. If you owned the asset for more than one year before selling, the profit is a long-term capital gain and qualifies for preferential federal rates of 0%, 15%, or 20%, set by your taxable income band. If you owned it for one year or less, it is a short-term capital gain and is taxed as ordinary income at your normal marginal rate, which for many people is meaningfully higher. This is why the one-year line is so important to investors.

Long-term rates are not a flat percentage. They sit on top of your other taxable income, so a lower earner can pay 0% on long-term gains while a high earner pays 20% on the same gain. For 2025, a single filer with taxable income up to 48,350 dollars pays 0%, the 15% band runs up to 533,400 dollars, and income above that is taxed at 20%. Married couples filing jointly get roughly double those thresholds. The calculator picks the rate for you when you choose your filing status and income band.

A few things sit outside this estimate. High earners may also owe the 3.8% Net Investment Income Tax, most states levy their own tax on gains, and capital losses can offset gains to reduce what you owe. Collectibles and certain real-estate depreciation are taxed differently again. Treat the result here as a clean first-pass estimate of federal capital gains tax, then refine it with your full tax picture or a professional.

When to use it

  • Estimating the tax bill before you sell stocks, ETFs, or mutual fund shares so the proceeds are not a surprise.
  • Comparing the tax cost of selling now (short-term) versus waiting past the one-year mark for long-term rates.
  • Working out roughly how much of a property or crypto sale you actually keep after federal capital gains tax.
  • Checking whether your income keeps you in the 0% long-term bracket, where qualifying gains can be tax-free federally.

How to use the Capital Gains Tax Calculator

  1. Enter your purchase price (cost basis) and the sale price (proceeds) of the asset.
  2. Choose the holding period: long term if you held it more than a year, short term if a year or less.
  3. For long term, pick your filing status and taxable income band; for short term, enter your ordinary income tax rate.
  4. Read your capital gain, the rate applied, the estimated tax, and your net proceeds, then copy the summary if you need it.

Formula & method

Capital gain = sale price - purchase price (cost basis). Long-term tax = gain x long-term rate (0%, 15%, or 20% by taxable income). Short-term tax = gain x your ordinary income tax rate. Net proceeds = sale price - estimated tax.

Worked examples

You bought stock for 10,000 dollars and sold it after two years for 16,000 dollars. You are single with 90,000 dollars of taxable income.

  1. Capital gain = sale - purchase = 16,000 - 10,000 = 6,000 dollars
  2. Held more than one year, so it is a long-term gain
  3. 90,000 dollars of income falls in the 15% long-term band for a single filer
  4. Tax = 6,000 x 15% = 900 dollars

Result: Estimated long-term capital gains tax = 900 dollars, leaving 15,100 dollars in net proceeds.

You bought stock for 10,000 dollars and sold it after eight months for 16,000 dollars. Your ordinary marginal tax rate is 22%.

  1. Capital gain = 16,000 - 10,000 = 6,000 dollars
  2. Held one year or less, so it is a short-term gain taxed as ordinary income
  3. Apply your ordinary rate: tax = 6,000 x 22% = 1,320 dollars
  4. Compare: waiting past one year would have cut the rate to 15% and the tax to 900 dollars

Result: Estimated short-term capital gains tax = 1,320 dollars, which is 420 dollars more than the long-term result.

2025 US federal long-term capital gains tax rates by taxable income

Long-term rateSingle filerMarried filing jointly
0%Up to $48,350Up to $96,700
15%$48,351 to $533,400$96,701 to $600,050
20%Over $533,400Over $600,050

Long-term vs short-term treatment on a 6,000 dollar gain

Holding periodRate basisExample rateTax on $6,000
One year or less (short term)Ordinary income rate22%$1,320
More than one year (long term)0/15/20% by income15%$900
More than one year, lowest band0/15/20% by income0%$0

Common mistakes to avoid

  • Taxing the full sale price instead of the gain. You are taxed only on the profit, not the whole proceeds. The cost basis (what you paid) is yours to keep tax-free, so always subtract it before applying any rate.
  • Confusing short-term and long-term holding periods. The line is more than one year, not exactly one year. Selling on day 365 is still short term and taxed at ordinary rates. Holding even one extra day past a full year can move you to the lower long-term brackets.
  • Assuming long-term gains have a single flat rate. Long-term rates are 0%, 15%, or 20% depending on your taxable income for the year. A lower earner may pay nothing on the same gain that costs a high earner 20%, so your income band matters.
  • Forgetting state tax and the Net Investment Income Tax. This estimate is federal only. Most states tax capital gains too, and higher earners may owe an extra 3.8% Net Investment Income Tax. Your real bill can be higher than the federal figure shown here.

Glossary

Capital gain
The profit from selling an asset, equal to the sale price minus your cost basis.
Cost basis
What you paid for the asset, including purchase commissions and qualifying improvements, used to work out the gain.
Long-term capital gain
Profit on an asset held more than one year, taxed at preferential federal rates of 0%, 15%, or 20%.
Short-term capital gain
Profit on an asset held one year or less, taxed as ordinary income at your normal marginal rate.
Marginal tax rate
The tax rate that applies to your next dollar of ordinary income, used for short-term gains.
Net Investment Income Tax
An extra 3.8% federal tax on investment income for higher earners, on top of regular capital gains tax.

Frequently asked questions

How is capital gains tax calculated?

Take your capital gain, which is the sale price minus what you paid (your cost basis), then multiply it by the applicable rate. Long-term gains use 0%, 15%, or 20% based on your taxable income, while short-term gains are taxed as ordinary income. For example, a 6,000 dollar long-term gain at 15% is 900 dollars of tax.

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

Short-term gains apply to assets held one year or less and are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term gains apply to assets held more than one year and qualify for lower rates of 0%, 15%, or 20%. Holding past the one-year mark is the main lever for reducing the tax.

What are the 2025 long-term capital gains tax rates?

For 2025, single filers pay 0% on long-term gains with taxable income up to 48,350 dollars, 15% from 48,351 to 533,400 dollars, and 20% above that. Married couples filing jointly get roughly double those thresholds, with 0% up to 96,700 dollars and 20% above 600,050 dollars.

Do I pay capital gains tax if I lost money on the sale?

No. If you sold for less than your cost basis you have a capital loss, not a gain, so there is no capital gains tax on that sale. Losses can also offset other gains and up to 3,000 dollars of ordinary income per year, which can lower your overall tax bill.

Is the 0% capital gains tax rate real?

Yes. If your total taxable income, including the gain, stays within the 0% long-term band for your filing status, qualifying long-term gains are taxed at 0% federally. This is why some investors time sales for lower-income years, though state taxes may still apply.

Does this calculator include state taxes and other surtaxes?

No. It estimates US federal capital gains tax only. It does not include state income tax, the 3.8% Net Investment Income Tax for higher earners, or special rules for collectibles and depreciated real estate. Use it as a starting point and confirm your full liability with a tax professional.

Sources