Capital Gains Tax Calculator 2026
Estimate tax on investment gains, including short-term/long-term treatment and NIIT exposure.
Last Updated: February 2026
Used to estimate whether your gain falls in the 0%, 15%, or 20% long-term bracket and whether NIIT applies.
Capital Gain
$0.00
Estimated Tax Rate
0.00%
Capital Gains Tax
$0.00
NIIT (3.8%)
$0.00
Total Tax
$0.00
Net Profit After Tax
$0.00
Gain Distribution
Important Disclaimer
This calculator provides estimates for informational purposes only and does not constitute tax, legal, or financial advice. Tax laws are complex and change frequently. Consult a qualified tax professional for advice specific to your situation. CalculatorWallah is not responsible for any decisions made based on calculator results.
Reviewed For Methodology, Labels, And Sources
Every CalculatorWallah calculator is published with visible update labeling, linked source references, and review of formula clarity on trust-sensitive topics. Use results as planning support, then verify institution-, policy-, or jurisdiction-specific rules where they apply.
Reviewed by Iliyas Khan, Chief Operating Officer. Page updated February 2026. Tax, sales tax, insurance, and health calculators are reviewed when rules, rates, eligibility assumptions, healthcare standards, or source references change. Topic ownership: Tax calculators, Sales tax calculators, Insurance calculators, Health calculators.
Tax credentialed review: Named internal reviewer: Iliyas Khan, Chief Operating Officer. External credentialed professional review is still required before this page is treated as professional advice.
Internal tax and sales-tax methodology reviewer. Review scope: calculator assumptions, labels, source context, workflow clarity, and compliance-sensitive disclaimers.
Relevant review context: CalculatorWallah tax and sales-tax calculator workflow owner; Source-first review of IRS, state revenue, rate, and filing-sensitive references; Compliance-sensitive labels, assumptions, and user-facing disclaimer review.
Required professional credentials: CPA, Enrolled Agent, licensed tax professional. Scope: tax formulas, jurisdiction assumptions, withholding language, filing-sensitive examples, and compliance caveats.
This page is educational planning support. A named CPA, EA, or licensed tax professional should review the page before it is positioned as tax advice or used for filing decisions.
Source expectation: Review should cite current IRS, state revenue department, payroll-tax, or official tax authority sources where applicable.
How to Use This Calculator
Step 1: Enter purchase and sale values
Start with cost basis and sale proceeds so the calculator can estimate the raw gain before tax treatment is applied.
Step 2: Choose short-term or long-term treatment
Use the holding-period input carefully because the tax difference between short-term and long-term gains can be one of the biggest planning levers on the page.
Step 3: Add filing status and ordinary income
Ordinary income matters because it affects how much room is left in the lower long-term capital-gains brackets.
Step 4: Review total tax and after-tax profit
Use the result to compare sell-timing scenarios, not just to compute one isolated tax number.
How It Works (Step by Step)
The calculator measures gain as sale price minus purchase price, then applies different tax logic based on holding period. Short-term gains are estimated through ordinary-rate impact. Long-term gains are allocated across 0%, 15%, and 20% federal tiers based on your filing status and ordinary income.
It then estimates Net Investment Income Tax (NIIT) where income exceeds threshold levels, combines tax layers, and returns after-tax profit so you can compare strategies.
This structure makes it easier to test sell-timing scenarios before executing a taxable sale.
Capital Gains Tax Guide
What Is Capital Gains Tax?
Capital gains tax is the federal tax you may owe when you sell an investment for more than your tax basis. In practice, the biggest question is not just how large the gain is. It is how the gain is classified, what other income you already have, and whether extra layers like NIIT are part of the picture.
That is why a strong capital gains guide should read like planning support, not a tax slogan. A one-day timing difference, a high-income year, or a loss-harvesting opportunity can all change the after-tax result more than many investors expect.
Formula Explained
The basic gain formula is straightforward: sale price minus cost basis equals capital gain. The harder part is the tax treatment. Short-term gains are generally taxed like ordinary income, while long-term gains usually fall into preferential federal tiers.
Then the calculator checks whether your ordinary income already uses part of those lower long-term brackets and whether NIIT should be layered on top. That combination is what turns a simple gain estimate into a more realistic after-tax planning tool.
Examples
| Scenario | Tax Treatment | Why It Matters |
|---|---|---|
| Sell before one-year holding period | Gain is usually treated as short-term | Often creates a materially higher tax cost |
| Sell after long-term holding period begins | Gain may move into 0%, 15%, or 20% long-term treatment | Useful for timing decisions when the position is flexible |
| High-income taxpayer with investment income | NIIT may apply on top of regular gain tax | Important because simple gain estimates often miss this extra layer |
Real-Life Applications
- Comparing whether to sell now or after the position becomes long-term.
- Estimating how a stock sale affects a high-income tax year.
- Reviewing after-tax proceeds before rebalancing a concentrated position.
- Planning a sale alongside loss harvesting or year-end income management.
Common Mistakes
- Ignoring the holding period and assuming every gain is taxed the same way.
- Forgetting that ordinary income can push long-term gains into higher tiers.
- Missing NIIT in high-income scenarios.
- Using a simplified basis when actual basis adjustments may apply.
Tips & Best Practices
- Run both short-term and long-term scenarios before a flexible sale decision.
- Model the gain in the context of your full-year income, not by itself.
- Check whether harvested losses or carryforwards can lower the federal result.
- Use the after-tax profit number, not only the tax number, when comparing options.
To go deeper, pair this page with the Stock Loss Tax Calculator, the Federal Income Tax Calculator, and the Tax Refund Calculator if the sale is part of a wider annual tax strategy.
Short-term versus long-term gains planning
Capital-gains planning improves dramatically once you separate holding-period decisions from sale-price decisions. Many investors focus only on gain amount, but the timing of the sale can change the tax treatment materially. A calculator makes that visible. It helps you test whether waiting longer for long-term treatment changes the after-tax outcome enough to justify the additional market exposure and timing risk.
This does not mean the lowest tax option is always the best decision. Sometimes risk control, diversification, or liquidity needs matter more than waiting for a lower rate. The point of the calculator is to quantify the tradeoff so you are not making that judgment blindly. Once the after-tax numbers are clear, strategy becomes easier to discuss and defend.
Cost basis, offsets, and realistic after-tax comparisons
Cost basis is one of the most important inputs in any gains calculation. If basis is wrong, the rest of the output becomes unreliable. The same is true for offsets such as harvested losses or carryforwards. Strong use of this tool means confirming basis records, then comparing the gain estimate against your broader tax picture rather than treating it as an isolated number detached from the rest of the return.
For planning, it is often helpful to compare at least three sale scenarios: sell now, sell after a holding period change, and sell with partial loss offsets. That type of scenario work turns the calculator from a curiosity into a decision support tool. Instead of asking only how much tax applies, you can ask which sale path produces the strongest after-tax outcome for the overall portfolio plan.
Keep the research moving with Paycheck Calculator, Net Pay Calculator, Net Salary Calculator, and UK Salary Calculator.
Frequently Asked Questions
Related Calculators
Paycheck Calculator
Estimate paycheck deductions and net pay by frequency and state.
Use Paycheck CalculatorNet Pay Calculator
Estimate take-home pay after tax rate, optional deductions, and bonus inputs.
Use Net Pay CalculatorNet Salary Calculator
Estimate monthly or yearly take-home salary after tax and payroll deduction inputs.
Use Net Salary CalculatorUK Salary Calculator
Estimate 2026/27 UK take-home salary with PAYE, National Insurance, pension, student loan, and bonus inputs.
Use UK Salary CalculatorRelated Guides

Form 1040 Deadline 2026
Use this for the April 15 Form 1040 filing and payment deadline, October 15 extension date, late-filing cleanup, and 1040-specific checklist.
Read guide
Form 4868 Deadline 2026
Use this for individual tax extension timing, the April 15 Form 4868 request deadline, October 15 extended filing date, payment estimates, online extension methods, and proof of filing.
Read guide
Form 7004 Extension Deadline 2026
Use this for business extension due dates, March 16 and April 15 Form 7004 deadlines, September 15 and October 15 extended filing dates, e-file rules, and no-extension-to-pay cleanup.
Read guide
Form 2553 Deadline 2026
Use this for S corporation election timing, the March 16 calendar-year deadline, 2 months and 15 days rule, shareholder consent, LLC S elections, late-election relief, and Form 1120-S follow-through.
Read guideSources & References
- 1.IRS - Capital Gains and Losses (Topic No. 409)(Accessed February 2026)
- 2.IRS - Net Investment Income Tax(Accessed February 2026)
- 3.IRS Rev. Proc. 2025-32 (2026 inflation-adjusted §1(h) amounts)(Accessed February 2026)
- 4.IRS Publication 550 - Investment Income and Expenses(Accessed February 2026)