Free calculator, no signup

Capital Gains Calculator: Use Your Own Tax Rate

Test a gain using the tax rate, allowance and discount you enter. For U.S. federal brackets, NIIT and a flat state-tax estimate, use the U.S. Stock Profit After-Tax Calculator.

  • No signup
  • Built for beginners
  • Education, not advice
  • Review of this update in progress

Reviewer: Associate Professor Charles Lo, CPA, PhD. Editor: Felix La Spina. Updated . Review of this update in progress. Education, not advice. How we check

Example, not your result
Gain$15,000
Tax at 15%$2,250
You keep$12,750
Tax if held under a year at 24%$3,600
Fixed figures. They do not change when you change the inputs.

Use the calculator

Free. No signup. Nothing to install.
↓ Capital Gains Tax Calculator ↓
Capital Gains Tax Calculator
FREE · RESEARCH TOOL

Your capital gains details

Choose your country, holding period and sale details. The rate, discount and allowance are editable so you can adjust the assumptions.

Entered-assumption estimate. Gain = proceeds − cost − fees; taxable gain = max(0, gain − allowance) × (1 − discount ÷ 100); tax = taxable gain × rate ÷ 100. Net gain subtracts that tax. Country presets are examples, not verified current rates or a check of eligibility. No income brackets, NIIT, loss benefits or special-asset rules are applied. Full method and limits.

Capital Gains Summary
$—
Gain: — · Taxable Amount: — · Effective Rate: —
Disclaimer: Educational only. Actual outcomes depend on income, residency, thresholds, timing and local rules.
Capital Gain$—
Taxable Amount$—
Effective Rate—
Net Gain After Tax$—
CGT Summary
ItemValueNotes
CountrySelected context; entered assumptions control the arithmetic
Asset TypeSome assets have special rules
Holding PeriodLong means more than one year
ProceedsSale price
Cost BasisPurchase plus costs
Selling FeesDeductible where allowed
Capital GainProceeds minus cost minus fees
Taxable AmountAfter discounts and allowances
Estimated TaxUsing the editable assumptions
Effective CGT RateTax divided by gain
Tax RateThe rate you entered
DiscountShare of the gain left out
AllowanceTax free amount subtracted first
Educational gain estimate: entered assumptions and limits

This applies your entered flat rate, allowance and discount to one sale. Country and holding-period presets are illustrative starting points, not verified current rates. Selecting a country does not determine your personal tax treatment; confirm every assumption.

The arithmetic subtracts allowance before discount and ignores income brackets, additional taxes, exemptions, losses/carryforwards, eligibility and special-asset rules. Real rules may use a different order. This is not tax advice or a tax-return calculation. Use the relevant tax authority or a qualified professional for your actual situation.

Can I use this for my tax return?

No. This is not tax advice.

Tax rules depend on your country, your state, your income, your holding period and your personal circumstances. They also change.

This tool applies simplified general rules and knows none of that about you. The number it produces may be wrong for your situation.

Do not file, report or plan around this figure. Confirm it with a licensed tax professional or directly with the IRS before you act.

Educational estimate only. This is not tax, legal or financial advice. Always confirm with a qualified tax professional before acting.

How it works

  1. You enterEnter sale proceeds, cost, fees and your tax assumptions.
  2. You getYour gain, the taxable amount and an estimated tax.
  3. ThenSee profit after tax.

Keep in mind. You choose the rates. The tool does not look up your bracket.

Where to go next

Next useful step: see profit after tax.

Stock Calculator →
The short answer

How much tax will I pay when I sell a stock?

You pay tax on the gain, not the whole sale: what you sold for, minus what you paid and any fees. How long you held it sets the rate. Held more than one year, U.S. federal long term rates are 0%, 15% or 20% depending on your income; held a year or less, the gain is taxed like your paycheck.1 Sell for $25,000 what cost $10,000 and the gain is $15,000. At 15%, the tax is $2,250 and you keep $12,750 of the gain.

Key points

  • The gain. Sale price − cost − fees.
  • Only on selling. No tax on gains you still hold.
  • Over a year. Long term rates: 0%, 15% or 20%.
  • A year or less. Taxed like your paycheck.
  • Example. $15,000 gain at 15%: $2,250 tax, $12,750 kept.
  • Losses help. They offset gains, plus up to $3,000 of income a year.
2 minute lesson, optionalWait a year, pay less taxGuess first, see the answer, then try it yourself. Five quick steps. You can skip it any time. Play the lessonClose the lessonOpen
Capital gains tax00 XP

Your path

Do today’s challenge, then tap Up next.

