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 founder-led 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

Jitendra Kumar, Founder & Editorial Standards Lead, oversees methodology standards and trust-sensitive publishing decisions.

Review editor profile

Topic Ownership

Sales tax and tax-sensitive estimate tools, Education and GPA planning calculators, Health, protein, and screening-formula pages, Platform-wide publishing standards and methodology

See ownership standards

Methodology & Updates

Page updated February 2026. Trust-critical pages are reviewed when official rates or rules change. Evergreen calculator guides are checked on a recurring quarterly or annual cycle depending on topic volatility.

How This Calculator Works

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.

What You Need to Know

Why holding period is the biggest lever

For many investors, crossing from short-term to long-term treatment is the single most important tax lever. Short-term gains can be taxed at materially higher rates than long- term gains. A small timing change can create a noticeable difference in after-tax return.

That does not mean you should always delay selling. Portfolio risk, concentration, and cash-flow needs can justify immediate action. The goal is to understand tax cost clearly before deciding.

NIIT and high-income planning

High-income taxpayers may face NIIT on top of regular capital gains tax. NIIT is often overlooked in simple gain calculators, which can understate final liability. If your income is near threshold levels, modeling NIIT explicitly is important.

Coordinating salary timing, bonus expectations, and investment sale timing can sometimes reduce overlap in peak-income years.

Loss harvesting and offset strategy

Tax-loss harvesting can offset gains and improve after-tax outcomes, but rules such as wash-sale restrictions require careful execution. Good records and transaction-level tracking are essential.

A practical process is to estimate potential gains first, then evaluate whether realized losses or carryforwards can soften tax impact before year-end.

Planning beyond federal tax

State tax treatment varies widely. Some states tax gains as ordinary income, while others have no broad income tax. If you are considering relocation or large one-time sales, multi-state planning can materially change net proceeds.

Use this federal estimate as step one, then layer in state-specific tax analysis before final decision-making.

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.

Frequently Asked Questions

Short-term gains (held one year or less) are generally taxed at ordinary income-tax rates. Long-term gains usually receive preferential 0%, 15%, or 20% federal rates.

NIIT is the 3.8% Net Investment Income Tax that can apply when modified adjusted gross income exceeds statutory thresholds.

Yes. Your ordinary income can use up lower long-term gain brackets, pushing part of your gain into a higher long-term rate tier.

This page focuses on federal capital gains tax and NIIT. State capital gains treatment can differ and should be modeled separately.

Yes, investment losses can offset gains and in some cases offset a limited amount of ordinary income subject to IRS rules.

This simplified model uses purchase price as cost basis. Actual basis may include adjustments such as commissions, wash sales, and corporate actions.

Holding-period classification in this tool is a user input for planning. Official determination depends on IRS holding-period rules and transaction dates.

Use it for scenario planning only. Confirm final numbers through tax software, broker forms, and a qualified professional if needed.

Related Calculators

Financial

Paycheck Calculator

Estimate paycheck deductions and net pay by frequency and state.

Use Paycheck Calculator
Financial

Net Pay Calculator

Estimate take-home pay after tax rate, optional deductions, and bonus inputs.

Use Net Pay Calculator
Financial

Net Salary Calculator

Estimate monthly or yearly take-home salary after tax and payroll deduction inputs.

Use Net Salary Calculator
Financial

Payroll Calculator

Estimate employee take-home pay and employer payroll cost with dual-view results.

Use Payroll Calculator
Financial

Payroll Deductions Calculator

Estimate salary deductions and net pay with payroll tax and contribution inputs.

Use Payroll Deductions Calculator
Financial

Salary Deduction Calculator

Estimate salary deductions and remaining take-home pay with tax and contribution inputs.

Use Salary Deduction Calculator
Financial

Salary Tax Breakdown Tool

Break down salary taxes into federal, state, payroll contributions, and net take-home pay.

Use Salary Tax Breakdown Tool
Financial

Payslip Calculator

Generate printable payslips with salary, deduction, and net-pay breakdown.

Use Payslip Calculator
Financial

UN Salary Calculator

Estimate UN compensation by category, grade, step, duty station, post adjustment, and allowances.

Use UN Salary Calculator
Financial

Calculadora IRPF

Estimate Spain payroll withholding, IRPF, Seguridad Social, sueldo neto, and 12 vs 14 pagas.

Use Calculadora IRPF
Tax

South Carolina Income Tax Calculator

Estimate South Carolina state tax with bracket-level detail.

Use South Carolina Income Tax Calculator
Financial

Compound Interest Calculator

Project investment growth with recurring monthly contributions.

Use Compound Interest Calculator
Financial

CAGR Calculator

Calculate compound annual growth rate, reverse growth scenarios, and benchmark annualized returns.

Use CAGR Calculator
Financial

Inflation Calculator

