TALLIVO
Your numbers will appear here as you use the tools.
home / capital gains tax / methodology
Methodology

How the Capital Gains Tax Calculator works

How Tallivo computes federal tax on a stock capital gain, including the 0/15/20% long-term brackets and the 3.8% NIIT.

The formula

LT tax = ltcgTax(otherTaxable + gain) − ltcgTax(otherTaxable); ST gains use the ordinary brackets the same way

Step by step

  1. Short-term gains (held ≤ 1 year) are ordinary income: we tax your other income with and without the gain and take the difference.
  2. Long-term gains fill the 0/15/20% capital-gains brackets STARTING where your ordinary taxable income ends — which is why modest incomes can realize gains at 0%.
  3. NIIT adds 3.8% on the smaller of the gain or your MAGI above the statutory threshold ($200k single/HoH, $250k MFJ, $125k MFS — not inflation-indexed).
  4. The 2026 brackets and standard deduction come from the same cited federal dataset as every other tool.

Assumptions & limitations

  • The gain is your only net investment income and MAGI ≈ gross income + gain.
  • Federal only — most states tax capital gains as ordinary income (see your state's income-tax page); no wash-sale, basis-adjustment, or loss-carryforward modeling.
  • Collectibles, §1202 stock, and depreciation recapture have special rates not modeled here.

Sources

Reviewed and updated for the 2026 tax year. Figures are planning estimates, not a loan offer — this is not financial advice.

Think one of these figures is wrong? Tell us and we'll check it — we verify against the primary source, not aggregator tables. How we build and check every calculator is documented in our editorial policy.

← Back to the Capital Gains Tax Calculator