Skip to content

Capital gains tax calculator

US tax on a sale of stock or property.

$
$
$

Enter a loss as a negative number, for example -5000.

Deduction and investment income
$
$

Extra federal tax caused by the sale

$0

Tax on long-term gain
–
Tax on short-term gain
–
Investment income tax (3.8%)
–
Share of the gain paid as tax
–
    Your taxable income as a shelf, and where the 0% and 15% rates end

    Federal tax for 2026 only, no state tax. For information only, not tax or investment advice.

    Built and maintained by Sam Jakola, editor · Sources and how we check · Corrections · Last reviewed

    Long-term capital gains rates for 2026

    A capital gain is the profit when you sell an asset such as stock, a fund or a rental property for more than it cost. If you held it more than one year the gain is long-term and, in this capital gains tax calculator, taxed at 0%, 15% or 20% depending on your total taxable income. The breakpoints below come from IRS Revenue Procedure 2025-32 for 2026.

    2026 long-term capital gains rate thresholds (taxable income)
    Filing status0% up to15% up to
    Single $49,450 $545,500
    Married filing jointly (and surviving spouse) $98,900 $613,700
    Married filing separately $49,450 $306,850
    Head of household $66,200 $579,600

    Source: IRS Rev. Proc. 2025-32, section 4.03. 20% applies above the 15% limit.

    The thresholds apply to taxable income, which is income after deductions, and the gain sits on top of your other income. A single filer with $43,900 of taxable income from wages has $5,550 of room before the 0% limit. Gain inside that room is untaxed; the rest is taxed at 15%.

    Short-term gains

    Assets held one year or less produce short-term gains, taxed as ordinary income at your bracket, from 10% to 37%. The holding period starts the day after you buy and ends on the day you sell, so selling one day too early can change the rate. The calculator adds short-term gains to your ordinary income before looking up the bracket.

    $20,000 gain on top of $60,000 of income, single, 2026
    Gain heldExtra taxShare of the gain
    Over 1 year (long-term) $2,167.50 10.8%
    1 year or less (short-term) $3,753.00 18.8%

    Source: calculated with this page.

    How the rates stack: an example

    Worked example · single, $500,000 other income, $100,000 long-term gain
    1. Taxable income: 500,000 + 100,000 − 16,100 standard deduction = $583,900.
    2. Ordinary part, with the gain taken off the top: $483,900.
    3. Room until the 15% limit of $545,500: $61,600 of the gain at 15%, the other $38,400 at 20%.
    4. Tax on the gain: $9,240 + $7,680 = $16,920.
    5. Net investment income tax: 3.8% of the smaller of $100,000 and ($600,000 − $200,000) = $3,800.

    This is the method of the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions: figure the ordinary tax first, then fill the 0%, 15% and 20% bands from the bottom with the gain. Salary changes can move a gain from one band to another. See what a raise does to your bracket in the US income tax calculator.

    Losses and the $3,000 limit

    Losses are netted before tax: short-term gains and losses together, long-term gains and losses together, then the two results against each other. A net loss can be deducted against ordinary income up to $3,000 a year ($1,500 for married filing separately); anything more carries forward to later years. The calculator performs the netting and shows the deduction and the carryforward.

    Netting examples
    Short-termLong-termResult
    +$5,000 -$8,000 Net loss $3,000: deducted
    -$2,000 +$10,000 $8,000 long-term gain
    +$10,000 -$2,000 $8,000 taxed as ordinary income
    $0 -$10,000 $3,000 deducted, $7,000 carried forward

    Source: IRS Topic 409 and Schedule D instructions.

    Losses on personal-use property, such as a car or your home, are not deductible. Our percentage calculator helps work out the percentage return behind a gain.

    The 3.8% investment income tax

    The net investment income tax (NIIT) adds 3.8% on the smaller of your net investment income or the amount your modified AGI exceeds a threshold that is not indexed for inflation. Gains, interest, dividends and rents count; wages do not.

    NIIT thresholds (modified AGI)
    Filing statusThreshold
    Married filing jointly $250,000
    Married filing separately $125,000
    Single or head of household $200,000

    Source: IRS Topic 559 and Form 8960.

    Home sales, collectibles and other special cases

    • Selling your main home: you can exclude up to $250,000 of gain, or $500,000 on a joint return, if you owned and lived in the home for at least 24 months of the 5 years before the sale. Enter only the gain above the exclusion in this calculator.
    • Collectibles such as coins, art and metal are taxed at up to 28%, not 15% or 20%. This calculator does not model the 28% rate, so leave collectible gains out and add 28% of them yourself.
    • Unrecaptured section 1250 gain on depreciated real estate is taxed at up to 25%; it is not modeled.
    • Qualified small business stock can be taxed at up to 28% on the taxable part of the gain.
    • Qualified dividends use the same 0/15/20 rates; enter them with your long-term gain.

    What this calculator leaves out

    • State and local tax on gains, which many states tax as ordinary income.
    • Cost basis. Enter the gain itself: the sale price minus basis, fees and improvements.
    • Wash sale rules, which defer a loss if you buy the same asset within 30 days.
    • The 28% and 25% rate groups described above, and the alternative minimum tax.
    • Your other income is used as given: it is treated as adjusted gross income, so adjustments like an IRA deduction must be taken off first.

    Gains, rates and income are worked out on your device and are not sent to a server. The site counts page views.

    Common questions

    What is the capital gains tax rate in 2026?

    Long-term gains are taxed at 0%, 15% or 20% depending on taxable income; short-term gains are taxed at ordinary rates of 10% to 37%. A 3.8% investment income tax can apply above $200,000 ($250,000 joint) of income.

    Do I pay capital gains tax if I reinvest?

    Yes. Selling is the taxable event, whatever you do with the proceeds. Reinvesting inside a retirement account does not change the tax on the sale itself.

    Does a gain push all my income into a higher bracket?

    No. The gain is stacked on top, and only the slice above each threshold is taxed at the higher rate. A long-term gain can lift your total taxable income past the 0% limit, but only the part above it is taxed.

    How does tax change the growth of an investment?

    Over many years, the tax paid on growth reduces what compounds. The compound interest calculator shows growth before tax so you can compare.

    Sources

    Tax year 2026. Last reviewed November 11, 2026. This calculator is for information only and is not tax or investment advice.