Translate historical dollar values with CPI data and model future purchasing-power erosion.

Use Inflation Calculator
Financial

Net Worth Calculator

Calculate personal net worth with categorized assets, liabilities, charts, and balance-sheet insights.

Use Net Worth Calculator
Financial

Debt Payoff Calculator

Compare snowball and avalanche, project a debt-free timeline, and inspect monthly interest and payoff milestones.

Use Debt Payoff Calculator
Financial

Rent vs. Buy Calculator

Compare renting and buying with opportunity cost, equity growth, transaction costs, and break-even analysis.

Use Rent vs. Buy Calculator
Financial

CD (Certificate of Deposit) Calculator

Calculate CD maturity value, early withdrawal penalties, ladder strategy, and savings-product comparisons.

Use CD (Certificate of Deposit) Calculator
Financial

401(k) / Retirement Calculator

Project retirement savings with employer match, vesting, inflation-adjusted income, and Roth-vs-Traditional comparisons.

Use 401(k) / Retirement Calculator
Financial

Depreciation Calculator

Calculate straight-line, DDB, SYD, and MACRS depreciation with schedules, charts, and current-law Section 179 or bonus-depreciation simulation.

Use Depreciation Calculator
Financial

Markup / Profit Margin Calculator

Calculate markup, profit margin, selling price, discount impact, checkout totals, and bulk pricing scenarios in one business-focused workflow.

Use Markup / Profit Margin Calculator
Financial

Discount Calculator

Calculate percent off, reverse discount, stacked discounts, tax after discount, and bulk comparison scenarios in one shopping-friendly workflow.

Use Discount Calculator
Financial

Mortgage Calculator

Estimate monthly mortgage payments and long-term loan costs.

Use Mortgage Calculator
Financial

Auto Loan Calculator

Estimate monthly car payment, total interest, taxes, fees, and buy-vs-lease tradeoffs.

Use Auto Loan Calculator
Financial

Loan Amortization Calculator

Generate a full loan payoff schedule with principal, interest, extra-payment impact, and early-payoff projections.

Use Loan Amortization Calculator
Tax

Self Employment Tax Calculator

Calculate self-employment tax, federal tax, and quarterly estimates.

Use Self Employment Tax Calculator
Health

BMI Calculator

Calculate BMI category and a healthy weight range estimate.

Use BMI Calculator
Health

Ideal Weight Calculator

Compare multiple ideal body weight formulas with BMI cross-reference and frame-size adjustment.

Use Ideal Weight Calculator
Health

Calorie Calculator

Estimate daily calories, goal targets, and macro ranges.

Use Calorie Calculator
Health

Protein Calculator

Calculate daily protein targets by activity, goal, and meal distribution.

Use Protein Calculator
Health

Protein by Body Weight Calculator

Compare four body-weight protein formulas in g/kg and g/lb with lean-mass and meal-planning guidance.

Use Protein by Body Weight Calculator
Health

Female-Specific Protein Calculator

Women-focused protein planning with cycle-aware notes, pregnancy/lactation context, life-stage support, and iron-rich food guidance.

Use Female-Specific Protein Calculator
Health

Vegan / Vegetarian Protein Calculator

Plant-based protein planner with amino-acid adequacy scoring, allergy-aware food filtering, and practical meal guidance.

Use Vegan / Vegetarian Protein Calculator
Health

Muscle Gain Protein Calculator

Estimate hypertrophy-focused protein targets with meal splits, calorie context, and method comparisons.

Use Muscle Gain Protein Calculator
Health

Weight Loss Protein Calculator

Estimate cutting protein targets, deficit pace, lean-mass-preservation score, and check-in planning.

Use Weight Loss Protein Calculator
Health

Post-Workout Protein Calculator

Estimate post-workout protein needs, timing windows, carb ratios, and practical recovery meal strategy.

Use Post-Workout Protein Calculator
Health

Athlete / Sports Protein Calculator

Estimate sport-specific athlete protein ranges with phase periodization, competition strategy, and recovery planning.

Use Athlete / Sports Protein Calculator
Health

PSMF (Protein-Sparing Modified Fast) Calculator

Plan lean-mass-based protein, very-low-calorie ranges, duration limits, and safety alerts for short-term PSMF phases.

Use PSMF (Protein-Sparing Modified Fast) Calculator
Health

Meal Prep Protein Distribution Calculator

Plan daily and weekly protein distribution with meal strategy modes, workout timing, and printable prep scheduling.

Use Meal Prep Protein Distribution Calculator
Health

Senior / Elderly Protein Calculator

Estimate age-aware protein needs, per-meal distribution, leucine threshold coverage, and safety-focused condition adjustments.

Use Senior / Elderly Protein Calculator
Health

Pregnancy & Breastfeeding Protein Calculator

Estimate trimester and lactation protein needs with maternal food-safety guidance and consultation reminders.