Daily goal: 30 XP
All tools

    Capital gains tax calculator

    Step 1 of 5

    You have a $10,000 gain and earn $70,000 a year (single). You could sell now, at 11 months, or wait past a year.

    How much federal tax do you save by waiting?

    Tap a guess. Wrong guesses cost nothing.

    Free · No signup · 2 minutes · Revision review pending · Updated

    Step 2 of 5

    Next: try it yourself.

    Step 3 of 5

    Your turn

    Drag a slider or tap an option. Watch the number change.

    Type exact numbers

    Quick version for learning. The full capital gains tax calculator below has every option.

    Step 4 of 5

    What if you changed one thing?

    Tap a change to see what it does to .

    Step 5 of 5

    Tap an answer. You see why either way.

    Lesson complete

    0XP
    0Streak
    0/2Correct
    Your number
    More

    The guide

    Learn it in 4 short parts

    Each part answers one question. Open any part. Tap Got it when you are done.

    How it works

    How is capital gains tax calculated?

    You are taxed on the gain, not the sale price, and only when you sell.

    Capital gains tax is the tax on the profit when you sell something for more than you paid, such as a stock, a fund or crypto.

    What are the steps?

    1. Gain = sale price − cost basis − selling fees.
    2. Taxable gain = the gain after any allowance or discount you enter. For U.S. stocks, both are usually 0.
    3. Tax = taxable gain × your tax rate.
    4. What you keep = gain − tax.
    The default, step by step

    $25,000 − $10,000 = a $15,000 gain. At 15%, the tax is $2,250, leaving $12,750. A $100 selling fee would cut the gain to $14,900 and the tax to $2,235.

    What is cost basis?

    Usually what you paid, plus purchase costs such as commissions.2 If you bought in several lots, the average price calculator can help, but your broker’s cost basis records are the ones the IRS uses.

    When do I owe it?

    Only when you sell. A stock that has doubled but that you still hold has an unrealized gain, and no tax is due on it yet. Selling inside an IRA or 401(k) does not trigger it either.

    Does the same gain math apply when I sell my home?

    The first step is the same: sale price minus your cost basis. The difference is a large exclusion. If you sell your main home, you can exclude up to $250,000 of gain from tax, or up to $500,000 if you file a joint return with your spouse.6

    Say a single filer bought a home for $300,000 and sells it for $500,000. The gain is $200,000. That is under the $250,000 exclusion, so no federal tax is due on it. Had the gain been $320,000, only the $70,000 above the exclusion would be taxable, at long term rates if the home was owned more than a year.

    To qualify, you generally must have owned the home and lived in it as your main home for at least 24 months during the five years before the sale, and you usually cannot have used the exclusion on another home in the previous two years.6 To model a home sale in the calculator, enter the exclusion in the allowance box. The exclusion applies only to your main home.

    The rule

    You are taxed on the gain, not the sale price, and only when you sell.

    Marks part 1 of 4 done and opens the next one.

    Short vs long term

    Why does holding for over a year matter?

    Hold for more than one year and the same gain is usually taxed at a lower rate.

    The same gain can be taxed at very different rates depending on how long you owned the investment.

    How much difference does it make?

    Tax on a $15,000 gain at different rates
    Long term at 0%$0
    Long term at 15%$2,250
    Long term at 20%$3,000
    Short term at 24%$3,600

    Selling a few weeks later, after the one year mark, would save $1,350 here if your rate drops from 24% to 15%.

    Which long term rate applies to me?

    2026 federal long term capital gains rates, by taxable income
    RateSingle filerMarried filing jointly
    0%Up to $49,450Up to $98,900
    15%$49,451 to $545,500$98,901 to $613,700
    20%Above $545,500Above $613,700

    Higher earners may also owe the 3.8% net investment income tax, and most states tax gains as regular income.3

    How can a gain be taxed at 0%, and when does part of it cost 15%?

    The 0% long term rate applies to the part of your taxable income that falls under the 2026 threshold, $49,450 for a single filer.4 The key detail is that your other income fills the bracket first, and the gain sits on top.

    Say a single filer has $30,000 of taxable income from work and a $30,000 long term gain, for $60,000 in total. The first $19,450 of the gain fits under $49,450 and is taxed at 0%. The remaining $10,550 is taxed at 15%, which is $1,582.50. The whole gain is not taxed at 15%, and it is not all tax free either.

    This is why some investors plan sales for lower income years, such as a gap between jobs or early retirement, or split a large sale across two tax years. Short term gains get no such treatment: they are taxed at your ordinary income rates.1 To use this in the calculator, run the sale twice, once at 0% for the part under the threshold and once at 15% for the rest, then add the two tax figures.

    The rule

    Hold for more than one year and the same gain is usually taxed at a lower rate.

    Marks part 2 of 4 done and opens the next one.

    Losses and other rules

    What does this calculator leave out?

    Use this to see the size of the bill. Check the details with a tax professional before you sell.

    The calculator multiplies your gain by the rate you enter. Real tax returns have more moving parts.

    What happens if I sell at a loss?

    You owe no tax on that sale, and the loss can offset other gains. If losses are bigger than gains, up to $3,000 a year can reduce your other income, and the rest carries forward.1 The calculator shows $0 tax on a loss but does not model these benefits.

    What else is not included?

    • Your income brackets. You pick the rate. Part of a large gain can fall in a higher bracket.
    • The 3.8% net investment income tax and state tax.
    • Wash sales. Buying the same stock back within 30 days can disallow a loss.
    • Special assets. Collectibles and some property have different rules.

    The tool also lists a few other countries, but this page explains the U.S. rules.

    Your turn

    Get a fuller U.S. estimate. The stock profit after tax calculator fills your gain into the 2026 federal brackets from your income, and adds the net investment income tax and state tax.

    Open the after tax calculator

    How does tax loss harvesting work, and what is the wash sale trap?

    Harvesting means selling an investment that is below what you paid to offset gains elsewhere. If you have a $15,000 long term gain and sell another holding at a $5,000 loss, your net gain falls to $10,000. At 15%, the tax drops from $2,250 to $1,500. If losses are larger than gains, up to $3,000 a year can reduce your other income, and the rest carries forward.1 A $10,000 net loss gives a $3,000 deduction this year and $7,000 to use in later years.

    The wash sale rule stops you from selling for the loss and buying straight back. If you buy substantially identical securities within 30 days before or after the sale, the loss cannot be deducted for now.5 Many investors stay invested by moving into a similar fund that is not identical, such as one tracking a different index.

    Harvesting saves tax only in a taxable account. Gains and losses inside an IRA or 401(k) are not taxed or deducted.

    The rule

    Use this to see the size of the bill. Check the details with a tax professional before you sell.

    Marks part 3 of 4 done and opens the next one.

    Watch out

    Three mistakes to avoid, and what to do instead

    Common slips and what to do instead.
    1. Selling one day too early Holding for more than a year moves a gain from ordinary income rates to lower long term rates. Check the purchase date before you sell.
    2. Forgetting state tax Federal tax is only part of the bill in most states. Add your state rate to see what you actually keep.
    3. Ignoring losses elsewhere Realized losses offset gains, and up to $3,000 of net loss can offset ordinary income each year. Look at the whole account, not one sale.

    Marks part 4 of 4 done.

    Quick questions

    Capital Gains Tax Calculator FAQ

    Tap a question to open the answer.

    What does the capital gains tax calculator do, and is it free?

    Estimate the tax on an investment gain, using the rates you choose. You enter sale proceeds, cost, fees and your tax assumptions. You get your gain, the taxable amount and an estimated tax. It is free to use with no signup. Keep in mind: you choose the rates. The tool does not look up your bracket.

    How much tax will I pay when I sell a stock?

    You pay tax on the gain, not the whole sale: the sale price minus what you paid and any fees. How long you held the stock sets the rate. Held more than one year, the gain is taxed at federal long term rates of 0%, 15% or 20% depending on your taxable income. Held a year or less, it is taxed at your ordinary income rate. Selling for $25,000 a stock that cost $10,000 gives a $15,000 gain, and at 15% the federal tax is $2,250.

    What are the 2026 long term capital gains tax rates?

    For 2026, the federal long term rate is 0% on taxable income up to $49,450 for single filers and $98,900 for married couples filing jointly. It is 15% up to $545,500 single and $613,700 joint, and 20% above those amounts, according to the IRS. Taxable income includes the gain itself, so a large gain can spread across two rates. Higher earners may also owe the 3.8% net investment income tax, and most states tax capital gains as ordinary income.

    Is capital gains tax charged on the whole sale price?

    No. This is a common misconception. The tax applies only to the gain, which is the sale price minus your cost basis and selling fees. If you sell shares for $25,000 that cost $10,000, only $15,000 is a gain. You also owe nothing until you sell. A stock that has doubled while you still own it has an unrealized gain, and no tax is due on it yet. Keep your broker’s cost basis records, because they show what you paid for each lot.

    What are legal ways to reduce capital gains tax?

    The main legal ways are holding investments for more than a year so gains qualify for long term rates, using losses to offset gains, timing sales for lower income years when part of a gain can be taxed at 0%, and investing through tax advantaged accounts such as a 401(k) or IRA. For your main home, up to $250,000 of gain, or $500,000 for married couples filing jointly, can be excluded if you meet the ownership and use tests. Each method has rules worth checking first.

    Show 4 more questionsShow fewer questions
    How does tax loss harvesting work with the wash sale rule?

    Tax loss harvesting means selling investments that are below what you paid so the losses offset your gains. A $5,000 loss cuts a $15,000 gain to $10,000, saving $750 at a 15% rate. Losses beyond your gains can reduce other income by up to $3,000 a year, with the rest carried forward. The wash sale rule disallows the loss if you buy substantially identical securities within 30 days before or after the sale, so many investors switch to a similar but not identical fund.

    Do I pay capital gains tax in a 401(k) or IRA?

    No. Buying and selling inside a 401(k), traditional IRA or Roth IRA does not create capital gains tax when the trades happen. That is one of the simplest ways long term investors avoid the tax. Withdrawals follow each account’s own rules instead, which differ between traditional and Roth accounts. The flip side is that losses inside these accounts cannot be deducted, so tax loss harvesting only works in a taxable brokerage account.

    Is crypto taxed the same way as stocks?

    Mostly, yes. The IRS treats digital assets such as crypto as property, not currency, so selling, trading or spending them can create a capital gain or loss. The same holding period rules apply: more than a year gets long term rates, and a year or less is taxed as ordinary income. Trading one coin for another is a disposal too, which surprises many new holders. Keep records of what you paid for each purchase, because you need that cost basis to work out each gain.

    What does this capital gains tax calculator include?

    It works out your gain, the tax at the rate you choose and what you keep after tax. You enter the sale price, cost basis, selling fees and a rate, and choosing short term sets the rate to 24% as an example. It does not apply the income brackets for you, add the 3.8% net investment income tax or state tax, or model loss offsets and wash sales. Save my numbers keeps your inputs on this device, and Copy link to these numbers shares them.

    Keep going

    What should I do next?

    Pick the step that fits what you just did.

    Trust

    Who checks this page, and the sources

    Real people check the numbers and the wording. Every source is listed.

    • Updated
    • Sources listed below
    • Education, not advice
    • Review of this update in progress
    Was this page helpful?Spotted an error? Tell us
    Sources and methodEvery source used on this page, how the tool works and the page history.
    1. IRS Topic No. 409, Capital gains and losses. Short and long term rules, rates and the $3,000 loss limit.
    2. IRS Topic No. 703, Basis of assets. What counts in your cost basis.
    3. IRS Topic No. 559, Net investment income tax. The 3.8% tax and its income thresholds.
    4. IRS: Inflation adjusted tax items by tax year. The 2026 capital gains rate thresholds.
    5. Investor.gov (U.S. Securities and Exchange Commission): Wash sales. The rule that disallows a loss when you buy substantially identical securities within 30 days before or after the sale.
    6. IRS Topic No. 701, Sale of your home. The $250,000 and $500,000 home sale exclusions and the ownership and use tests.
    7. IRS: Digital assets. Digital assets are treated as property, so selling them can create a capital gain or loss.

    Method: gain = sale proceeds − cost basis − selling fees; taxable gain = the larger of zero and the gain minus any allowance, reduced by any discount; tax = taxable gain × the rate entered; net gain after tax = gain − tax. Income brackets, the net investment income tax, state tax, loss offsets and special asset rules are excluded. Choosing short term with United States selected sets the rate to 24% as an example. Every figure on this page came from this calculator on October 15, 2026. All amounts are in U.S. dollars.

    Page history. November 27, 2026: page simplified into numbered sections, missing tables restored and the questions reordered. The tool itself has not changed. October 21, 2026: content expanded, sources added and the page reviewed by Associate Professor Charles Lo, CPA, PhD. The tool itself has not changed.

    StockEducation provides general education, not personal financial, tax or legal advice. Results are illustrations based on the assumptions you enter, not forecasts or promises of any return. Investing involves risk, including the loss of money you invest.

    Free beginner guide

    New to Investing? Start With Our Free Guide

    20 pages on the basics, 6 safe ways to use AI, and a 10 question quiz. Free in your inbox.

    Free PDF in your inbox. No spam. Unsubscribe any time.

    Learning Path IncludedEvery lesson in the right order, freeGet the Free Guide

    Optional email copy

    Save your number

    Email yourself a copy of this result and receive occasional updates about the StockEducation $1M simulator challenge. Your result stays visible either way.

    Saved. Check your inbox for the result.
    View the $1M challenge
    AI Robot

    Ask the
    Stock AI Assistant

    Get instant educational answers about
    stocks, investing, and StockEducation.com.

    Instant Answers Built With Learners

    Educational support only. Not personal financial advice. AI responses may contain errors.

    Powered by AI ●

    The Ultimate Investing Starter Guide

    Free Stock Market
    Investing Guide

    A beginner friendly guide that covers the essential lessons and concepts every new investor should understand.

    Beginner Investing Guide Form

    Inside You'll Learn

    Stocks & How They Work
    Valuation Basics
    Compound Interest
    Index Funds & Diversification
    Warren Buffett Principles
    AI Stock Research & More
    20+ Pages
    of Value
    Instant
    Download
    100% Free
    No Strings