Skip to main content

Stock Profit Calculator

Calculate your stock trade profit, ROI, and total return including commissions.

Last Updated: May 5, 2026
3 min read

Trade Details

$
$
$

Profit / Loss

ROI

Total Investment

A stock profit calculator helps you determine the profit, loss, and return on investment from buying and selling shares of stock. It accounts for commission fees and allows you to see both the raw dollar gain and the percentage return on your investment. Active traders, long-term investors, and anyone reviewing their portfolio performance use this tool to evaluate individual positions and understand true returns after costs.

How to Use This Calculator

  1. Enter the number of shares purchased and the price per share at purchase.
  2. Input the selling price per share.
  3. Add any commissions or fees paid on the buy and sell transactions.
  4. Review your net profit or loss, ROI percentage, and total return.

What This Calculator Measures

The stock profit calculator evaluates the financial outcome of a stock trade from purchase to sale.

  • Cost basis — Total purchase price plus buying commission.
  • Sale proceeds — Total sale amount minus selling commission.
  • Net profit or loss — Proceeds minus cost basis.
  • ROI — Net profit as a percentage of the cost basis.
  • Annualized return — The equivalent yearly return when the holding period is specified.

Formula or Logic

Cost Basis = (Shares × Buy Price) + Buy Commission

Sale Proceeds = (Shares × Sell Price) − Sell Commission

Net Profit = Sale Proceeds − Cost Basis

ROI = (Net Profit / Cost Basis) × 100

For annualized return: use the CAGR formula — (Final Value / Initial Value)^(1/Years) − 1 — to compare investments held over different time periods on a per-year basis.

Example Calculations

Example 1: Bought 100 shares at $45.00, paid $5 commission. Sold at $62.00, paid $5 commission. Cost basis: $4,505. Proceeds: $6,195. Net profit: $1,690. ROI: 37.5%.

Example 2: Bought 50 shares at $120, sold at $98 two years later. Net loss after fees: approximately $1,100. Annualized return: approximately −9.8%.

Understanding Your Results

ROI tells you how profitable the investment was in total. Annualized return lets you compare it fairly to other investments or benchmarks like the S&P 500. If your stock returned 40% over 4 years, the annualized return is about 8.8% — close to the historical average market return and worth comparing to an index fund alternative.

Common Mistakes to Avoid

  • Forgetting to include commissions and fees in the cost basis and proceeds
  • Comparing simple ROI across investments held for different periods without annualizing
  • Ignoring dividends received, which are part of total return
  • Not accounting for the tax treatment of gains — short-term vs. long-term holding period matters significantly