DukoTools

Capital Gains Tax Calculator

NewPopular

Calculate short- and long-term capital gains tax including the 3.8% NIIT.

Free Forever
No Signup Required
No Files Stored
Tax Year: 2026

Capital Gain

15,000.00

Total Tax

2,250.00

Effective Rate on Gain

15.00%

RateGain in BandTax for Band
15%15,000.002,250.00

Federal tax only. State capital gains tax, the primary-residence exclusion, collectibles rates, and depreciation recapture are not modelled.

Embed this tool

Add this tool to your website or blog with a single iframe snippet.

<iframe src="https://dukotools.com/tools/capital-gains-tax-calculator?embed=1" width="100%" height="600" frameborder="0" allow="clipboard-write" loading="lazy" title="capital-gains-tax-calculator tool"></iframe>

About Capital Gains Tax Calculator

Capital Gains Tax Calculator works out federal tax on an investment sale and shows why holding period matters so much. Short-term gains on assets held a year or less are ordinary income, so the tool stacks the gain on top of your other income and charges the difference in bracket tax. Long-term gains get their own 0%, 15% and 20% rate bands, and crucially those bands are measured on your total stacked income β€” so the same gain can straddle two rates, which flat-rate calculators miss entirely. The 3.8% Net Investment Income Tax is added automatically when modified income crosses the statutory threshold, a step most simple tools skip. A band-by-band table shows exactly how much of the gain sits in each rate, and a capital loss is recognised and flagged rather than silently treated as zero.

Key Features

  • Correct Long-Term Stacking

    Long-term gains are layered on top of ordinary income so the 0/15/20% bands apply where they really fall. A gain can legitimately span two rates.

  • Short-Term Marginal Calculation

    Short-term gains are taxed by computing bracket tax with and without the gain. That difference is the true marginal cost, not an assumed top rate.

  • Net Investment Income Tax

    Adds the 3.8% NIIT on gains above the statutory income threshold. The threshold is fixed by statute and never indexed for inflation.

  • Band-by-Band Breakdown

    Table shows how much of the gain falls in each rate band and the tax for each. Makes the marginal effect of a slightly larger sale obvious.

  • Capital Loss Detection

    A sale below cost basis is reported as a loss with the amount, rather than rounding to zero tax with no explanation.

  • Net Proceeds Figure

    Shows what you actually keep after tax, not just the tax owed. That is the number that matters when deciding whether to sell.

How to Use

  1. 1

    Enter purchase and sale price

    Use your cost basis including commissions for the purchase price, and net sale proceeds for the sale price.

  2. 2

    Choose the holding period

    More than one year is long-term and gets preferential rates. One year or less is short-term and taxed as ordinary income.

  3. 3

    Enter your other income

    This decides which rate band the gain lands in, so an accurate figure matters more than most people expect.

  4. 4

    Select your filing status

    Rate bands and the NIIT threshold both vary by filing status.

  5. 5

    Review the band table

    See exactly how much of the gain is taxed at each rate, plus any NIIT charged on top.

Real-World Use Cases

Stock Sale Decision

An investor holding shares for eleven months compares the tax on selling now versus waiting a month for long-term treatment.

Tax-Gain Harvesting

Someone in a low-income year checks how much long-term gain they can realise while staying inside the 0% band.

Crypto Position Exit

A trader with a large short-term position estimates the marginal tax cost before closing it, and models the NIIT that pushes them over the threshold.

Frequently Asked Questions

Related Free Tools