Finance

Stock Profit Calculator

Estimate net profit after commissions and US capital gains tax. Short-term vs long-term auto-detected. 2026 federal brackets.

12+ months qualifies for long-term capital gains rates.
Used for short-term gains (taxed as ordinary income).
Used to place long-term gain in 0% / 15% / 20% bracket (single filer).

Net profit after tax

$2,125.00
ROI: 42.50% · Long-term · 15% tax

Breakdown

Total cost basis
100 × $50.00 + $0.00 buy fee
$5,000.00
Total proceeds
100 × $75.00 − $0.00 sell fee
$7,500.00
Gross profit
$2,500.00
Holding type
≥ 12 months — preferential 0% / 15% / 20% rates
Long-term
Capital gains tax (15%)
$375.00
Net profit after tax
$2,125.00
Breakeven sell price
Per share, to recover cost + sell commission
$50.00

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 rateShort-term rate
$0 – $48,3500%10–12%
$48,351 – $533,40015%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.

Frequently Asked Questions

How do I calculate stock profit?
Profit = (shares × sell price − sell commission) − (shares × buy price + buy commission). That gross profit is then reduced by capital gains tax to get your net, after-tax take-home. ROI is net profit divided by total cost basis.
Short-term vs long-term capital gains — what's the difference?
If you held the stock 12 months or less, the gain is short-term and taxed at your ordinary income rate (10–37%). If you held it more than 12 months, it qualifies for long-term capital gains rates (0%, 15%, or 20%) — usually a much smaller bill. The clock starts the day after you buy and ends the day you sell.
Do I owe state tax on stock profits?
Almost always yes. Most states tax capital gains as ordinary income at the state rate. A handful of states (Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming) levy no broad state income tax, so capital gains escape state tax. Washington has a 7% tax on long-term gains over $270,000 as of 2024.
What happens if I lose money on a stock?
Capital losses offset capital gains dollar-for-dollar. If your net is still negative, you can deduct up to $3,000 against ordinary income per year, and carry the rest forward indefinitely. But if you rebuy the same security within 30 days, the wash sale rule disallows the loss until you actually exit the position.
Are commissions tax-deductible?
Not as a separate deduction — but they reduce your taxable gain automatically. Buy commissions add to your cost basis; sell commissions subtract from proceeds. The calculator above does this for you. Most major US brokers (Robinhood, Fidelity, Schwab, E*TRADE) charge $0 commission on stocks anyway — but legacy accounts and broker-assisted trades may still incur fees.

Related Calculators