Stock Profit Calculator

Calculate net dollar profit, percentage gain, and break-even exit price on completed or hypothetical stock sales.

Determine your exact bottom-line profit or loss from selling shares. Accounts for buy price, sell price, share volume, trading commissions, and accumulated dividend payouts.

How this calculator works

Net Profit = (Shares * Sell Price - Sell Commission + Dividends) - (Shares * Buy Price + Buy Commission). ROI % = (Net Profit / Total Cost Basis) * 100.

Key benefits

Assumptions & exclusions

Frequently asked questions

What is the difference between realized and unrealized stock profit?

Realized profit occurs when you actually sell your shares and lock in cash gains or losses. Unrealized (or "paper") profit is the potential gain if you were to sell at current market prices, which fluctuates continuously until closed.

Do I pay taxes on unrealized gains?

In the United States and most jurisdictions, taxes are only due on realized capital gains when an asset is sold. Unrealized gains are not subject to capital gains tax.

What is cost basis, and why does it include my buy commission?

Cost basis is the total amount you committed to the position: the shares multiplied by the buy price, plus the commission paid to buy them. Measuring profit against everything you put in, rather than the share price alone, gives the honest bottom line and is also the starting point for the tax calculation when you sell.

How do dividends change my break-even sell price?

Dividends you collected are added to your proceeds, so they lower the price at which the trade stops losing money. In effect, every dollar of dividends per share reduces the break-even sell price by about a dollar per share, after the effect of commissions. That is why an income stock can be worth holding even when its price is slightly below what you paid.

How do I find the sell price where I exactly break even?

Take your total cost basis, add the sell-side commission, subtract any dividends received, and divide by the number of shares. This calculator performs that computation for you and shows the break-even price alongside the profit result, so you can see how far the current price sits above or below your true exit line.

Does this calculator subtract taxes from my stock profit?

No. The profit and return shown are before tax. A realized gain in a taxable account is generally taxed as a capital gain, with the rate depending on how long you held the shares and on your income. An unrealized result is not taxed at all until the shares are sold.

Formula-Based Calculator · By QalcTools Editorial Team. Formulas tested against independent reference values · Content reviewed November 2026 by the QalcTools Editorial Team.

Methodology note: Gross proceeds minus net allowable cost basis under standard tax and brokerage accounting principles.

Related calculators

Category: Investments & Retirement Calculators

About this calculator

Knowing a share price rose is not the same as knowing what you made. Commissions nibble at both ends of a trade, dividends collected along the way add to the return, and the honest bottom line only appears when every cash flow is counted. This calculator does that accounting for a single stock position: you enter the buy price, the sell or current price, the number of shares, the total broker commission, and any dividends received, and it returns your cost basis, net proceeds, profit or loss in dollars, the percentage return, and the break-even sell price. Use it after closing a trade, or with the current market price to size up an open position before deciding to sell.

How it works

The tool builds the trade from both sides. On the way in, your cost basis is the shares multiplied by the buy price, plus the buy-side share of commission. On the way out, gross proceeds are the shares multiplied by the sell price; the sell-side commission is subtracted and any dividends you received are added, giving net proceeds. Profit is simply net proceeds minus cost basis, and the return percentage divides that profit by the cost basis. The page splits the single total commission figure you enter evenly between the buy and sell sides. Marking the trade as realized or unrealized only changes the label on the result — the arithmetic is identical — and a break-even price shows the sell price at which profit would have been exactly zero.

The formula, explained

Net profit = (Shares × Sell price − Sell commission + Dividends) − (Shares × Buy price + Buy commission); Return % = Net profit ÷ Cost basis × 100; Break-even = (Cost basis + Sell commission − Dividends) ÷ Shares

The engine clamps share counts, prices, commissions, and dividends at zero so negative entries cannot distort the result, and it splits the page’s single total commission input into two equal halves for the buy and sell sides. Dividends are added to proceeds rather than treated as a reduction of cost basis, which is why they also lower the break-even price. Alongside the simple return, the engine computes an annualized return by compounding the total return over the holding period — the page carries a standard one-year holding period, so for a one-year trade the annualized figure equals the simple return. Dollar results are rounded to cents and the break-even price to three decimals.

Inputs and variables

VariableMeaningExample
Buy Price per ShareWhat you paid for one share when opening the position. Multiplied by the share count, it forms the core of your cost basis.$150 per share
Sell / Current Market PriceThe price per share at sale, or today’s market price if the position is still open. It determines gross proceeds and whether the result is a gain or a loss.$185 per share
Number of SharesHow many shares the position covers. Every per-share gain, loss, commission effect, and dividend scales with this count.100 shares
Total Broker CommissionThe combined trading fees for buying and selling, which the page divides equally between the two sides of the trade. Many modern brokers charge zero, but any fee entered reduces profit directly.$10 total
Total Dividends ReceivedAll dividend cash collected while holding the shares. It is added to your proceeds, so a flat share price can still produce a profit when dividends were paid.$120
Trade StatusWhether the sale has actually closed (realized) or the result is measured at the current price on an open position (unrealized). It changes the label and the tax relevance, not the math.Realized (closed sale)

Worked example

An investor bought 100 shares at $150, later sold them at $185, paid $10 of total commission across the trade, and collected $120 of dividends while holding the shares for a year.

  1. Cost basis: 100 × $150 + $5 buy commission = $15,005.
  2. Gross proceeds: 100 × $185 = $18,500. Net proceeds after the $5 sell commission, plus dividends: $18,500 − $5 + $120 = $18,615.
  3. Net profit: $18,615 − $15,005 = $3,610.
  4. Return on investment: $3,610 ÷ $15,005 × 100 ≈ 24.06%. Because the holding period is one year, the annualized return is also 24.06%.
  5. Break-even sell price: ($15,005 + $5 − $120) ÷ 100 = $148.90 — the dividends and the price gain together meant the shares could have been sold well below the $150 purchase price without losing money.

A net profit of $3,610 on a $15,005 cost basis — a 24.06% return — with net proceeds of $18,615 and a break-even sell price of $148.90.

The headline price move ($150 to $185, up 23.3%) and the true return (24.06%) differ because dividends added $120 while commissions cost only $10; on a small account with higher fees the gap would run the other way. The break-even figure is the practical takeaway for an open position: thanks to the dividends already banked, this investor’s real risk line sat below the purchase price, not at it. Taxes are not part of this result and would reduce a realized gain further.

Understanding your results

Profit in dollars and return in percent answer different questions. The dollar figure tells you what the trade added to your account; the percentage tells you how hard the committed capital worked, and it is the only fair way to compare a 100-share trade with a 10-share one. The cost basis line is the denominator behind that percentage, which is why two investors in the same stock at different buy prices can honestly report very different returns.

The break-even price quietly reframes an open position. Once dividends are banked and commissions are known, the price at which you stop making money is usually not your buy price. Watching the gap between the market price and break-even — rather than the gap to your purchase price — keeps decisions anchored to the trade’s actual economics instead of to an emotional reference point.

Assumptions and limitations

This is a single-position, cash-flow summary: it assumes one buy and one sell at the prices entered, so it does not blend multiple purchases at different prices, partial sales, stock splits, or spin-offs into the basis. Margin interest, borrow fees for short positions, bid-ask spreads, and any price movement between deciding to sell and the executed fill are outside the calculation unless you fold them into the commission figure. Results are shown before tax; a realized gain may be taxable, and the rate depends on holding period and income, which this tool does not compute. Dividend figures are taken as entered, with no adjustment for return-of-capital distributions or foreign withholding.

Common mistakes to avoid

Sources