Stock Profit Calculator Methodology

How the stock profit calculator works out profit or loss and return % on a share trade, annual return (CAGR), target and stop-loss prices, and the gain needed to recover a loss.

By Last updated:

Formula

Profit = (S − B) × Q − C    |    Return % = Profit ÷ (B × Q) × 100    |    CAGR = (S ÷ B)^(1 ÷ n) − 1    |    Gain needed = 100 ÷ (100 − L) − 1

Variables

SymbolNameDescription
BBuy pricePrice paid per share. Use the weighted average if bought in parts, and the split/bonus-adjusted price after a corporate action.
SSell pricePrice received per share, or the current price for an open position.
QQuantityNumber of shares.
CChargesTotal brokerage, STT, exchange fees, SEBI fees, GST, stamp duty and DP charges from the contract note. Optional; 0 if blank.
nYears heldHolding period in years, used for CAGR.
LLoss %Percentage fall from the buy price, used for loss recovery.
T, SLTarget %, Stop-loss %Target price = B × (1 + T ÷ 100); stop-loss price = B × (1 − SL ÷ 100); risk-reward = T ÷ SL.

Worked example

40 shares bought at ₹1,250 and sold at ₹1,480 with ₹60 charges: profit = (1,480 − 1,250) × 40 − 60 = ₹9,140; return = 9,140 ÷ 50,000 × 100 = 18.28%. Nifty 50 from 8,296 (11 Nov 2016) to 25,144 (13 Nov 2026): total return 203.09%, CAGR = (25,144 ÷ 8,296)^(1/10) − 1 = 11.73%. A 30% loss needs 100 ÷ 70 − 1 = 42.86% to recover.

Assumptions and limitations

Every model leaves something out. Here is what this calculator assumes, and what it does not model, so you can interpret the output honestly:

  • Price return only: dividends are excluded unless added to the sell value.
  • Income tax (STCG/LTCG, or business income for intraday) is not deducted.
  • Charges are a single total entered by the user, not computed from a broker's tariff.
  • CAGR assumes a single buy and a single sell; for staggered buys or sells, XIRR is the correct measure.
  • Target and stop-loss prices are arithmetic on the buy price, not forecasts.

Authoritative sources

Where the formula, rates, or framework come from:

Try it now

Plug in your own numbers in the Stock Profit Calculator and see the formula applied in real time.

Open Stock Profit Calculator
This methodology page is for educational purposes only. Calculations are estimates; real-world results vary with taxes, fees, expense ratios, and market conditions. Yadav Patle is not a SEBI-registered investment adviser. For personalised advice, consult a registered adviser.