Free calculator · No signup · Method shown
Stock profit after tax calculator
Enter what you paid, what you sold for and your income to estimate the federal and state tax on a stock sale, and what you take home.
StockEducation Editorial Team · Updated · 10 min read · How we check our tools
How much will I keep after tax when I sell a stock?
Net profit after tax starts with the gross gain, then subtracts estimated federal and state tax. A $10,000 long term gain taxed at 15% federally and 5% by the state leaves $8,000 under that simple example. The holding period matters because moving past one year can change a gain from ordinary income rates to long term capital gains rates. The free StockEducation Stock Profit After Tax Calculator estimates the gain, federal tax, state tax, total tax, net profit and effective rate. It cannot cover every deduction, extra tax, carried loss or choice of tax lot.
The calculator
Estimate your profit after tax
Output Calculated from your inputs
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.
Profit Breakdown
Tax Information
Enter your trade details to see a simplified after-tax estimate.
Short-Term vs Long-Term Comparison
Short-Term
Long-Term
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 to use it (three steps)
Enter your purchase and sale price, how long you held the stock, your filing status, your income before the sale and your state tax rate, then press Calculate After Tax Profit. Not sure what to try? Load an example.
- 1Enter purchase and sale prices, holding period, filing status, income and state rate
- 2Press Calculate After Tax Profit and read what you keep
- 3Change the holding period to just over a year and see the difference
Your result in words
After tax estimateYour result will appear here once the calculator runs.
Compared with your pinned result
Compare two plans
Keep or share this result
Saved numbers and images stay on this device. A copied link holds only the tool inputs, nothing else.
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.
Checked against IRS · see sources
- 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.
How the tax is worked outIncome and holding timeWhat is left outTest yourself
Part 1 of 3 · How it works
How is tax on a stock sale worked out?
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?
- Gain = sale price − purchase price.
- 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
- 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
- State tax: your gain × the flat rate you enter.
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.
Federal tax depends on your bracket, the NIIT on your total income, and state tax on where you live.
Part 2 of 3 · Income and holding time
How do income and holding time change the tax?
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?
| Situation | Total tax | You keep |
|---|---|---|
| $40,000 income, held over a year | $250 | $4,750 |
| $75,000 income, held over a year | $1,000 | $4,000 |
| $75,000 income, held a year or less | $1,350 | $3,650 |
| $200,000 income ($230,000 MAGI), held over a year | $1,190 | $3,810 |
All figures from this calculator on October 15, 2026.
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
Low income can mean 0% federal tax on long term gains. Selling within a year usually costs more.
Part 3 of 3 · What is left out
Why might my real tax bill be different?
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 eligible net losses against income (generally up to $3,000, or $1,500 if married filing separately).
- 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.
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 Free, no signup.Use this for one sale. For the full year, use tax software or a tax professional.
Mistakes to avoid
Three mistakes to avoid, and what to do instead
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.
Selling just short of a year
One more day can move the gain from ordinary income rates to lower long term rates.
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.
Quick check
Three quick questions and one why
1. You bought shares for $6,000 and sold them for $9,000. What is your gain before tax?
2. In the examples, why does the $40,000 income filer pay no federal tax on the gain?
3. Which income measure decides whether the 3.8% net investment income tax applies?
Why: why does the calculator stack the gain on top of your income?
Tax brackets fill from the bottom up. Your regular income fills the lower bands first, so the gain lands in whatever band comes next. That is why the same gain is taxed more heavily for someone with a higher income.
Common questions
Stock Profit After Tax Calculator FAQ
Is a stock gain taxed in the year I sell?
Yes. The gain counts in the tax year of the sale, even if you reinvest the money.
Does reinvesting the profit avoid tax?
No. In a regular brokerage account, selling creates the tax whether or not you buy something else. Trades inside an IRA or 401(k) are not taxed when they happen.
Which states have no income tax?
Several states, including Florida, Texas and Washington, have no broad income tax, though Washington has a separate tax on some large capital gains. Enter 0 for state tax if it does not apply to you.
What if I have a loss?
The calculator shows no tax. In real life the loss can offset other gains and up to $3,000 of other income a year ($1,500 if married filing separately), subject to applicable rules.
Can I save or share my numbers?
Yes. Save my numbers keeps your inputs on this device, and Copy link to these numbers creates a link that opens the calculator with them and nothing else.
You know what a sale costs in tax. Now learn how investment taxes fit together.
A free account saves your course progress and opens the $1,000,000 practice simulator, where you can watch real U.S. stocks rise and fall with virtual money before any of your own is at stake.
Free, no card. Lessons and tools stay free to use without an account.
Stock profit after tax on one card, and where to go next
- Step 1 · DoneHow tax on a stock sale works
See it on one card
- 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.
- 2Step 2 · NowCheck your bracket
See how your income fills each 2026 federal bracket.
Open the tax bracket calculator Free, no signup. - 3Step 3Follow the learning pathThe learning pathFree
Learn the rest in the right order
Lessons, videos, tools and quizzes, ordered so each step builds on the last, from market basics to building a portfolio.
Start the learning path
Want the full sequence? See the course outline →
Sources and assumptions
- IRS Topic No. 409, Capital gains and losses. Short and long term rates and the loss rules.
- IRS Topic No. 559, Net investment income tax. The 3.8% rate and the MAGI thresholds.
- IRS: Inflation adjusted tax items by tax year. The 2026 brackets and capital gains thresholds.
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. October 22, 2026: page rebuilt around the unchanged live tool. Worked examples were produced with this tool on the date given beside each one.
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.
