Skip to content

    Under active development. New calculators and features ship every week. Everything currently runs free while the site matures — pricing pages are a preview, checkout is not open yet.

    Calculates locally in your browser · 2025 long-term rates
    Tax / capital gains

    Capital gains tax calculator

    Long-term gains are not taxed in isolation: they stack on top of your ordinary income, so the same gain can cost 0%, 15% or 20% depending on what is underneath it. This engine splits the gain across the 2025 bands, adds the 3.8% net investment income tax where it applies, and shows the blended rate.

    HoldingLong-termFilingSingleNIITNo
    Capital gains tax
    $7,500
    15.0% of the gain, before NIIT
    Marginal gain rate
    15%
    Rate on the last dollar of gain
    Net investment income tax
    Not applicable
    MAGI below $200,000
    Total on the gain
    $7,500
    Effective 15.00%
    Gain by rate band
    Long-term gains stack on top of ordinary taxable income, so the 0% band may already be full.
    $50,000 gain
    Gain by rate band
    RateAmountTax
    15%$50,000$7,500

    Ordinary income of $60,000 is taxed separately at $8,114. State tax is not included.

    Inspect the model
    Choose a quick result view, a scaled comparison, or the complete diagnostic set.
    Tax on the gain as it grows
    The slope steps up when the gain crosses into the 15% and 20% bands.
    Tax on the gain as it grows$0$3.4k$6.7k$10.1k$13.4k$16.8k$0.00$0.00$10,000$10,000$20,000$20,000$30,000$30,000$40,000$40,000$50,000$50,000$60,000$60,000$70,000$70,000$80,000$80,000$90,000$90,000$100,000$100,000Tax
    Gain split by rate
    How much of the gain lands in each band.
    Gain split by rate$0$11.8k$23.6k$35.4k$47.2k$59.0k$50.0k15%15%Gain
    Canonical equations
    The exact relationships implemented by this engine.

    gain starts at ordinary taxable income · The 0% band is consumed by ordinary income first.

    Σ gain-in-band × rate · 0%, 15% and 20% bands for 2025.

    3.8% × min(NII, MAGI − threshold) · Threshold 200,000 single / 250,000 married.

    (gains tax + NIIT) / gain · Blended rate on the realised gain.

    finance methodology

    A clear path from inputs to results.

    A long-term capital gain is not taxed at a flat rate: it stacks on top of your ordinary income and fills the 0%, 15% and 20% bands in order. This calculator splits the gain across the 2025 bands, adds the 3.8% net investment income tax where it applies, and reports the blended rate.

    Step-by-step methodWorked exampleAssumptions explained

    How to use

    1. Choose the filing status.
    2. Enter ordinary taxable income after deductions.
    3. Enter the realised long-term gain.
    4. Add other investment income to test the NIIT threshold.

    The formula

    T=∑iτi⋅Gi+0.038⋅min⁡(NII,MAGI−threshold)T = \sum_i \tau_i \cdot G_i + 0.038 \cdot \min(NII, MAGI - \text{threshold})

    Reference: IRC §1(h) (2025 long-term rates, Rev. Proc. 2024-40); IRC §1411 (net investment income tax).

    Worked example

    $50,000 gain on top of $60,000 of ordinary taxable income

    Inputs
    • Ordinary taxable income $60,000.
    • Long-term gain $50,000.
    • Single filer, no other investment income.
    Calculation path
    1. 1

      The 0% band ends at $48,350, but ordinary income already fills it.

    2. 2

      The entire $50,000 gain therefore sits in the 15% band.

    3. 3

      Capital gains tax: 50,000 × 0.15 = $7,500.

    4. 4

      MAGI is $110,000, below the $200,000 NIIT threshold, so no 3.8% surtax.

    5. 5

      Effective rate on the gain: 15.0%.

    Result

    Capital gains tax $7,500 · effective 15.0% · no NIIT.

    Interpreting the result

    Timing is the lever. The same gain costs nothing if it lands while ordinary income is low enough to leave room in the 0% band, and 20% plus NIIT if it lands on top of a large income year. That is why retirees often realise gains before taking large IRA distributions, and why a sabbatical year can be an unusually cheap time to sell.

    Assumptions & limitations

    • Long-term gains only (assets held more than one year). Short-term gains are taxed as ordinary income.
    • Federal rates for 2025; state tax is excluded.
    • The NIIT applies at 3.8% on the lesser of net investment income or MAGI above $200,000 single / $250,000 married.
    • No credits, phase-outs or alternative minimum tax are modelled.

    Frequently asked questions

    Why is my gain taxed at 15% when the 0% band exists?

    The 0% band applies to the space above your ordinary taxable income. If ordinary income already exceeds the top of that band, none of the gain qualifies for 0%.

    Does selling a house count?

    Only the portion above the home-sale exclusion, and only if the property was held long enough. Primary-residence exclusions are not modelled here.

    What is the net investment income tax?

    A 3.8% surtax on investment income for taxpayers above the MAGI threshold. It sits on top of the capital gains rate, so the top combined rate is 23.8%.

    How do I keep the gain in the 0% band?

    Reduce ordinary taxable income in the same year, for example by delaying a retirement distribution or taking a lower-income year. The engine lets you test that directly.

    Methodology last reviewed 2026-10-21. Results are informational and not financial or engineering advice — see our disclaimer.