Invesaro

Free tools / US capital gains tax calculator

US capital gains tax calculator

Work out federal and state tax on a stock sale, including the short-term versus long-term difference and the 3.8% net investment income tax.

US capital gains tax calculator
What you paid, including commissions.
Long-term: 0, 15 or 20. Short-term: your marginal income rate.
%
%

Rates are entered by you because federal brackets are re-indexed annually and state rules differ. This is an estimate, not tax advice.

In the United States the single biggest lever on your tax bill is how long you held the position. Sell within a year and the gain is short-term, taxed at your ordinary income rate. Hold for more than a year and it becomes a long-term gain, taxed at 0%, 15% or 20% depending on your taxable income.

This calculator takes the sale, the cost basis and your rates, then shows the federal tax, any state tax, the net investment income tax where it applies, and what is actually left. Rates are inputs rather than hard-coded, because brackets are re-indexed every year and state rules vary enormously.

The one-year line is worth real money

The gap between the short-term and long-term treatment is usually the difference between paying your marginal income rate and paying 15%. On a $50,000 gain that can be well over $10,000, decided by nothing more than the sale date.

The holding period starts the day after purchase and ends on the sale date. "More than one year" means exactly that: selling on the anniversary itself is still short-term, which is a mistake worth avoiding by a single day.

The extras people forget

The net investment income tax adds 3.8% on investment income once modified adjusted gross income passes $200,000 for a single filer or $250,000 for a married couple filing jointly. Those thresholds are not indexed to inflation, so more people cross them every year.

Most states tax capital gains as ordinary income, and a handful do not tax them at all. Enter your own state rate. Also remember the wash sale rule: if you rebuy the same or a substantially identical security within 30 days before or after taking a loss, that loss is disallowed and rolls into the basis of the new position.

Frequently asked questions

What are the long-term capital gains rates?

Long-term gains are taxed at 0%, 15% or 20% federally, depending on your taxable income for the year. Most investors fall into the 15% band. The brackets are adjusted annually, so check the current thresholds before relying on a number.

Can losses reduce the tax?

Yes. Capital losses offset capital gains of the same type first, then the other type. If losses exceed gains you may deduct up to $3,000 against ordinary income per year, and carry the rest forward indefinitely.

Do I owe tax on unrealised gains?

No. Federal capital gains tax applies when you sell. Holding an appreciated position creates no tax event, which is why long holding periods are so tax-efficient. Dividends, however, are taxed in the year they are paid.

Related calculators

Numbers are one thing, a thesis is another

Invesaro publishes investment theses with a hard publication date, an edge score and a basket return tracked against the market. Free and in public.

See our theses →

New theses straight to your inbox

Subscribe and we will send you every new thesis and every verdict. No spam, one-click unsubscribe.