2026 U.S. federal estimate

See the tax before you sell.

Estimate federal capital gains tax, the 3.8% Net Investment Income Tax, an optional state-rate scenario and your net proceeds. Then compare selling today with waiting until the gain qualifies as long term.

Your sale scenario

Enter taxable income before this sale. Use adjusted basis: purchase price plus eligible acquisition costs and adjustments.

After deductions, before this capital gain.
Used only for the NIIT estimate.
Usually purchase price plus eligible acquisition costs and later adjustments.
Gross amount received before subtracting selling costs.
Broker commissions or eligible transaction costs.
Simplified direct offset; wash-sale and carryover rules need review.
User-entered scenario only; no state rule is implied.

Capital gains tax calculator guide

Use this guide to understand what to enter, how the estimate is calculated and why the result may differ from simply multiplying your gain by one tax rate.

How to use the calculator

You can get a useful estimate in three steps. Use values for the same tax year and enter income before adding the sale modeled here.

Describe your tax situation

Select filing status, holding period and tax year. Enter taxable income and modified adjusted gross income before this sale.

Enter the transaction

Add gross sale proceeds, adjusted cost basis, selling costs and any capital losses you want to model as a simplified offset.

Read the full result

Review federal tax, NIIT, optional state tax, net proceeds, effective rate and the short-term versus long-term comparison.

How capital gains tax is calculated

A capital gain starts with the economic profit on the sale—not the full sale price. The calculator estimates that profit with this simplified formula:

Taxable modeled gain = sale proceeds − selling costs − adjusted basis − entered loss offset

If held one year or less

The modeled gain is treated as short term. The calculator measures the additional federal ordinary-income tax created when the gain is stacked above your taxable income.

If held more than one year

The modeled gain is treated as long term. It is stacked above your taxable income and allocated across the preferential 0%, 15% and 20% bands.

Important: being “in the 15% capital gains bracket” does not necessarily mean every dollar of your gain is taxed at 15%. Part can fall in the 0% band, another part in the 15% band and—at high income—another part in the 20% band.

Worked capital gains tax example

Assume a single filer in 2026 has $85,000 of taxable income before selling a long-term investment. The asset sells for $65,000, its adjusted basis is $30,000 and selling costs are $250.

Sale proceeds$65,000
Less selling costs$250
Less adjusted basis$30,000
Modeled gain$34,750

The $34,750 gain stacks on top of $85,000 of taxable income. In this example it falls in the 15% long-term band, producing an estimated $5,213 federal capital gains tax after rounding. With no NIIT or state-rate input, estimated net sale proceeds are $59,538. The same gain modeled as short term produces a higher federal estimate because ordinary-income rates apply.

What the result helps you evaluate

Progressive bracket stacking

See exactly how much long-term gain lands in the 0%, 15% and 20% federal bands instead of assuming one flat rate.

Possible 3.8% NIIT

The estimate shows NIIT separately using the lesser of modeled net investment income or MAGI above the statutory threshold.

Timing and net proceeds

Compare federal short- and long-term treatment, then see an estimate of cash remaining after selling costs and modeled taxes.

2026 long-term capital gains tax rates

For most long-term gains, the federal rate depends on filing status and where the gain sits after being added above other taxable income.

Filing status0% band ends15% band endsRate above that
Single$49,450$545,50020%
Married filing jointly$98,900$613,70020%
Married filing separately$49,450$306,85020%
Head of household$66,200$579,60020%

Source: IRS Revenue Procedure 2025-32, published in Internal Revenue Bulletin 2025-45. Select 2025 in the calculator to use the prior-year thresholds. Short-term gains use ordinary-income brackets.

Short-term vs. long-term capital gains

Short-term capital gain

  • Generally applies when an asset is held for one year or less.
  • Usually taxed at federal ordinary-income rates.
  • Can create a higher marginal tax estimate than a comparable long-term gain.

Long-term capital gain

  • Generally applies when an asset is held for more than one year.
  • Most qualifying gains use the 0%, 15% or 20% federal bands.
  • Special assets and rules can use different rates or treatment.

Timing is only one factor. Market risk, liquidity needs, portfolio concentration, future income, loss harvesting and changing tax law can matter more than the estimated tax difference. A lower tax estimate does not automatically make waiting the better financial decision.

How the 3.8% Net Investment Income Tax works

The Net Investment Income Tax can apply in addition to regular capital gains tax. For many individual filers, the calculator models NIIT as 3.8% of the lesser of:

The statutory thresholds used here are $200,000 for single and head-of-household filers, $250,000 for married filing jointly and $125,000 for married filing separately. NIIT rules can be more complex when several types of investment income, deductions, trusts, estates or business interests are involved.

Capital gains calculator definitions

Adjusted cost basis
The asset’s original cost, generally adjusted for eligible acquisition costs, improvements, splits, return of capital, depreciation or other tax events.
Sale proceeds
The gross amount received from the sale before the calculator subtracts entered selling costs.
Taxable income
Income after deductions used to position the modeled gain within federal tax brackets.
Modified adjusted gross income
An income measure used here to estimate whether the 3.8% NIIT threshold may be exceeded.
Capital loss offset
A simplified amount entered to reduce the modeled gain. Actual federal netting, carryover and wash-sale rules are more detailed.
Effective tax rate
Total modeled federal, NIIT and optional state tax divided by the modeled taxable gain.

Method, assumptions and limits

The calculator first computes gain as proceeds minus selling costs, adjusted basis and the entered loss offset. It then applies either incremental ordinary-income tax or long-term bracket stacking. NIIT is calculated separately, and an optional user-entered state percentage is applied directly to the modeled gain.

Educational estimate, not tax advice. This tool does not model collectibles, qualified small-business stock, depreciation recapture, Section 1256 contracts, principal-residence exclusions, installment sales, cryptocurrency lot identification, wash sales, every federal loss-netting sequence, AMT, foreign tax, trusts and estates, or jurisdiction-specific state rules. Confirm a real transaction with a qualified tax professional.

Capital gains tax calculator FAQs

How do I calculate a capital gain?

Start with sale proceeds, subtract eligible selling costs and then subtract adjusted basis. The calculator also lets you enter a simplified capital-loss offset. Basis can require adjustments for fees, splits, return of capital, improvements, depreciation and other events.

Do I pay one rate on the whole long-term gain?

Not necessarily. Long-term gains stack above other taxable income, so one gain can span the 0%, 15% and 20% bands. The result breakdown shows the amount allocated to each band.

When does a capital gain become long term?

For many investments, long-term treatment generally requires holding the asset for more than one year. Special holding-period rules can apply, so verify the dates and asset type.

What is the 3.8% NIIT?

For many individuals, NIIT applies to the lesser of net investment income or modified AGI above the applicable statutory threshold. This tax is separate from regular capital gains tax.

Can capital losses reduce the estimate?

Yes. The tool provides a simplified direct offset, but actual federal short-term and long-term netting, loss carryovers and wash-sale rules require a more detailed calculation.

Does the calculator include state capital gains tax?

It does not infer a state or local rule. You may enter an optional percentage for scenario planning, but you should verify how your jurisdiction treats the gain.

Why might my tax return show a different result?

Your return may include other gains and losses, deductions, credits, special asset rates, depreciation recapture, AMT, state rules or income adjustments that this focused estimator does not model.

Primary IRS sources

The calculator’s federal thresholds and explanations are grounded in these IRS materials. Always use current official instructions when preparing a return.