Home · Calculators · Capital gains

Tools · Taxes · One lot

Capital gains tax calculator

Federal tax on this sale: proceeds minus basis, more than one year vs not, then the 0 / 15 / 20% long-term stack on top of other taxable income. NIIT 3.8% flags if MAGI crosses the statutory floor. Type your state percent — this page does not scrape a state table. 2026 bands from Rev. Proc. 2025-32. Primer: short vs long. 0% harvest sequence is already tax-efficient withdrawals — no second playbook. Losses: harvest calculator.

Quick answer: This calculator estimates federal tax on one sale: proceeds minus basis, short-term at ordinary rates or long-term on the 0/15/20% stack the page cites, plus a NIIT flag and a state percent you type.

The lot

IRC §1222: long-term is more than one year. Day 365 is still short. Specific-ID the lot at the broker before the trade; FIFO is the default trap.

The return this gain sits on

Other taxable income is Form 1040 taxable without this gain — after the standard or itemized deduction. MAGI for NIIT is AGI-class; it is not the same number. Defaults are the worked slice in NOTES.

2026 sale

—

Educational estimate. One lot, stocks/funds in a taxable account. Collectibles (28%) and unrecaptured §1250 (25%) are not modeled. Qualified dividends use the same 0/15/20 stack but are not this sale. Home sale $250k / $500k is IRC §121, not this page. NIIT MAGI floors are statutory (IRC §1411) and not indexed: $200,000 single / HOH, $250,000 MFJ, $125,000 MFS. Sequence: tax-efficient withdrawals. Losses: wash-sale primer. Not advice.

What this means for you

What this means for you: holding period picks the stack. A loss is not a tax; it belongs on the tax-loss page. NIIT is a flag when MAGI crosses the threshold the page uses, not a blended bracket. State tax is the percent you type.

How to use this calculator

  1. Open the Capital gains calculator and keep the sample numbers or replace them with your own. The result updates as you type.
  2. Read the headline figure first, then the breakdown or chart under it.
  3. Use Copy share link if you want those inputs in the URL. The page is an educational estimate, not a filing, approval, or recommendation.

Related

FAQ

How is the gain calculated?

Proceeds minus basis, for the shares you type. The page does not look up a quote.

When is the gain long-term?

When you tell the page the holding period is long-term. It then uses the 0/15/20% bands it cites.

What is the NIIT flag?

A 3.8% net-investment-income marker when MAGI is over the threshold the page labels. It does not compute every NIIT worksheet line.

Educational, not financial advice. Page updated October 24, 2026 — no tax, limit, or rate figure was changed in this review.