Beginner

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.

$

$

$

Total brokerage commission paid on purchase (0 if commission-free)

$

Total brokerage commission paid on sale (0 if commission-free)

days

Used to calculate annualized return (optional)
Profit
$1,500

Net gain after all commissions

Total cost basis
$5,000
Total proceeds
$6,500
Return on investment
30 %
Annualized return
30 %

30%

Return

Cost basis

76.9%

Profit

23.1%

Step by step
  1. 1

    Total cost basis

    100 × 50 + 0 = 5,000
    Shares × buy price, plus any purchase commission.
  2. 2

    Total proceeds

    100 × 65 − 0 = 6,500
    Shares × sell price, minus any sale commission.
  3. 3

    Profit

    6,500 − 5,000 = 1,500
Lock the current result, then change any input to compare scenarios.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. This is not financial, investment or tax advice; consult a qualified professional. Read the full disclaimer.
Quick answer

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
Profit = (Shares × Sell Price − Sell Commission) − (Shares × Buy Price + Buy Commission) | Return % = Profit ÷ Cost Basis × 100 | Annualized Return = (Proceeds ÷ Cost)^(365/Days) − 1
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

stock profit loss calculator
equity trade return calculator
stock gain calculator
investment profit calculator shares
buy sell stock calculator
stock return on investment
annualized stock return calculator

APA

TG we-Calculate Editorial Team. (2026). Stock Profit & Loss Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/stock-calculator

Chicago

TG we-Calculate Editorial Team. "Stock Profit & Loss Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/stock-calculator.

IEEE

TG we-Calculate Editorial Team, "Stock Profit & Loss Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/stock-calculator

BibTeX

@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?