The gap between a stock’s purchase and sale prices is only part of your result. Trading costs can reduce what you receive and increase what you invested. Before working through an example, it helps to define the amount that the return percentage is measured against.
The formula for a stock return
This example assumes you sell all the shares entered at one sale price. Total purchase cost is purchase price times shares, plus purchase-side costs. Net sale proceeds are sale price times shares, minus sale-side costs. The difference is your profit or loss. Divide that difference by total purchase cost to find the percentage return.
Profit or loss = (sale price × shares − sale costs) − (purchase price × shares + purchase costs)
Return % = profit or loss ÷ (purchase price × shares + purchase costs) × 100
Using purchase cost as the denominator matters. If you pay a commission to buy, that amount is part of what you put into the trade. Costs vary by broker and market, so this example uses fixed amounts solely to show the arithmetic.
Example: 20 shares bought at $50 and sold at $60
Suppose you buy 20 shares for $50 each and later sell all 20 for $60 each. For this illustration, enter $5 in total purchase costs and $5 in total sale costs. These are sample figures, not a claim about what a broker will charge.
The shares cost $1,000 before fees. Adding the purchase cost brings your total investment to $1,005. The sale brings in $1,200 before fees, or $1,195 after the sale cost. Your profit is therefore $190. Dividing $190 by $1,005 gives a return of 18.91% when rounded to two decimal places.
If both costs were zero, the same price move would produce $200 profit and a 20% return. The difference shows why a price-only calculation can overstate the outcome.
What sale price would break even?
Break-even means the sale covers both the purchase cost and the cost of selling. If the sale cost stays fixed, the per-share price is (total purchase cost + sale cost) ÷ shares. In the example, ($1,005 + $5) ÷ 20 is $50.50 per share. Actual costs may change with order value, and permitted price increments vary by market, so treat this as an estimate.
When the simple formula is not enough
You can use an average purchase price if it covers all the shares entered here. Partial sales, earlier disposals, and a brokerage’s cost-basis method may produce a different account statement. If another purchase changes your average price, calculate that first with our average cost calculator.
The formula does not automatically account for dividends, currency conversion, borrowing costs, holding periods, or tax rules. Known transaction costs can be entered, but the result is not a tax-reporting figure. An expected sale price is an assumption, not a future quote or a guaranteed execution price.
Enter the purchase price, expected sale price, share count, and costs to see profit, return percentage, and a break-even sale price.
Open the stock return calculator →This article explains arithmetic and does not recommend buying or selling a security. Check your brokerage’s fee schedule for the costs that apply to you.