Skip to main content
TaxArith

Fundamentals

Capital Gains: Netting Losses Before Applying Rate Stacks

The visible gain on a brokerage screen is not yet the taxable result. Federal capital-gain tax starts transaction by transaction, preserves short- or long-term character, nets losses and carryovers, and only then applies ordinary or preferential rates.

11 minute read · 2026 U.S. federal tax

See the mechanism

Calculate each transaction

Short-term and long-term investment transactions moving through loss netting, carryover, preferential rate stacking, and an optional NIIT layer.
  1. 1Calculate each transaction
  2. 2Net by holding period
  3. 3Apply rate stack and optional NIIT
Calculate each transaction is the editorial focus of this fundamentals.
Visual summary: Short-term and long-term investment transactions moving through loss netting, carryover, preferential rate stacking, and an optional NIIT layer. This page highlights: Calculate each transaction.

Amount realized minus adjusted basis creates each signed result

The calculator subtracts entered selling expenses from sales proceeds to determine amount realized, then subtracts adjusted cost basis. A positive number is a gain and a negative number is a loss.

Basis must already include required adjustments. The tool does not construct basis from brokerage records, gifts, inheritance, wash sales, depreciation, or corporate actions.

Character survives until netting is complete

Production values keep short-term loss, long-term gain, carryover, regular tax impact, and NIIT as distinct stages.

Short-term path

1$5,550.00

Short-term loss

2$1,500.00

Loss carryover

Ordinary-character losses enter netting before any deduction or carryforward.

Long-term path

3$13,800.00

Final long-term gain

The remaining gain enters the preferential-rate stack.

4$2,070.00

Regular tax impact

5$950.00

Optional NIIT

The optional NIIT layer is shown separately because its MAGI and NII inputs are not derived by TaxArith.
Visual summary: Production values keep short-term loss, long-term gain, carryover, regular tax impact, and NIIT as distinct stages.

Short-term and long-term amounts net in an ordered sequence

Current gains and losses are combined within each holding-period category, with entered carryovers retaining their character. Opposite-signed short- and long-term category results then offset.

A remaining short-term gain joins ordinary taxable income. A remaining ordinary long-term gain shares the preferential stack with qualified dividends. A net loss may produce a limited ordinary-income deduction and an estimated unused amount.

A loss changes character before it changes tax

If a current short-term loss first offsets a short-term gain, only any remaining category result reaches cross-netting. The same loss cannot simultaneously offset a gain, create the annual ordinary-income deduction, and become carryforward; the ordered calculation allocates it once.

What changes the estimate most

Prioritize the inputs that can move this model before refining smaller details.

  • Adjusted basis

    High

    Flows directly into transaction gain or loss.

  • Holding period

    High

    Determines ordinary or preferential character.

  • Carryovers and income stack

    High

    Can absorb gains or move them across rate ranges.

Impact describes influence inside this calculator, not eligibility or a recommendation.
Visual summary: Adjusted basis: High. Flows directly into transaction gain or loss. Holding period: High. Determines ordinary or preferential character. Carryovers and income stack: High. Can absorb gains or move them across rate ranges.

Long-term thresholds depend on the income underneath the gain

Ordinary taxable income fills the lower stack first. Qualified dividends then share preferential space with final net long-term gain across the 0%, 15%, and 20% ranges.

The tax impact compares a baseline calculation with the capital-activity calculation. That is more informative than multiplying a raw transaction gain by one headline rate.

NIIT is optional, separate, and input-dependent

When enabled, the simplified NIIT base is the smaller of entered net investment income and MAGI above the filing-status threshold, multiplied by 3.8%. The result is added as a separate layer.

TaxArith does not derive MAGI or NII and does not attribute all NIIT to the listed transactions. Uncertain inputs should be compared explicitly or reviewed outside the tool.

The calculation boundary

The left side enters this model; the right side still requires another calculation or review.

Inside the boundary

  • Transaction proceeds, costs, basis
  • Short/long netting and carryovers
  • Preferential rates and optional simplified NIIT

Outside the boundary

  • Wash sales and basis construction
  • Special-rate property and recapture
  • AMT, forms, portfolio outcomes, state tax
A result is only as complete as the federal layers represented inside the boundary.
Visual summary: Included: Transaction proceeds, costs, basis, Short/long netting and carryovers, Preferential rates and optional simplified NIIT. Not included: Wash sales and basis construction, Special-rate property and recapture, AMT, forms, portfolio outcomes, state tax.

Before you use the estimate

  • Support adjusted basis and selling expenses for every transaction.
  • Confirm holding period rather than inferring it from an account label.
  • Carry short- and long-term losses from the official worksheet separately.
  • Use NIIT only with independently supported MAGI and NII.

Where this estimate stops

  • No wash-sale adjustment, special 28% or unrecaptured Section 1250 rates, recapture, home-sale exclusion, installment sales, AMT, or state tax.
  • No Form 8949, Schedule D, Form 8960, broker reconciliation, or non-individual return.

Sources and references

Only the primary federal sources used for the rules discussed in this guide are listed here.

  • Revenue Procedure 2025-32

    Internal Revenue Service · The inflation-adjusted 2026 ordinary brackets, standard deductions, preferential-rate thresholds, and other indexed amounts used by the applicable calculation.

  • Topic No. 409, Capital Gains and Losses

    Internal Revenue Service · General capital gain and loss character, netting, the annual capital-loss deduction, and carryover treatment.

  • Publication 550, Investment Income and Expenses

    Internal Revenue Service · Investment income, basis, holding-period, capital netting, and wash-sale concepts discussed in the guide.

  • Net Investment Income Tax

    Internal Revenue Service · The separate 3.8% NIIT framework and MAGI-threshold concept used by the optional estimate.

TaxArith provides illustrative 2026 U.S. federal tax estimates for general information. It is not tax, legal, financial, or investment advice and does not prepare or file a return. Results depend on the accuracy and completeness of the submitted facts.