Use Pregnancy & Breastfeeding Protein Calculator
Health

Body Recomposition Protein Calculator

Estimate lean-mass-based protein, recomposition calorie targets, body-fat timeline, and weekly fat-loss versus muscle-gain projections.

Use Body Recomposition Protein Calculator
Health

Bulk vs Cut Protein Calculator

Compare bulk, cut, and maintain protein targets with calorie differences, phase-transition timing, and projected body-fat trend planning.

Use Bulk vs Cut Protein Calculator
Health

Cost Per Gram Protein Analyzer

Calculate protein cost efficiency, compare foods side by side, rank affordability, and optimize daily budget protein planning.

Use Cost Per Gram Protein Analyzer
Health

Amino Acid Profile & BCAA Analyzer

Analyze amino acid profiles, BCAA/EAA totals, leucine threshold coverage, and PDCAAS/DIAAS quality differences across protein sources.

Use Amino Acid Profile & BCAA Analyzer
Health

Macro Ratio Calculator

Convert calories into protein, carb, and fat grams with presets, meal splits, and saved-plan comparison.

Use Macro Ratio Calculator
Health

Calorie to Macro Percentage Calculator

Convert calories to protein, carbs, and fat in grams or percentages with preset comparison and meal-level planning.

Use Calorie to Macro Percentage Calculator
Health

Diet Comparison Tool (High Protein vs Standard)

Compare two diet strategies side by side with macro differences, protein adequacy scoring, and goal-fit recommendation logic.

Use Diet Comparison Tool (High Protein vs Standard)
Health

Recovery & Injury Protein Calculator

Estimate injury-stage protein requirements, safety-aware recovery ranges, and practical healing nutrition guidance.

Use Recovery & Injury Protein Calculator
Health

Food Label Nutrition Inspector

Analyze nutrition labels for macro contribution, protein quality, additive signals, and multi-food daily intake tracking.

Use Food Label Nutrition Inspector
Health

TDEE & Macro Calculator

Estimate BMR, TDEE, calorie targets, and protein-carb-fat macro grams.

Use TDEE & Macro Calculator
Health

Body Fat Calculator

Estimate body-fat percentage, fat mass, and lean mass from measurements.

Use Body Fat Calculator
Health

BMR Calculator

Estimate basal metabolic rate, maintenance calories, and daily targets.

Use BMR Calculator
Health

Bra & Bust Size + Fit Calculator

Estimate bra size, convert regional sizing, and troubleshoot common fit problems.

Use Bra & Bust Size + Fit Calculator
Statistics

Sample Size & Statistical Power Suite

Estimate sample size, achieved power, and adjusted recruitment across common study designs.

Use Sample Size & Statistical Power Suite
Engineering

Electrical Cable/Wire Size and Voltage Drop Calculator

Estimate conductor size, voltage drop, and approximate ampacity checks for AC/DC cable runs.

Use Electrical Cable/Wire Size and Voltage Drop Calculator
Engineering

Conduit and Wire Fill Calculator

Estimate conduit fill percentage, minimum conduit size, and educational derating implications for raceway planning.

Use Conduit and Wire Fill Calculator
Engineering

Duct Size / Ductulator and CFM Calculator

Estimate HVAC duct size, velocity, pressure-drop behavior, and round/rectangular conversion options.

Use Duct Size / Ductulator and CFM Calculator
Engineering

Pipe / Tank Volume and Dimensions Calculator

Calculate total and partial volume for tanks, pipes, and pools with missing-dimension solving and conversion tables.

Use Pipe / Tank Volume and Dimensions Calculator
Measurement

Room / Plot / Lot Area & Size Calculator

Calculate room and lot area, perimeter, volume, and cross-unit land conversions using shape-based inputs.

Use Room / Plot / Lot Area & Size Calculator
Math

Pythagorean Theorem Calculator

Solve right triangles by finding a, b, or c with step-by-step formulas, a live diagram, and exact-radical support.

Use Pythagorean Theorem Calculator
Automotive

Tire Size, Gear Ratio & Speed/Odometer Calculator

Compare stock/new tire dimensions, speedometer error, and effective gearing or RPM changes with fitment context.

Use Tire Size, Gear Ratio & Speed/Odometer Calculator
Tax

Tax Refund Calculator 2026

Project how withholding, payments, and credits affect your year-end federal settlement.

Use Tax Refund Calculator 2026

Related Guides

Sources & References

  1. 1.IRS - Capital Gains and Losses (Topic No. 409)(Accessed February 2026)
  2. 2.IRS - Net Investment Income Tax(Accessed February 2026)
  3. 3.IRS Rev. Proc. 2025-32 (2026 inflation-adjusted §1(h) amounts)(Accessed February 2026)
  4. 4.IRS Publication 550 - Investment Income and Expenses(Accessed February 2026)