Stock Profit Calculator
Estimate net profit after commissions and US capital gains tax. Short-term vs long-term auto-detected. 2026 federal brackets.
Net profit after tax
Breakdown
How stock profit is calculated
Stock profit looks simple — sell price minus buy price — but the IRS cares about three more inputs: commissions, holding period, and your tax bracket. The full formula the calculator above runs is:
Cost basis = shares × buy price + buy commission Proceeds = shares × sell price − sell commission Gross P/L = Proceeds − Cost basis Tax = Gross P/L × (short-term rate OR long-term rate) Net profit = Gross P/L − Tax ROI = Net profit / Cost basis
Worked example. You buy 100 shares of AAPL at $150 with a $5 commission, hold 18 months, and sell at $200 with another $5 commission. Cost basis is $15,005, proceeds are $19,995, gross profit is $4,990. Because you held longer than 12 months it is a long-term gain. At the 15% LTCG rate, tax is $748.50 and net profit is $4,241.50 — a 28.3% ROI on cost basis. Short-term at the 24% ordinary rate would have cost $1,197.60 in tax, almost a $450 difference for crossing the 12-month line.
Short-term vs long-term capital gains
The 12-month rule is the single biggest tax lever a retail investor controls. Held 12 months or less, your gain is short-term and stacked on top of W-2 income at marginal rates of 10%, 12%, 22%, 24%, 32%, 35%, or 37%. Held more than 12 months, your gain is long-term and taxed at 0%, 15%, or 20% — rates that almost always beat the ordinary equivalent.
The holding clock starts the day after you buy and ends the day you sell. Buying on Jan 5, 2025 and selling on Jan 5, 2026 is still short-term — you need Jan 6 or later. Brokers report the holding period on Form 1099-B, and TurboTax and similar software import it automatically. If you actively trade the same ticker, the IRS uses FIFO (first-in-first-out) by default; specific identification is allowed if you flag the lot at sale.
2026 capital gains tax brackets
Long-term capital gains use a separate, lower bracket schedule. For single filers in 2026:
| Taxable income (single) | Long-term rate | Short-term rate |
|---|---|---|
| $0 – $48,350 | 0% | 10–12% |
| $48,351 – $533,400 | 15% | 22–35% |
| $533,401+ | 20% | 35–37% |
High earners (over $200k single / $250k joint) also pay a 3.8% Net Investment Income Tax on top of LTCG, pushing the effective top federal rate to 23.8%. The calculator above does not include NIIT — most retail investors fall well below the threshold.
State capital gains tax
Federal is only half the story. Most states tax capital gains as ordinary income — so a New York or California filer can owe another 6–13% on top of federal LTCG. California is the harshest at up to 13.3%; Hawaii, Oregon, and Minnesota also land near the top of the table. By contrast, Florida, Texas, Washington (with a narrow exception), Tennessee, Nevada, and a few others have no state income tax at all. Washington enacted a 7% capital gains tax in 2022, but it only applies to long-term gains exceeding roughly $270,000 per year and excludes real estate. Always check your state's current schedule before assuming federal is the whole bill — see our Paycheck Calculator for state-by-state rates.
Wash sale rule
If you sell a stock at a loss and rebuy the same or substantially identical security within 30 days before or after the sale, the IRS disallows the loss for current-year deduction under the wash sale rule. The disallowed loss is added to the cost basis of the replacement shares — you don't lose it forever, but you can't use it until you actually exit the position with no rebuy in the 30-day window.
This catches active traders constantly. Selling AAPL at a loss and rebuying AAPL two weeks later? Wash sale. Selling SPY at a loss and rebuying VOO (a different S&P 500 ETF)? Probably also a wash sale because they're substantially identical. The rule applies across all your accounts — including your spouse's account and your IRA — so you can't dodge it by switching brokers. The fix is simple: wait 31 days, or replace with a meaningfully different security (different index, different sector).
Common mistakes
- Ignoring commissions. Even at $0 stock trades, options, mutual funds, and broker-assisted trades still carry fees. They legally reduce your gain — track them.
- Forgetting dividend taxes. Qualified dividends are taxed at LTCG rates; non-qualified at ordinary rates. Either way they're a separate line from your sale gain — this calculator covers the trade only.
- Sloppy cost basis tracking. If you bought across multiple lots at different prices, the IRS expects FIFO unless you flagged specific shares at sale. Many investors over-pay by accepting the broker default when HIFO would minimize current-year tax.
- Selling on day 364. The single most expensive mistake. One extra day pushes you from 22–37% short-term into 0–20% long-term — see our Crypto Tax Calculator for the same dynamic on digital assets.
- Not reinvesting tax-deferred. If you're holding inside a Roth IRA, 401(k), or HSA, none of this calculation applies — gains compound tax-free. Use our Investment Calculator to project the difference over decades.
- Overlooking the wash sale rule. Tax-loss harvesting only works if you stay out of the same security for 31 days. Selling at year-end and rebuying in January catches a lot of investors off guard.
Disclaimer. This calculator gives a federal estimate using 2026 single-filer brackets. State tax, NIIT, AMT, and your full filing situation can change the result. For real filings, use tax software or consult a CPA.