Capital Gains Tax Calculator 2026
Estimate tax on investment gains, including short-term/long-term treatment and NIIT exposure.
Last Updated: June 2026
Used to estimate whether your gain falls in the 0%, 15%, or 20% long-term bracket and whether NIIT applies.
Important Disclaimer
This calculator provides an educational estimate for planning and comparison only. It is not tax, legal, financial, medical, lending, insurance, payroll, compliance, or institutional advice and it is not an official determination. Rules, rates, eligibility, formulas, and source data can change or depend on facts not captured here. Verify the result against official sources and qualified professional guidance before filing, paying, diagnosing, borrowing, investing, hiring, or making a compliance-sensitive decision.
Professional Review Status
This YMYL page has internal methodology review, but no external credentialed professional review is recorded yet.
- Reliance status
- Credentialed tax review required before professional reliance
- Required credentials
- CPA, Enrolled Agent, licensed tax professional
- Review scope
- tax formulas, jurisdiction assumptions, withholding language, filing-sensitive examples, and compliance caveats
Current reviewer: Iliyas Khan, Internal tax and sales-tax methodology reviewer.
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.
Tax credentialed review: professional reliance limit
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. Results should be treated as a preliminary estimate, not a filing instruction, diagnosis, product recommendation, eligibility decision, or compliance sign-off. Required professional review: CPA, Enrolled Agent, licensed tax professional. Source expectation: Review should cite current IRS, state revenue department, payroll-tax, or official tax authority sources where applicable.
Checked by Iliyas Khan
Capital Gains Tax Calculator 2026 is checked for formula labels, source links, and result limits.
Iliyas Khan, Chief Operating Officer. Updated June 2026. Scope: tax 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.
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.
Capital gains model assumptions
This calculator is an investment-sale planning worksheet, not a replacement for Form 8949, Schedule D, broker reporting, or lot-level tax software.
- Tax year model
- 2026 federal planning estimate
- The calculator uses federal filing status, ordinary income, sale proceeds, cost basis, holding period, and NIIT exposure.
- Primary federal forms
- Form 8949 and Schedule D
- Broker forms, wash sales, basis adjustments, and capital loss carryovers can change the final return.
- Best use case
- Before-sale and after-sale tax scenario planning
- Run separate estimates for each lot when basis, holding period, or loss harvesting differs.
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.
Investment sale planning matrix
Use this matrix to decide which input or related calculator should be reviewed before a sale.
| Planning factor | Calculator treatment | Review before relying on it |
|---|---|---|
| Cost basis | Purchase price plus basis adjustments | Add commissions, reinvested dividends, improvements, crypto fees, or other allowed basis adjustments before relying on the result. |
| Sale proceeds | Amount realized after selling costs | Use net proceeds when broker fees or transaction costs reduce the amount realized. |
| Holding period | Short-term or long-term | Assets held more than one year may use long-term capital gains rates; one year or less is short-term. |
| Income stacking | Ordinary income plus gain | Ordinary income can move long-term gain into 0%, 15%, or 20% brackets and can trigger NIIT. |
| Losses/carryovers | Not fully modeled here | Use the stock loss calculator for capital loss carryovers, wash-sale issues, and annual ordinary-income loss limits. |
Basis, proceeds, and holding-period audit
The widget uses purchase price as a simplified cost basis and sale price as proceeds, but real Form 8949 reporting often needs a lot-level audit. Broker commissions, reinvested dividends, return of capital, wash-sale adjustments, crypto gas fees, inherited basis, gifts, employee stock compensation, and corporate actions can all change basis before the tax rate is even considered.
Holding period also deserves a separate check. The one-year line determines whether the sale is modeled as short-term or long-term, but official classification depends on acquisition and disposition dates, transaction type, and IRS holding-period rules. Use the calculator to compare scenarios before selling, then confirm the final lot details against broker records.
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 June 2026)
- 2.IRS - Net Investment Income Tax(Accessed June 2026)
- 3.IRS Rev. Proc. 2025-32 (2026 inflation-adjusted §1(h) amounts)(Accessed June 2026)
- 4.IRS Publication 550 - Investment Income and Expenses(Accessed June 2026)
- 5.IRS - About Form 8949, Sales and Other Dispositions of Capital Assets(Accessed June 2026)