How to use the stock return calculator
- Enter what one share cost you in Buy price. 0 is allowed.
- Enter what one share sold for in Sell price. 0 is allowed.
- Enter how many you traded in Shares. It must be above 0, and fractional shares are allowed.
- Enter the Buy fee rate, the Sell fee rate and the Tax rate as percentages. Leave any of them at 0 to leave that item out.
- Select Calculate to see the total buy cost, the gross proceeds, the net proceeds, the profit or loss, the return and the break-even sell price.
- Select Reset example to go back to the values shown when the page opened.
The three rates are percentages, not amounts of money. Entering 0.5 means 0.5% of the trade amount, not 0.5 in currency. The values shown when the page opens are a hypothetical example chosen to show how the calculation works. This calculator holds no fee schedule and no tax rate of its own.
What the stock return means here
A stock return compares everything the purchase cost you with what actually reached you after selling. Both sides include the costs you entered, which is why the answer differs from a plain sell price minus buy price.
- Total buy cost is the buy amount plus the buy fee. This is the denominator of the return.
- Gross proceeds is the sell price multiplied by the number of shares, before anything is taken out.
- Total selling costs are the sell fee and the tax, both taken from the gross proceeds.
- Net proceeds is what is left of the gross proceeds after those selling costs.
- Profit / Loss is the net proceeds minus the total buy cost. A loss stays negative and is never flipped to a positive number.
Whenever the buy fee rate is above 0, the total buy cost is larger than the raw buy amount, so a gain comes out as a slightly smaller percentage than dividing by the raw buy amount alone would give, and a loss comes out as a slightly smaller negative percentage. With a buy fee rate of 0 the two denominators are the same and both figures match exactly. Counting the fee is deliberate: it is money you really paid to open the position.
Stock return formula
These are the formulas this calculator uses. Following them in order lets you check the result by hand.
Total buy amount = buy price × shares
Buy fee = total buy amount × buy fee rate ÷ 100
Total buy cost = total buy amount + buy fee
Gross proceeds = sell price × shares
Sell fee = gross proceeds × sell fee rate ÷ 100
Tax = gross proceeds × tax rate ÷ 100
Net proceeds = gross proceeds − sell fee − tax
Profit / Loss = net proceeds − total buy cost
Return(%) = ( profit or loss ÷ total buy cost ) × 100
Break-even sell price = total buy cost ÷ [ shares × ( 1 − ( sell fee rate + tax rate ) ÷ 100 ) ]
- Buy fee is charged on the buy side and is added to what the purchase cost you.
- Sell fee and tax are both charged on the sell side and are subtracted from the gross proceeds.
- Only the rates you enter are used. The order above is the order the calculation follows.
- A total buy cost of 0 leaves nothing to divide by, so the return is left uncalculated instead of being invented.
- Intermediate values are never rounded. Only the numbers on screen are tidied up for display.
Worked example
These are the same values the calculator shows when the page opens. They are a hypothetical example, not a real price, a real fee schedule or a real tax rate.
- Buy price 50, sell price 60, 10 shares, buy fee rate 0.5%, sell fee rate 0.5%, tax rate 1%
- Total buy amount = 50 × 10 = 500, buy fee = 500 × 0.5% = 2.5, total buy cost = 502.5
- Gross proceeds = 60 × 10 = 600, sell fee = 600 × 0.5% = 3, tax = 600 × 1% = 6
- Net proceeds = 600 − 3 − 6 = 591
- Profit / Loss = 591 − 502.5 = +88.5, a gain
- Return = (88.5 ÷ 502.5) × 100 = about 17.6119%
Notice the denominator. Dividing by the raw 500 instead of the 502.5 you really spent would give a higher figure, and that higher figure would be wrong for this trade.
Reading the break-even sell price
The break-even sell price answers a different question: at what price for one share would this trade come out exactly even? It divides the total buy cost by the number of shares adjusted for the share of each sale that leaves as sell fee and tax.
- It assumes the sell fee rate and tax rate you entered stay the same. Change either and the break-even price moves.
- Whenever the buy price is above 0 and at least one of the three rates is above 0, it sits above the buy price, because those costs have to be earned back first. With a buy price of 0 the total buy cost is 0 as well, so the break-even sell price is 0 too however high the buy fee rate is.
- When the sell fee rate and the tax rate add up to 100% or more, nothing is left from a sale however high the price, so the calculator refuses the input rather than showing a meaningless figure.
Assumptions and limitations
- The return uses the total buy cost as its denominator, not the raw buy price.
- Only the buy fee rate, sell fee rate and tax rate you enter are applied, in the order the formulas above show.
- No broker fee schedule and no statutory tax rate is assumed or filled in for you.
- Minimum fees, tiered fees, rounding rules, currency conversion and market or account specific charges are not modelled.
- A total buy cost of 0 means the return cannot be shown at all, and the profit or loss is shown on its own instead.
- A loss stays negative. It is never shown as a positive number, and the words gain, loss or no profit or loss appear alongside the figure so the state is never carried by colour alone.
- The break-even sell price uses the calculation described above and nothing else.
- No live share prices, quotes or market data are fetched. Every figure comes from what you typed.
- Results are informational estimates for planning and can differ from a real settlement statement.
- This is not investment, legal or tax advice, and no product or trade is recommended.
- Intermediate values are not rounded; only the numbers on screen are rounded for display.
- Your inputs are calculated only in this browser and are never sent to or stored on a server.
Frequently asked questions
How do you calculate a stock return?
Multiply the buy price by the number of shares, add the buy fee to get the total buy cost, then multiply the sell price by the number of shares and subtract the sell fee and the tax to get the net proceeds. The net proceeds minus the total buy cost is the profit or loss, and dividing that by the total buy cost and multiplying by 100 gives the return.
Why is the return divided by the total buy cost instead of the buy price?
Because the total buy cost is what the position actually cost you. It is the buy amount plus the buy fee you entered, and that fee is real money you paid. Dividing by the raw buy price alone would quietly overstate the return of every trade that carried a buy fee.
How are the buy fee, the sell fee and the tax applied?
The buy fee is charged on the buy amount and is added to it, so it increases the total buy cost. The sell fee and the tax are both charged on the gross proceeds and are subtracted from it, so they reduce the net proceeds. Only the rates you type in are used, in that order.
Does the calculator know my broker fees or my tax rate?
No. It holds no fee schedule and no statutory tax rate, and it never guesses one from your market, your account or the size of the trade. Check the real terms yourself and type them into the three rate boxes. Leaving a rate at 0 simply leaves that item out of the calculation.
Why is the return sometimes not calculated?
Because the total buy cost is 0, which happens when the buy price is 0 and there is therefore no buy fee either. There is nothing to divide by, so the calculator shows the profit or loss and leaves the rate uncalculated rather than inventing a 0% or an infinity.
Is a loss shown as a negative number?
Yes. A loss keeps its minus sign and the word Loss is shown next to it, and a trade that comes out exactly even is labelled No profit or loss. The state is never signalled by colour alone.
What exactly is the break-even sell price?
It is the price for one share at which the profit becomes exactly 0, assuming the sell fee rate and the tax rate you entered stay the same. It divides the total buy cost by the number of shares adjusted for the share of each sale that leaves as sell fee and tax, so it sits above the buy price whenever the buy price is above 0 and at least one of the three rates is above 0. With a buy price of 0 the total buy cost is 0 as well, so the break-even sell price is 0 too.
Why does the calculator refuse a sell fee rate and tax rate that add up to 100%?
Because at that point the whole sale price would be taken as costs, so nothing would be left however high the sell price went and no break-even sell price would exist. Rather than showing a meaningless or infinite figure, the calculator asks you to check both values.
Can I enter fractional shares?
Yes. The number of shares has to be above 0, but decimals are accepted, so a holding such as 2.5 shares works. The buy price and the sell price may each be 0, which covers shares received for nothing or a position that became worthless.
Does this page fetch live share prices?
No. Nothing is looked up anywhere. Every figure on the page comes from the values you typed, the calculation runs entirely in your browser, and your inputs are never sent to or stored on a server. Treat the result as an informational estimate for planning, not as investment, legal or tax advice.
Related calculators
Selling is only one side of holding shares. To see what a holding pays out while you keep it, the Dividend Calculator turns a dividend per share and a number of payments per year into an annual figure before and after the withholding rate you enter.
For the plainest possible comparison of cost against result, with no fees or tax in the picture at all, the ROI Calculator asks for two figures and stops there. If you bought the same share several times at different prices and need one buy price to put into this page, the Stock Average Price Calculator works out the weighted average for you.