Return math

Stock Profit Calculator

Enter what you paid, what you sold for (or today's price), the number of shares and any fees to get your stock gain or loss, percentage return and break-even sale price. Add dividends received to see your total gain, and dates to see an annualized return.

Want how a ticker performed between two dates from price history instead? Use the Stock Return Calculator.

Free calculator

Calculate stock profit or loss

Optional. Total dividends paid to you while you held the shares, in dollars.

Profit or loss
$1,250.00
25% return on a $5,000.00 cost basis. Break-even sale price $100.00.
Cost basis
$5,000.00
Net proceeds
$6,250.00
Percentage return
25%
Annualized return
Add valid dates
Gain per share
$25.00
Break-even sale price
$100.00
Recovers your cost and both fees.

Price context

Loaded security
Manual scenario
Loaded current price
Manual
Gross purchase value
$5,000.00
Holding period
Add valid dates

Ticker lookup only preloads the sale/current price. Purchase price, shares, fees, dividends, and dates stay manual.

Formula

Profit = net proceeds - cost basis

Return % = profit / cost basis

Break-even = (cost basis + sell fees) / shares

Total gain = profit + dividends received

Annualized return appears only when the sale date is after the purchase date and the cost basis is positive.

How to use the Stock Profit Calculator

  1. Enter your purchase price, sale or current price, and number of shares. Loading a ticker fills the current price.
  2. Add buy and sell fees if you paid any, and the total cash dividends you received while holding.
  3. Add purchase and sale dates to see an annualized return.

How the calculation works

The calculator compares what you paid for a position with what the position is worth at a sale or current price. Fees are included so the result reflects the full cash cost and net proceeds you entered. Dividends are kept separate: the trading gain or loss is the price result after fees, and the total gain adds the dividends on top.

Formula

Cost basis = purchase price x shares + buy fees

Net proceeds = sale price x shares - sell fees

Profit = net proceeds - cost basis

Break-even sale price = (cost basis + sell fees) / shares

Total gain = profit + dividends received

Break-even after dividends = (cost basis + sell fees - dividends) / shares

Annualized return = (net proceeds / cost basis)^(365 / days held) - 1

Input definitions

Purchase price
The price paid per share when the position was opened.
Sale/current price
The realized sale price or the current market price for an unrealized scenario.
Shares
The number of shares in the position.
Fees
Optional trading costs included in cost basis or proceeds.
Cash dividends received
Optional. The total dividends paid to you while you held the shares, in dollars.
Dates
Optional dates used only for annualized return.

Worked example

Share profit with fees: you buy 50 shares at $100 and sell at $125, paying $10 on each side. Cost basis is $5,010 and net proceeds $6,240, so the stock gain is $1,230, about 24.6% on your cost basis, and the break-even sale price is $100.40.

If those shares also paid $100 of dividends while you held them, the total gain is $1,330 and the break-even price after dividends falls to $98.40, because the dividends already returned part of your cost.

Stock loss example: you buy 100 shares at $50 and sell at $42, again with a $5 fee each way. Cost basis is $5,005 and net proceeds $4,195, a loss of $810 or about 16.2%. You would have needed to sell at $50.10 just to break even.

What the results mean

  • Profit and percentage return describe the whole position after fees; gain per share spreads it over each share.
  • Break-even sale price is the price that recovers every dollar paid, fees on both sides included. Break-even after dividends is lower by the dividends per share you already received.
  • Total gain with dividends adds cash income to the trading result. Its annualized figure treats dividends as paid on the sale date, so it is an approximation, not a money-weighted return.

Assumptions and limitations

  • A single purchase and a single sale; partial sales and multiple lots are not modeled.
  • Taxes are not deducted.
  • Dividends are entered as one cash total and are not reinvested.
  • Annualized return appears only when the sale date is after the purchase date and the cost basis is positive.
  • Every price is one you enter. To see how a ticker performed between two dates from price history, use the Stock Return Calculator.

Stock Profit Calculator FAQ

How do you calculate stock profit?

Stock profit is net proceeds minus cost basis. Cost basis equals purchase price times shares plus buy fees. Net proceeds equals sale or current price times shares minus sell fees.

Does this calculator include fees?

Yes. Buy fees are added to cost basis and sell fees are subtracted from proceeds, so the profit or loss reflects the fee inputs you enter.

When does annualized return appear?

Annualized return appears only when valid purchase and sale dates are entered, the sale date is after the purchase date, and the cost basis is positive.

Can I use current price instead of sale price?

Yes. Enter the current price as the sale/current price to calculate an unrealized gain or loss scenario.

Does the stock gain include dividends?

Only if you enter them. The trading gain or loss is the price result after fees. Enter the total cash dividends you received and the calculator also shows a total gain including that income and a lower break-even price.