Capital Gains Tax

Recommendations

  • Holding an asset past the one-year mark before selling can significantly lower the tax rate on the gain.
  • See your overall income tax picture with the Income Tax Calculator.
  • Capital losses can offset capital gains — this calculator only models a gain, not a loss-harvesting scenario.

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

Good to Know

Long-term rates here use a single marginal bracket based on your taxable income, a simplification of how a large gain can actually stack across more than one bracket. Federal rates and thresholds only -- this does not include state capital gains taxes, the Net Investment Income Tax surtax, or capital-loss offsetting, and the bracket thresholds themselves are adjusted annually.

Disclaimer

This calculator provides estimates for informational purposes only and does not constitute financial, medical, legal, or tax advice. Always consult a qualified professional about your specific situation.

How Capital Gains Tax Is Calculated

The tax you owe on an investment gain depends heavily on how long you held the asset before selling. Assets held one year or less generate short-term gains, taxed as ordinary income; assets held more than one year generate long-term gains, taxed at lower preferential federal rates of 0%, 15%, or 20% depending on your taxable income. Enter your purchase price, sale price, holding period, and income, and this calculator estimates the tax owed under whichever treatment applies.

This is separate from your regular federal income tax — see the Income Tax Calculator for that.

The Formula

Capital Gain=Sale PricePurchase Price\text{Capital Gain} = \text{Sale Price} - \text{Purchase Price}

For a short-term gain (held 12 months or less):

Tax Owed=Capital Gain×Ordinary Rate\text{Tax Owed} = \text{Capital Gain} \times \text{Ordinary Rate}

For a long-term gain (held more than 12 months), the tax uses whichever long-term rate bracket your taxable income falls into:

Tax Owed=Capital Gain×Long-Term Rate (0%, 15%, or 20%)\text{Tax Owed} = \text{Capital Gain} \times \text{Long-Term Rate (0\%, 15\%, or 20\%)}

Worked Example

A $10,000 purchase sold for $15,000 after 18 months, with $70,000 in taxable income (single filer):

  1. Capital gain: 15,00010,000=5,00015,000 - 10,000 = 5,000.
  2. Held more than 12 months, so this is a long-term gain.
  3. $70,000 taxable income falls into the 15% long-term rate bracket for a single filer.
  4. Tax owed: 5,000×15%=7505,000 \times 15\% = 750.
  5. Net proceeds after tax: 5,000750=4,2505,000 - 750 = 4,250.

Interpreting Your Results

The “tax owed” figure is an estimate of the federal capital gains tax on this one sale, not a full tax return — you (or your tax software) will still report the actual sale on IRS Form 8949 and Schedule D when you file, where it combines with every other capital transaction for the year, any capital losses, and the rest of your income. Use this number for planning purposes: deciding whether to set cash aside for the tax bill, whether the timing of a sale is worth adjusting, or whether a large gain this year is worth discussing with a tax professional before it happens rather than after.

Key Factors to Consider

  • The Net Investment Income Tax can add an additional surtax for higher earners. Beyond the regular capital gains rate, an additional 3.8% Net Investment Income Tax can apply to investment income above certain income thresholds — this calculator doesn’t include that surtax, so a high earner’s actual tax owed can be somewhat higher than the estimate shown. Consult a tax professional if this may apply to you.
  • Tax-loss harvesting is a deliberate strategy some investors use to manage this. Selling a losing investment specifically to offset a gain elsewhere in a portfolio is a legitimate, common strategy for reducing the taxable amount of a gain — this calculator models a single isolated gain, not a full-portfolio tax strategy.
  • Special asset categories can have their own different capital gains rules. Collectibles, certain small-business stock, and real estate depreciation recapture, among others, follow different rates or rules than the standard short-term/long-term framework this calculator models — check IRS guidance for the specific asset type if it falls into one of these categories.
  • State taxes on capital gains vary enormously — some states tax gains the same as ordinary income, others not at all. This calculator covers federal tax only; your actual total tax bill also depends heavily on which state you live in and how that state treats capital gains.

Common Mistakes

  • Selling just before the one-year mark. Selling an asset at 11 months instead of waiting one more month to cross into long-term treatment can mean paying a substantially higher tax rate on the same gain.
  • Forgetting state taxes. This calculator covers federal capital gains tax only — many states also tax capital gains, often at the same rate as ordinary income.
  • Ignoring capital losses. Losses elsewhere in a portfolio can offset gains, reducing the actual tax owed below a simple gain-times-rate estimate.

Useful to Know

A large capital gain realized mid-year can trigger a quarterly estimated tax payment requirement, not just a bigger bill at filing time. The U.S. tax system is pay-as-you-go — if the tax withheld from your paycheck and any estimated payments you’ve made fall short of what you owe by enough, the IRS can charge an underpayment penalty even if you pay the full balance by the April filing deadline. Selling an investment for a large gain is one of the more common ways this catches people by surprise, since there’s no automatic withholding on a stock or property sale the way there is on a paycheck.

Source: IRS Tax Topic 409 — Capital Gains and Losses. Source: IRS Tax Topic 306 — Penalty for Underpayment of Estimated Tax.

Frequently Asked Questions

What's the difference between short-term and long-term capital gains?

Short-term gains (assets held one year or less) are taxed as ordinary income, at your regular marginal tax rate. Long-term gains (held more than one year) qualify for lower preferential rates of 0%, 15%, or 20% depending on your taxable income — the exact reason many investors deliberately hold an asset past the one-year mark before selling.

How is my long-term capital gains rate determined?

Your long-term rate depends on your taxable income and filing status, not on the size of the gain itself. This calculator uses your entered taxable income to find the applicable bracket — a simplification, since a very large gain can technically push part of itself into a higher bracket.

Does this account for capital losses?

No — this calculator models a single gain in isolation. In practice, capital losses can offset capital gains (and even a limited amount of ordinary income), which would reduce the actual tax owed below what's shown here.

Does this include the Net Investment Income Tax surtax?

No -- an additional 3.8% Net Investment Income Tax can apply to investment income above certain income thresholds, on top of the regular capital gains rate. This calculator doesn't include that surtax, so a high earner's actual tax owed can be somewhat higher than the estimate shown. Consult a tax professional if this may apply to you.

Do special assets like collectibles follow the same capital gains rules?

Not always -- collectibles, certain small-business stock, and real estate depreciation recapture, among others, follow different rates or rules than the standard short-term/long-term framework this calculator models. Check IRS guidance for the specific asset type if it falls into one of these special categories.

Do I owe tax on a gain I haven't sold yet?

No -- an investment that has gone up in value but hasn't been sold is an unrealized gain, and unrealized gains aren't taxed. Capital gains tax only applies once you actually sell (or otherwise dispose of) the asset, which is why this calculator asks for a sale price, not just a current market value.

What counts as my cost basis (purchase price)?

Your cost basis is generally what you originally paid for the asset, plus certain costs like broker commissions or fees to acquire it -- not just the sticker price. For assets received as a gift or inheritance, or for investments where you've reinvested dividends, the real cost basis can be more complicated than a simple purchase price, so double-check your actual basis before filing if any of that applies.

Do I need to make estimated tax payments on a capital gain?

Possibly. Because there's no automatic withholding on an investment sale, a large gain realized during the year can leave you owing more than your existing withholding and estimated payments cover -- which can trigger an IRS underpayment penalty even if you pay the full balance by the filing deadline. Making a quarterly estimated payment for the quarter the sale happened in is the usual way to avoid that.

Confirm Your Age

To create an account, please tell us your birth month and year.