At a glance
Quick answer
Use the capital gains calculator after transactions have been reduced to net short term and net long term gains or losses. Enter gain or loss after proceeds, adjusted basis, selling costs, Form 8949 adjustments, and any loss carryovers. Do not enter sale proceeds as gain. The calculator follows Schedule D netting, sends a remaining short term gain through ordinary rates, and stacks an eligible net long term gain with qualified dividends through the 0%, 15%, and 20% worksheet. A net loss can produce a current deduction of up to $3,000, or $1,500 when married filing separately. NIIT uses MAGI and a different lesser-of base, so it remains a separate calculation.
How the calculation works
Start from Form 8949 gain or loss, not proceeds
Gain is generally proceeds minus adjusted basis and selling costs, combined with required Form 8949 adjustments. Basis can change for wash sales, reinvested distributions, gifts, inheritances, return of capital, improvements, and other events. The calculator does not derive those values. It assumes the entered short term and long term net amounts already reflect transaction-level work and any capital loss carryovers brought into Schedule D.
Net short term and long term results in Schedule D order
Schedule D first totals short term items on line 7 and long term items on line 15, then combines them on line 16. If both are gains, the short term amount remains ordinary and the long term amount can use preferential rates. If a $10,000 short term loss offsets a $20,000 long term gain, only $10,000 remains preferential. If a $20,000 short term gain offsets a $10,000 long term loss, the remaining $10,000 is ordinary. This ordering prevents a long term loss from creating preferential treatment for short term gain.
Apply the annual loss limit without inventing a carryover
When the combined result is a loss, Schedule D generally limits the current deduction to $3,000, or $1,500 for married filing separately. The displayed tax reduction applies that limited amount against entered taxable income, reducing the ordinary layer first and then qualified dividends if the ordinary layer is exhausted. The amount beyond the annual limit is not labeled as the final carryover. The IRS Capital Loss Carryover Worksheet also needs prior-year Schedule D lines and broader taxable-income facts, including possible negative taxable income, that this focused route does not collect.
Stack qualified dividends and eligible net long term gain
The ordinary taxable income input means taxable income after adjustments and deductions but before the capital result and qualified dividends entered on this page. It is not gross income and the standard deduction must not be subtracted twice. Ordinary income and any remaining short term gain fill the stack first. Qualified dividends then occupy preferential capacity before the capital gain layer. The worksheet assigns 0%, then 15%, then 20% only to the dollars in each band and compares the result with regular tax. A statutory maximum rate is not automatically the actual worksheet tax.
Route special 25% and 28% classes outside this estimate
Collectibles and the taxable part of certain section 1202 qualified small business stock amounts can enter the 28% rate group. Unrecaptured section 1250 gain can enter a 25% rate group. Those descriptions are maximum rates, and the Schedule D Tax Worksheet can produce a lower regular-tax result. This calculator excludes those classes because their worksheets require transaction details beyond net short term and long term totals. It also excludes ordinary depreciation recapture, which does not belong in the preferential layer.
Test NIIT and other return effects separately
Net Investment Income Tax is 3.8% of the lesser of supported net investment income or MAGI above the filing-status threshold. Taxable income is not MAGI, so this route does not infer NIIT and does not add it twice. Use the separate NIIT calculator. Installment sales, home-sale exclusion, AMT, state and local tax, estimated payments, credits, and penalty calculations also require separate forms or facts. A large disposition can affect all of them even when its base capital-gain arithmetic is correct.
2025 and 2026 values
Tax year 2025
2025 final preferential thresholds
For final 2025 single filer values, the 0% long-term capital-gain ceiling is $48,350 and the 15% ceiling is $533,400. Joint ceilings are $96,700 and $600,050. Rates are 0%, 15%, and 20%.
Tax year 2026
2026 planning preferential thresholds
For 2026 planning, single ceilings are $49,450 and $545,500; joint ceilings are $98,900 and $613,700. The implemented preferential rates remain 0%, 15%, and 20%.
Recalculate it yourself
Worked example
$20,000 gain stacked over $40,000 ordinary taxable income
A single filer selects 2025, enters $40,000 ordinary taxable income before capital items, $0 net short term gain or loss, $20,000 net long term gain, and $0 qualified dividends.
- Unused 0% band = $48,350 ceiling − $40,000 ordinary taxable income = $8,350.
- Gain taxed at 0% = min($20,000, $8,350) = $8,350; tax = $8,350 × 0% = $0.
- Remaining gain = $20,000 − $8,350 = $11,650.
- The remaining $11,650 fits below the $533,400 single 15% ceiling, so tax = $11,650 × 15% = $1,747.50.
- Total preferential capital-gain tax = $0 + $1,747.50 = $1,747.50.
Result
The estimated federal tax from the capital result is $1,747.50 before any separately calculated NIIT. Only $11,650, not the entire $20,000 gain, receives the 15% rate.
What is included
- Selected year, filing status, ordinary taxable income before capital items, signed net short term and long term results, qualified dividends, Schedule D netting, short term ordinary-rate tax, 0%, 15%, and 20% stacking, and the annual capital loss limit.
- Final 2025 and planning 2026 preferential thresholds, including exact filing-status boundaries.
What is not included
- Final capital loss carryover worksheet, transaction-level proceeds and adjusted basis, selling costs, wash sales, holding-period decisions, inherited or gifted basis, installment sales, depreciation recapture, home-sale exclusion, and business-property forms.
- Collectibles and taxable section 1202 amounts in the 28% group, unrecaptured section 1250 gain in the 25% group, NIIT, AMT completion, state or local tax, estimated payments, credits, and penalties.
Common mistakes
Entering proceeds instead of gain
A $100,000 sale with $80,000 adjusted basis generally starts from a $20,000 gain before selling costs and adjustments, not $100,000. Using proceeds overstates the tax base.
Entering gross income or subtracting deductions twice
The ordinary input is taxable income before the capital items and qualified dividends entered here. Gross income fails to reflect deductions, while subtracting the standard or itemized deduction again understates the stack.
Applying 15% to the full gain
Ordinary income leaves $8,350 of 0% capacity in the example. Stacking allocates that portion before the remaining gain reaches 15%.
Treating maximum rates as a flat bill
The 20%, 25%, and 28% figures describe maximum statutory groups. Exact worksheets preserve stacking and compare their result with regular tax rather than applying one top rate to every dollar.
Adding NIIT from taxable income
NIIT uses MAGI and net investment income, not this taxable-income input. Calculate it separately with Form 8960 facts so it is neither omitted nor counted twice.
Threshold screen only
Alternative Minimum Tax boundary
This calculator does not complete Form 6251. Large deductions, incentive stock options, and other preference items can make a regular federal estimate differ from AMT. Use the high earner guide and the cited IRS instructions before treating a result as complete.
Frequently asked questions
What does the Capital gains tax calculator model?
It combines entered net short term and long term gains or losses in Schedule D order. It taxes any remaining short term gain at ordinary rates, stacks eligible net long term gain with qualified dividends, and applies the annual net capital loss limit.
Are short term capital gains taxed at preferential rates?
Generally no. A net short term gain remaining after Schedule D netting is taxed through the ordinary income brackets. A short term loss can reduce a net long term gain before preferential rates apply.
Does this result include Net Investment Income Tax?
No. NIIT requires modified adjusted gross income and a separately determined net investment income amount. Use the separate NIIT calculator so the 3.8 percent tax is not inferred from taxable income or counted twice.
Does the result cover every capital gain class and adjustment?
No. Final loss carryovers, collectibles, taxable section 1202 amounts, unrecaptured section 1250 gain, installment sales, depreciation recapture, wash sales, home-sale exclusions, AMT, state tax, and estimated payments require facts outside this model.
Primary sources
- 2025 Schedule D (Form 1040), Capital Gains and Losses, opens in a new tab
Reviewed 2026-07-25
- 2025 Instructions for Schedule D (Form 1040), opens in a new tab
Reviewed 2026-07-25
- 2025 Instructions for Form 8949, opens in a new tab
Reviewed 2026-07-25
- IRS Topic 409, Capital Gains and Losses, opens in a new tab
Reviewed 2026-07-25
- IRS Publication 550 for 2025, opens in a new tab
Reviewed 2026-07-25
- 2025 Instructions for Form 1040, opens in a new tab
Reviewed 2026-07-25
- IRS Revenue Procedure 2024-40, opens in a new tab
Reviewed 2026-07-25
- IRS Revenue Procedure 2025-32, opens in a new tab
Reviewed 2026-07-25
- 2025 Instructions for Form 8960, opens in a new tab
Reviewed 2026-07-25