Stock Profit & Loss Calculator
Find out exactly how much you made or lost on a stock trade. Enter the number of shares, your buy and sell prices, any commissions paid, and the holding period — get net profit, percentage return and annualized return instantly.
$
$
$
$
days
Net gain after all commissions
30%
ReturnCost basis
76.9%
Profit
23.1%
- 1
Total cost basis
100 × 50 + 0 = 5,000Shares × buy price, plus any purchase commission. - 2
Total proceeds
100 × 65 − 0 = 6,500Shares × sell price, minus any sale commission. - 3
Profit
6,500 − 5,000 = 1,500
How does this calculator work?
Profit = (Shares × Sell Price − Sell Commission) − (Shares × Buy Price + Buy Commission). Return % = Profit ÷ Cost Basis. Annualized return compounds that figure using the holding period in days. Enter shares, prices and fees to get net gain and both return metrics immediately.
Formula
How this is calculated
The cost basis is the total amount you paid to open the position: shares × buy price, plus any purchase commission. The proceeds are what you received when you closed it: shares × sell price, minus any sale commission. Subtracting cost from proceeds gives the net profit or loss — positive means a gain, negative a loss.
The percentage return divides that profit by the cost basis and multiplies by 100, giving you the total return regardless of position size. To compare trades held for different lengths of time on a fair basis, the annualized return raises the proceeds-to-cost ratio to the power of 365 divided by the holding period in days — the same geometric compounding used for CAGR. A 20% total return over 6 months, for example, annualizes to about 44% because compounding two such periods does not simply add them.
This calculator does not account for taxes (capital gains tax varies by jurisdiction and holding period), dividends received during the holding period, stock splits, rights issues, or margin interest. For tax reporting always use the actual figures from your brokerage statement.
Frequently asked questions
Cost basis is what you actually paid for the shares, including commissions. It is the reference point against which your gain or loss is measured, and the figure used by tax authorities to calculate taxable capital gains. If you bought shares in multiple batches at different prices, use a stock average cost calculator to find your blended cost basis.
Percentage return is the total profit as a fraction of cost, regardless of time held. Annualized return converts that total into an equivalent per-year rate using compounding. A 20% return in 6 months annualizes to about 44% — compounding two 20% returns yields 44%, not 40%.
No. It covers only price appreciation or depreciation between buy and sell. If you received dividends, add them to the proceeds manually to capture total shareholder return. Taxes and currency conversion are also outside this calculation.
Also known as
TG we-Calculate Editorial Team. (2026). Stock Profit & Loss Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/stock-calculator
TG we-Calculate Editorial Team. "Stock Profit & Loss Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/stock-calculator.
TG we-Calculate Editorial Team, "Stock Profit & Loss Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/stock-calculator
@misc{wecalculate_stock_calculator, title = {Stock Profit & Loss Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/stock-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
