Free calculator, no signup

U.S. Stock Profit After-Tax Calculator

Estimate tax on one U.S. stock sale using 2025 or 2026 federal brackets, NIIT and your flat state rate. For a simple scenario using a rate you choose, use the manual-rate Capital Gains 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$5,000
Total tax$1,000
You keep$4,000
If held under a year$3,650
Fixed figures. They do not change when you change the inputs.

Use the calculator

Free. No signup. Nothing to install.
↓ Stock Profit After-Tax Calculator ↓

Your trade details

Choose 2025 or 2026 and enter your trade, taxable ordinary income and MAGI before the sale. Gains fill the applicable federal brackets; NIIT and a flat state estimate are shown separately.

U.S. taxable-account estimate. Gain = sale price − purchase price. The selected year’s federal brackets stack positive gain above ordinary taxable income; NIIT uses MAGI separately, and state tax uses your flat rate. Other gains, deductions, credits, AMT and loss benefits are excluded. IRS tables, full method and limits.

Net Profit After Tax
$—
Effective tax rate: —
Total Tax Owed
$—
Federal: — · State: —
Gross Capital Gain
$—
Return before tax: —

Profit Breakdown

Sale Price$—
Purchase Price$—
Gross Capital Gain$—
Federal Capital Gains Tax$—
Net Investment Income Tax (NIIT)$—
State Income Tax$—
Net Profit / Take Home$—

Tax Information

Enter your trade details to see a simplified after-tax estimate.

Short-Term vs Long-Term Comparison

Short-Term
$—
Tax: —
Long-Term
$—
Tax: —
Educational U.S. tax estimate: assumptions and limits

This models one sale in a taxable account using the selected 2025 or 2026 federal tables, a separate NIIT estimate and your flat state rate. Purchase price represents entered cost basis and sale price represents entered proceeds.

It excludes other gains and qualified dividends, loss offsets/carryforwards, deductions, credits, AMT, special assets, state brackets and account-specific rules. Results are not tax advice or a tax-return calculation. Confirm real outcomes with a qualified tax professional and the linked IRS sources.

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 content only. This calculator provides a simplified estimate only. It does not provide tax, legal, financial or investment advice. Confirm real outcomes with a qualified tax professional.

How it works

  1. You enterEnter total purchase and sale amounts, holding period, filing status and income.
  2. You getGain, estimated 2026 federal tax and take home profit.
  3. ThenCheck your full tax bracket.

Keep in mind. State tax uses your flat rate. Loss benefits and other gains are excluded.

Where to go next

Next useful step: check your full tax bracket.

Tax Bracket Calculator →
The short answer

How much of my stock profit do I keep after tax?

It depends on how long you held the stock, your income and your state. Buy for $10,000, sell for $15,000 after more than a year, and as a single filer with $75,000 of taxable income in a state with a 5% tax, you would pay about $750 federal and $250 state and keep $4,000 of the $5,000 gain. Sell the same shares within a year and you keep $3,650, because short term gains are taxed like income.

Key points

  • Three taxes. Federal, the 3.8% NIIT for higher earners, and state.
  • Stacked. The gain sits on top of your income in the brackets.
  • Example. $5,000 gain, $75,000 income: keep $4,000.
  • Held a year or less. Same gain: keep $3,650.
  • 0% band. Long term gains up to $49,450 taxable income, single, 2026.
  • One sale only. Losses and other gains are not modeled.
2 minute lesson, optionalWhat did you really make ?Guess first, see the answer, then try it yourself. Five quick steps. You can skip it any time. Play the lessonClose the lessonOpen
Stock profit00 XP

Your path

Do today’s challenge, then tap Up next.

