Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Total Profit/Loss

    Total Profit/Loss: Stock Price Percent Gain/Loss Calculator

    Profit per share times number of shares (Shares defaults to 1 if blank)

Advertisement

Results

Percent Gain / Loss
25%
change from buy price
Profit / Loss per Share $25
Total Cost $100
Total Value at Sale $125
Total Profit / Loss $25

What This Calculator Does

The Stock Price Percent Gain/Loss Calculator tells you how much your investment moved in percentage terms between the price you paid (buy price) and the price you sold at (sell price). It also shows your profit per share and your total profit or loss if you enter the number of shares you held. This is a universal financial math tool — it works for any currency, market, or jurisdiction.

How to Use It

Enter the price you bought the stock at, the price you sold it at, and optionally the number of shares you owned. The calculator returns the percentage change as well as the dollar figures. A positive result is a gain; a negative result is a loss. If you only care about the percentage, leave shares as 1.

The Formula Explained

The core formula is straightforward: subtract the buy price from the sell price to get the dollar change, divide that by the original buy price, and multiply by 100 to convert to a percentage. Dividing by the buy price (your starting basis) is what makes the result a true percentage change rather than just a dollar difference.

$$\text{pct} = \frac{\text{sellPrice} - \text{buyPrice}}{\text{buyPrice}} \times 100$$

Diagram showing buy price and sell price on a number line with the difference between them
The percent change is the price difference divided by the buy price.

Worked Example

Suppose you bought shares at $100 and sold at $125, holding 10 shares. The change is \(\$125 - \$100 = \$25\) per share. Divided by $100 gives 0.25, and multiplied by 100 gives a 25% gain. Your profit per share is $25, and across 10 shares your total profit is $250. Your total cost was $1,000 and your total value at sale was $1,250.

$$\text{pct} = \frac{125 - 100}{100} \times 100 = 25\%$$

Two price tags with an upward arrow and percent symbol illustrating a stock gain
A higher sell price than buy price results in a positive percent gain.

FAQ

Does this account for fees or taxes? No. It shows the raw price-based gain or loss. Subtract brokerage commissions and any capital gains tax separately for your net return.

Can it show a loss? Yes. If your sell price is below your buy price, the percentage and dollar figures will be negative, indicating a loss.

What if I reinvested dividends? This tool only uses price. For total return including dividends, add the dividends received to your sell value before calculating.

Last updated: