Skip to main content
planin30

Capital Gains Tax Calculator for Stocks — Selling shares? See the tax before you sell.

Choose “Stocks, funds or crypto”, then enter the price, what you paid, your income and your state. See the federal tax band by band, the 3.8% surtax, your state, and what losses would save.

  • Free to start
  • No sign-up to try
  • 2027 federal tables
Two neighbors laughing over coffee on a rooftop terrace
$600,000 of shares, ColoradoTax $98,332 · keeps $501,668

The gain on top of your income

Which rate you pay depends on everything else you earn that year. The calculator stacks the gain on your income the way a return does, and shows where each dollar of it lands.

What you keep

The tax, and where the gain lands.

The cash you keep, then the tax split into federal, the 3.8% surtax and your state. Open how it’s worked out to see the gain at 0%, 15% and 20%, and the losses carried over that came off it first.

“Capital gain at 15% $430,000”How it’s worked out, on the “Selling shares that grew” example
  • The gain stacked on your income
  • Short-term gains taxed like wages
  • Losses carried over taken off first
The tax on a sale of shares, then the gain band by band: What you keep

What you keep 1/2

Two friends deep in conversation at a café table

Ways to keep more

What losses and timing would save.

Each lever is priced by running your sale again: what every $10,000 of losses sold the same year saves, and what an opportunity fund would. Startup shares bought at issue can be QSBS, and that has a question of its own.

“Sell losing investments the same year”Ways to keep more, on the same example
  • Losses, priced per $10,000
  • An opportunity fund
  • QSBS for startup shares
Ways to keep more on a sale of shares: an opportunity fund and selling losing investments the same year

Start with the price and what you paid.

Free to start. No sign-up to try.

Work out my sale →

About the Capital Gains Tax Calculator

A gain on shares, funds or crypto held more than a year is taxed at 0%, 15% or 20% federally, and which one depends on the rest of your income, because the gain sits on top of it. Above $200,000 of income ($250,000 married) the 3.8% net investment income tax adds to it, and most states tax the gain like wages. Held a year or less, the gain is taxed at your income-tax rate.

Enter the price, what you paid, your income and your state, and the calculator shows the tax and what you keep, with how much of the gain fell in each band. Losses carried over from earlier years come off first, and it prices what selling losing investments the same year would save. Startup shares bought at issue can be qualified small business stock, and it handles that too.

What you can do

  • The gain stacked on your income, with how much falls at 0%, 15% and 20%
  • The 3.8% surtax and your state
  • Short-term gains taxed at your income rate
  • Losses carried over, and what harvesting more would save
  • QSBS for startup shares bought at issue

Frequently asked questions

What rate do I pay on selling stock?

Held more than a year, 0%, 15% or 20% federally, depending on your taxable income with the gain added; in 2027 a married couple pays 0% up to $102,100 of taxable income and 20% only above $633,600. Held a year or less, the gain is taxed like wages. The 3.8% surtax and state tax come on top.

Is crypto taxed the same way?

Yes. Crypto is property for federal tax, so selling or trading it is a capital gain or loss like a stock, long-term after a year. Choose “Stocks, funds or crypto” and enter the price and what you paid.

Can losses lower the tax?

Yes. Losses offset gains dollar for dollar, and up to $3,000 more can offset other income each year; the rest carries forward. The calculator takes losses carried over off the gain and shows what each $10,000 of losses sold the same year would save. Buying the same shares back within 30 days undoes a loss (the wash-sale rule).

Related calculators and tools

Other calculators and tools that pair well with the Capital Gains Tax Calculator for Stocks.

Photos by Apartment Life, Julio Lopez and Erys Shape on Unsplash.