Daily goal: 30 XP
All tools

    Stock calculator

    Step 1 of 5

    You buy 100 shares at $50 and sell at $65 after more than a year. You are in the 22% bracket.

    How much profit do you keep after federal tax?

    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 stock 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 tax on a stock sale worked out?

    Federal tax depends on your bracket, the NIIT on your total income, and state tax on where you live.

    Up to three taxes can apply to a U.S. stock gain: federal tax, the net investment income tax for higher earners, and state tax.

    What does the calculator do?

    1. Gain = sale price − purchase price.
    2. Federal tax: the gain is stacked on top of your taxable income and taxed at the rates for the brackets it falls into. Long term gains use 0%, 15% or 20%; short term gains use the ordinary income rates.1
    3. Net investment income tax: 3.8% if your modified adjusted gross income (MAGI) goes over $200,000 single or $250,000 married filing jointly.2
    4. State tax: your gain × the flat rate you enter.
    The default, step by step

    A $5,000 long term gain on top of $75,000 of taxable income falls in the 15% band: $750 federal. MAGI is under $200,000, so no NIIT. State: 5% × $5,000 = $250. You keep $5,000 − $1,000 = $4,000.

    What is the difference between taxable income and MAGI?

    Taxable income is after deductions, such as the standard deduction. MAGI is closer to your total income before deductions. The calculator asks for both because the federal brackets use taxable income and the NIIT uses MAGI.

    What counts as my purchase price?

    The tax is on your gain, and the gain is measured from your cost basis, not just the share price. For stock you buy, the IRS says basis is the purchase price plus extra costs such as commissions and transfer fees.4 Selling costs reduce what you receive, so they shrink the gain too.

    Here is how that plays out with round numbers. You buy shares for $10,000 and pay a $10 commission, so your basis is $10,010. You sell for $15,000 and pay another $10, so you receive $14,990. Your taxable gain is $14,990 − $10,010 = $4,980, not $5,000. With commission free trading the difference is often zero, but fees on some accounts and funds still count.

    Your broker reports the sale to you and the IRS on a year end tax form, and you list each sale on Form 8949 before the totals move to Schedule D.5 If the basis on that form looks wrong, fix it before you file, because it sets the gain you pay tax on.

    The rule

    Federal tax depends on your bracket, the NIIT on your total income, and state tax on where you live.

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

    Income and holding time

    How do income and holding time change the tax?

    Low income can mean 0% federal tax on long term gains. Selling within a year usually costs more.

    The same $5,000 gain can cost anywhere from a few hundred dollars to well over a thousand in tax.

    What do you keep from a $5,000 gain?

    A $5,000 gain, single filer, 5% state tax, 2026 federal rates
    Income and holding periodFederal rateTotal taxYou keep
    $40,000, long term0%$250$4,750
    $40,000, short term12%$850$4,150
    $75,000, long term15%$1,000$4,000
    $75,000, short term22%$1,350$3,650
    $150,000, short term24%$1,450$3,550

    At $40,000 of taxable income, the gain falls inside the 0% federal band, which for 2026 runs to $49,450 for single filers, so only state tax is due.3

    How much does holding past one year save?

    Take home from the default $5,000 gain
    Held a year or less$3,650
    Held over a year$4,000
    Over a year, no state tax$4,250

    Short term, the federal tax is $1,100 instead of $750 because the gain is taxed at the 22% income rate, not 15%.

    What happens when a gain crosses into the next band?

    Because the gain is stacked on top of your income, part of it can land in one band and the rest in the next. Each piece is taxed at its own rate, just like ordinary income brackets.

    Split across two bands

    A single filer has $45,000 of taxable income and a $10,000 long term gain. For 2026 the 0% band runs to $49,450,3 so the first $4,450 of the gain is taxed at 0%. The other $5,550 falls in the 15% band: $5,550 × 15% = $832.50 of federal tax, about 8.3% of the gain.

    The timing rule is strict. A gain is long term only if you held the shares for more than one year.1 Selling on the one year anniversary is still short term, which can move the same gain into the ordinary income rates. Check your purchase date before you sell anything close to that line.

    The rule

    Low income can mean 0% federal tax on long term gains. Selling within a year usually costs more.

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

    What is left out

    Why might my real tax bill be different?

    Use this for one sale. For the full year, use tax software or a tax professional.

    The estimate covers one sale. Your tax return looks at the whole year.

    What does the calculator not include?

    • Losses. A loss shows as $0 tax, but the calculator does not model offsetting other gains or deducting up to $3,000 of income.
    • Other gains and investment income. It assumes this sale is your only one.
    • Fees. Add commissions to the purchase price if you want them counted.
    • Credits, AMT and local taxes. These can raise or lower the final bill.
    • State rules. States differ; a flat rate is only an estimate.
    Your turn

    See your income tax bracket. The tax bracket calculator shows how your 2026 income fills each federal bracket, so you know what rate a short term gain would face.

    Open the tax bracket calculator

    How do losses lower my tax bill?

    The calculator shows a loss as $0 tax, but on your return losses do real work. They first cancel out gains from the same year. If losses are larger than gains, you can deduct up to $3,000 of the extra against other income ($1,500 if married filing separately), and carry the rest forward to later years.1

    Say you have an $8,000 loss and no gains this year. You deduct $3,000 now and carry $5,000 forward. Next year a $5,000 gain could be fully offset by that carried loss, leaving no tax on it.

    One trap catches beginners: selling at a loss and buying the same or substantially identical shares right around the sale. That is a wash sale, and the loss is not allowed at that time; it is added to the basis of the new shares instead. IRS Publication 550 explains the timing window and the details.6

    The rule

    Use this for one sale. For the full year, use tax software or a tax professional.

    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. Counting the gross gain as profit Federal tax, state tax and fees come out first. The after tax number is the one you can spend.
    2. Selling just short of a year One more day can move the gain from ordinary income rates to lower long term rates.
    3. Forgetting the gain changes your bracket A large gain can push part of itself into a higher rate. Run the tax bracket calculator with the gain included.

    Marks part 4 of 4 done.

    Quick questions

    Stock Profit After Tax Calculator FAQ

    Tap a question to open the answer.

    What does the stock calculator do, and is it free?

    See what you keep after tax when you sell a stock. You enter buy price, sell price, shares, holding period and income. You get gain, estimated 2026 federal tax and take home profit. It is free to use with no signup. Keep in mind: federal estimate only. State tax and NIIT may apply.

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

    It depends on how long you held it, your taxable income and your state. Shares held more than a year get long term rates of 0%, 15% or 20% at the federal level. Shares held a year or less are taxed at your ordinary income rate, which runs from 10% to 37%. As a single filer with $75,000 of taxable income and a 5% state tax, a $5,000 long term gain costs about $1,000 in total.

    Do I pay taxes on stocks if I don’t sell?

    No, not on the rise in price. In a regular brokerage account, a gain is taxed only when you sell, so shares that went up but are still held create no capital gains tax yet. Dividends are different: they are generally taxable in the year you receive them, even if you reinvest them automatically. Trades inside an IRA or 401(k) are not taxed when they happen.

    Is this stock profit after tax calculator free, and what does it include?

    Yes, the calculator is free to use with no account. It estimates federal tax on one sale using the 2026 or 2025 brackets, the 3.8% net investment income tax if your MAGI is above the threshold, and state tax at the flat rate you enter. It assumes this sale is your only gain and leaves out losses from other sales, credits, AMT and local taxes, so treat the result as an estimate.

    Does reinvesting the profit avoid capital gains tax?

    No. This is a common misconception. In a taxable account, selling shares creates the tax whether you take the cash out or buy another stock the same day. The gain counts in the tax year of the sale. The only ways to defer tax on trades are to make them inside a tax advantaged account such as an IRA or 401(k), or to keep holding the shares.

    Show 4 more questionsShow fewer questions
    How long do I have to hold a stock to pay less tax?

    More than one year. The IRS treats a gain as long term only when you held the asset for more than a year, so selling on the exact anniversary still counts as short term. Long term gains get the lower 0%, 15% or 20% federal rates. In this calculator’s default example, holding past a year turns $3,650 of take home profit into $4,000, because the rate drops from 22% to 15%.

    What is the 0% capital gains rate for 2026?

    For 2026, single filers pay 0% federal tax on long term gains while their taxable income, including the gain, stays at or below $49,450, according to the IRS inflation adjusted figures. The gain stacks on top of your other taxable income, so only the part that fits under the line gets 0%. A single filer with $40,000 of taxable income can take a $9,450 long term gain at 0%. State tax may still apply.

    Who pays the 3.8% net investment income tax?

    Higher earners whose modified adjusted gross income is above $200,000 single or $250,000 married filing jointly. The tax is 3.8% of the smaller of your net investment income or the amount your MAGI is over the threshold. In the calculator’s higher income example, MAGI of $230,000 is $30,000 over the line, so the full $5,000 gain is subject to the extra 3.8%, adding $190.

    Can I deduct a loss on a stock?

    Yes. Losses first offset capital gains from the same year. If you still have a net loss, you can deduct up to $3,000 against other income, or $1,500 if married filing separately, and carry any remaining loss forward to future years. Watch the wash sale rule: if you buy the same or substantially identical shares around the time you sell at a loss, the loss is deferred instead.

    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 rates and the loss rules.
    2. IRS Topic No. 559, Net investment income tax. The 3.8% rate and the MAGI thresholds.
    3. IRS: Inflation adjusted tax items by tax year. The 2026 brackets and capital gains thresholds.
    4. IRS Topic No. 703, Basis of assets. Your cost basis in stock is the purchase price plus costs such as commissions.
    5. IRS: About Form 8949, Sales and other dispositions of capital assets. Where each sale is reported and checked against your broker’s form before Schedule D.
    6. IRS Publication 550, Investment income and expenses. The full rules on holding periods, wash sales and capital gains and losses.

    Method: gain = sale price − purchase price. Federal tax is the increase in tax from stacking a positive gain above the taxable ordinary income entered, using the selected year’s brackets and long or short term rates. NIIT is 3.8% of the lesser of the gain and MAGI above the filing status threshold, assuming this sale is the only net investment income. State tax is the gain × the flat rate entered. Losses, other gains, deductions, credits and AMT are excluded. 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