Quick answer: The gain on the screen isn't the gain in your pocket — commissions, fees, and dividends all move the real number. This free stock profit calculator computes your net profit, return on investment (ROI %), and breakeven price per share from the buy price, sell price, number of shares, broker commissions, and any dividends received. It answers the two questions that matter before you sell: 'what do I actually take home?' and 'at what price do I break even?' Private, instant, no signup.
🔒 100% Private: Data never leaves your device.
✓ Free forever · ✓ No signup · ✓ Tool inputs stay in your browser — never sent to our servers.
Copy this snippet and paste it into your page HTML — free forever, no signup:
How to Use the Stock Profit Calculator
Enter the price per share you bought at, the price you sold (or plan to sell) at, and the number of shares.
Add your broker commissions for the buy and the sell — flat fees and per-trade charges both count.
Add any dividends received while holding, if you want total return rather than price gain alone.
Click 'Calculate profit' — net profit, ROI %, and your breakeven price per share appear instantly.
Why Use Our Stock Profit Calculator?
True net profit — buy and sell commissions subtracted, so you see what you actually take home.
ROI % — profit as a percentage of everything you put in, the number that lets you compare trades.
Breakeven price — the exact per-share price where the trade turns from red to green.
Dividend-aware — optional dividend input folds payouts into the total return.
Private by design — trade sizes are nobody's business; everything computes in your browser.
Common Use Cases
Deciding whether to sell: Enter your actual buy price and a candidate sell price to see the true take-home before you place the order.
Comparing brokers' fee drag: Run the same trade with $0 vs $6.95 commissions to see what your broker really costs you per year.
Journaling trades: Log the net profit and ROI per trade instead of the raw price move — your journal finally matches your account.
Setting limit orders: Compute the breakeven price first, then set your limit a sensible distance above it instead of guessing.
Teaching investing math: A concrete worked example — 100 shares, $50 to $70 — makes profit, ROI, and breakeven click for beginners.
Checking a position before earnings: An earnings report lands after the close. Enter your buy price and the after-hours price to see the real take-home — commissions and dividends included — before deciding whether to hold through the print or bank the gain.
Comparing two trades held different lengths: A 40% gain in 4 months and a 40% gain in 4 years look identical in ROI and are nothing alike. Run both trades here, then annualize each with the CAGR formula from the FAQs to compare them honestly.
Setting a stop-loss above breakeven: Compute the breakeven price first, then place your stop a sensible distance above it — not below it. A stop set below breakeven guarantees that a triggered stop locks in a loss even after commissions.
Setting a limit sell before earnings: Work out the breakeven and the target ROI first, then place the limit order at the price that locks in the gain you actually want — not the round number that feels right. If the breakeven is $49.70 and you want 20%, the order goes in at $60.06, not $60.
Comparing two brokers' fee impact: Run the same trade with $0 commissions and with a $6.95-per-trade broker: on a $500 position the $13.90 round trip is a 2.8% drag that has to be earned back before the trade profits at all. Fee differences that look trivial decide small trades.
Estimating a year-end tax-loss harvest: Model the losing positions before December: the pre-tax loss here is the starting point for the harvest. Then check wash-sale timing — selling and rebuying the same stock within 30 days disallows the loss, so the harvest only works if you wait or swap into a different name.
Stock Profit Calculator vs Alternatives
Your broker's P&L screen: The most accurate record of realized gains — it's your actual account. The tradeoff: it's locked inside the broker's app and rarely shows what-if scenarios. Ours answers 'what if I sell at $75?' in seconds.
Calculator.net / OmniCalculator: Established, thorough, and free — but heavy pages with ads around a simple calculation. This page is one clean form with breakeven and dividend handling in the same view.
A spreadsheet: Maximum flexibility for multi-lot portfolios and tax scenarios. Overkill for 'did this trade make money' — you'll spend longer building the sheet than the trade took to think about.
Brokerage research tools: Great for screening stocks, poor for trade math — they're built to sell you the next trade, not to audit the last one.
Portfolio trackers (Yahoo Finance, Google Finance): Excellent for watching positions move — live prices, charts, and per-position gains at a glance. What they do not do is what-if math: 'what if I sell at $75, after commissions, with dividends' still needs a calculator, and their gain figures often ignore commissions entirely.
Trading journal apps: Built for serious traders: per-trade stats, win rates, and mistake tagging across hundreds of trades. The tradeoff is a paid subscription and setup overhead; for one trade's profit, ROI, and breakeven, this page answers in seconds without an account.
Your broker's realized P&L screen: Shows what you actually made after the fact, including dividends and fees — but it reports history, not scenarios. Ours answers 'what if I sell at $X' before you place the order, with the breakeven in view.
Spreadsheet trackers with live prices: GOOGLEFINANCE pulls live quotes into a sheet, which is great for a portfolio dashboard — but you still build the profit, ROI, and breakeven formulas yourself, and one wrong cell reference quietly corrupts every row. This page is the formula, already written.
Bottom line: your broker owns the official record of what happened. For the question you're actually asking — 'what do I take home if I sell here, and where do I break even?' — a focused calculator beats digging through the broker's menus.
Frequently Asked Questions
How do you calculate stock profit?
Profit = (sell price − buy price) × shares − buy commission − sell commission + dividends. ROI = net profit ÷ total cost × 100. Example: 100 shares bought at $50 and sold at $70 with $10 total commissions → ($70 − $50) × 100 − $10 = $1,990 profit, a 39.7% return on the $5,010 invested.
What is the breakeven price?
The per-share sale price at which the trade makes exactly $0: (buy price × shares + buy commission + sell commission − dividends) ÷ shares. Anything above it is profit. Knowing it before you set a limit order is the difference between a planned exit and a hopeful one.
Should I include dividends in the calculation?
If you want your total return, yes — a stock that paid $200 in dividends and gained $1,000 in price returned $1,200, not $1,000. The calculator adds them separately so you can see the price gain and the total side by side. Reinvested (DRIP) dividends complicate the cost basis; treat this as an estimate there.
How do broker fees change the math?
Flat commissions hit small trades hardest: $10 in round-trip fees on a $500 trade is a 2% headwind before the stock moves. Zero-commission brokers removed this for most US retail trades, but options contracts, foreign stocks, and some platforms still charge — enter whatever your broker takes.
What about taxes on the profit?
Not included — and deliberately so. Short-term vs long-term capital gains rates, your bracket, and your country all change the answer. Treat the net profit here as pre-tax; your accountant (or your broker's tax documents) handles the rest.
Can I model multiple buys at different prices?
Not in one run — this calculator models a single lot. For multiple purchases, use your average cost per share as the buy price (total spent ÷ total shares). FIFO/LIFO lot accounting for taxes is a separate question your broker tracks.
Is ROI the same as annualized return?
No. ROI is the total return over the whole holding period — 40% over 4 years is 40% ROI but roughly 8.8% annualized. For comparing trades held different lengths, convert with the CAGR formula: (1 + ROI)^(1/years) − 1.
What is a good ROI for a stock trade?
There is no single number: a single trade's ROI is meaningless without its holding period and risk. For context, the broad US market has returned roughly 10% a year long-term before inflation — so a 40% gain in 4 months is exceptional and a 40% gain in 10 years is below market. Compare trades on annualized return, not raw ROI, and compare your whole portfolio against a broad index, not against your best trade.
How do stock splits change the profit calculation?
They do not change the profit at all — they rescale both sides. In a 2-for-1 split, your 100 shares at $50 become 200 shares at $25, and the position is still worth $5,000. If you enter pre-split numbers after a split (or vice versa), the calculator will give a wildly wrong answer, so always use the buy price and share count on the same split-adjusted basis — your broker's cost-basis screen shows the adjusted figures.
How do you calculate profit on a short sale?
The mirror image: profit = (sell price − buy-back price) × shares − commissions − borrowing costs. Sell 100 shares short at $70 and buy them back at $50, and the gross gain is $2,000 — but short positions also pay stock-borrow fees for every day held, and losses are uncapped because a stock can rise without limit. This calculator models long positions; for a short, swap the buy and sell prices and subtract borrow fees from the result.
What is the wash sale rule?
If you sell a stock at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss for tax purposes and rolls it into the new position's cost basis. The calculator shows pre-tax profit and knows nothing about wash sales — so a 'loss' here may not be a deductible loss on your return. Check your broker's wash-sale flags before harvesting losses at year-end.
Do bid-ask spreads cost me anything with $0 commissions?
Yes — the spread is the hidden commission. If a stock's bid is $49.95 and ask is $50.00, buying at the ask and selling at the bid costs $0.05 per share each way: $10 round-trip on 100 shares, even at a 'free' broker. Liquid large-cap stocks have penny-wide spreads and the cost is trivial; thin small-caps can have spreads of 1% or more, which is why this calculator's commission fields should include spread cost on illiquid names.
How do reinvested dividends (DRIP) change the math?
Each reinvested dividend buys more shares, so your share count and your cost basis both rise. The clean way to model it here: use total amount invested (original purchase plus all reinvested dividends) divided by total shares held as the buy price, and count only dividends received as cash in the dividend field. Mixing reinvested dividends into both fields double-counts them — the most common DRIP bookkeeping error.
Can you show a worked example of a losing trade?
Buy 50 shares at $80 and sell at $70 with a $7 commission each way: (70 − 80) × 50 − 14 = −$514 net, a −12.83% ROI on the $4,007 invested, and a breakeven of $80.28 — the stock has to climb back above $80 just to get you whole. Losses feel smaller than they are until the commissions are added in; that is why the breakeven is above the buy price even before dividends.
How do dividends change the breakeven price?
They lower it. Buy 100 shares at $50 with a $5 buy commission and a $5 sell commission, and receive $40 in dividends: breakeven = (5,000 + 10 − 40) ÷ 100 = $49.70 — you can sell 30 cents below your buy price and still break even. Sold at $62, the same trade nets (62 − 50) × 100 − 10 + 40 = $1,230, a 24.58% ROI.
How do I model selling only part of my position?
Allocate the buy commission pro-rata. You bought 100 shares at $50 (a $5 buy commission) and sell 40 of them at $62 with a $5 sell commission: 40% of the buy commission is $2, so realized profit = (62 − 50) × 40 − 2 − 5 = $473. The remaining 60 shares keep the original $50 cost basis — run them as a separate calculation when they sell.
How do I annualize a 24.58% ROI earned over 18 months?
Use the CAGR formula: (1 + ROI)^(1/years) − 1. For 24.58% over 1.5 years that is (1.2458)^(1/1.5) − 1, about 15.8% a year. Annualizing is the only fair way to compare a quick trade against a slow one — a 24.58% gain in 18 months and a 24.58% gain in 5 years are very different results.
Does the calculator work with fractional shares?
Yes — enter decimals in the shares field. Buy 2.5 shares at $180.40 and sell at $195.20 with no commissions: ($195.20 − $180.40) × 2.5 = $37.00 profit, an 8.20% ROI. The math is identical to whole shares; the only difference is that the per-share figures are smaller and the rounding matters more, so keep two decimals on prices.
What is profit per share, and how is it different from ROI?
Profit per share is net profit divided by shares — $1,230 on 100 shares is $12.30 per share. ROI divides that profit by what you invested: $1,230 ÷ $5,005 = 24.58%. Per-share profit tells you the gain on each unit you held; ROI tells you how hard your money worked. A $12.30-per-share gain is a triumph on a $50 stock and a rounding error on a $500 one — ROI is the number that knows the difference.
Related Tools
Debt Snowball Calculator — Free debt snowball calculator: list your debts and compare snowball vs avalanche payoff pl...
Mortgage Calculator — Free mortgage calculator: estimate your monthly principal & interest payment, total intere...
PayPal Fee Calculator — Free PayPal fee calculator: enter any amount to see PayPal's fee and your net payout, or r...