Stock Profit Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free stock profit calculator. Enter shares, buy and sell prices, commissions and dividends to see your profit or loss, return and annualized return.

Return
0
Annualized return
0
Total cost
0
Sale proceeds
0
Break-even sell price
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the stock profit calculator

  1. Enter the number of shares you bought.
  2. Enter the buy price and sell price per share. To see a hypothetical result, enter a target sell price.
  3. Enter the commissions you paid to buy and to sell, if any. Many brokers now charge no commission on stock trades, so you can leave these at zero.
  4. Enter any dividends you received while you held the shares.
  5. Enter how many years you held the shares if you'd like the annualized return.

The stock profit calculator shows your profit or loss, your return as a percentage, the annualized return, the total cost of the purchase, the proceeds from the sale, and the break-even sell price.

How stock profit is calculated

The stock profit calculator uses these formulas:

  • Total cost = shares × buy price + buy commission
  • Sale proceeds = shares × sell price − sell commission
  • Profit or loss = sale proceeds − total cost + dividends
  • Return = profit ÷ total cost × 100

For example, if you buy 100 shares at 50 with a 5 commission, your total cost is 5,005. If you sell them at 65 with another 5 commission, your proceeds are 6,495. Your profit is 6,495 − 5,005 = 1,490, a return of about 29.8%.

Annualized return

A 29.8% return sounds very different if you earned it in six months or in six years. The annualized return converts your total return into an equivalent yearly rate, so you can compare investments held for different lengths of time:

Annualized return = ((total cost + profit) ÷ total cost)^(1 ÷ years) − 1

In the example, if you held the shares for two years, the annualized return is about 13.9% a year. If you held them for six years, it's about 4.4% a year. The same calculation is used by the CAGR calculator, which works out compound annual growth for any investment.

Break-even price

The break-even sell price is the price at which you'd neither gain nor lose after commissions and dividends:

Break-even = (total cost + sell commission − dividends) ÷ shares

In the example, the break-even price is (5,005 + 5) ÷ 100 = 50.10. Commissions mean you need the price to rise a little above your purchase price before you make any money. Dividends work the other way, lowering the price you need to break even.

A losing trade

Suppose you buy 50 shares at 120 with a 4.95 commission and sell at 105 with the same commission, having received 90 in dividends.

  1. Total cost: 50 × 120 + 4.95 = 6,004.95.
  2. Proceeds: 50 × 105 − 4.95 = 5,245.05.
  3. Profit: 5,245.05 − 6,004.95 + 90 = −669.90.
  4. Return: −669.90 ÷ 6,004.95 ≈ −11.2%.
  5. Break-even price: (6,004.95 + 4.95 − 90) ÷ 50 ≈ 118.40.

Enter these figures in the stock profit calculator to see the same results. It's a useful reminder that dividends softened the loss, and that the stock would have to recover to about 118.40 for you to break even.

Bought at different prices?

If you bought shares in several purchases at different prices, first work out your average cost per share with the stock average calculator, then enter the total number of shares and the average price in the stock profit calculator. Include all the buy commissions in the buy commission box.

Selling part of a position

If you sell only some of your shares, enter only the shares you're selling and the matching share of the buy commission. For tax purposes, how your cost is calculated for a partial sale depends on your country's rules, such as average cost, first in first out, or specific share identification. Your broker's statement or tax form will show the official figure.

Taxes

The stock profit calculator shows profit before tax. In many countries, gains on shares are taxed as capital gains, often at different rates depending on how long you held the shares. In the US, for example, gains on shares held for more than a year are usually taxed at lower long-term rates than gains on shares held for a year or less. Dividends may be taxed too. Some accounts, such as retirement accounts, shelter gains from tax. Because rules vary, check with a tax adviser or your tax authority.

Who uses a stock profit calculator

Individual investors use it to check the result of a trade, plan a target price, or see how much a stock needs to rise to recover a loss. Traders use it to compare the effect of commissions on small and large trades. Teachers and students use it to learn how returns, costs and dividends fit together.

Treat ad spend like any other investment

A Google Ads budget should be judged the way you judge any investment: by what it returns, in dollars. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.

How much does a stock need to rise to recover a loss?

Losses and gains aren't symmetrical. If a stock falls 20%, it needs to rise 25% to get back to where it started, because the rise is calculated on a smaller base. A 50% fall needs a 100% rise to recover. You can use the stock profit calculator to see this: enter your buy price and try different sell prices to find the one that brings your profit back to zero.

Fall Rise needed to recover
10% 11.1%
20% 25%
30% 42.9%
50% 100%
75% 300%

Total return versus price return

The price return only looks at the change in the share price. The total return also includes dividends. For dividend-paying companies, dividends can make up a large part of the long-term return, so leaving them out understates how well an investment did. The stock profit calculator includes dividends you enter, giving you the total return. To see how reinvesting dividends would have changed the result, try the dividend reinvestment calculator.

Currency effects

If you bought shares in a foreign currency, your profit in your own currency also depends on how the exchange rate moved. A stock that rose 10% in its own currency could show a smaller gain, or even a loss, in yours if that currency weakened. To include this, convert the buy price at the exchange rate on the purchase date and the sell price at the rate on the sale date, then enter both converted prices in the stock profit calculator.

Common mistakes

  • Forgetting commissions and fees, especially on small trades where they matter most.
  • Ignoring dividends, which understates your total return.
  • Comparing total returns over different periods without annualizing them.
  • Treating profit before tax as money in your pocket.

Short selling

The stock profit calculator is designed for buying first and selling later, which is how most people invest. With short selling, you sell borrowed shares first and buy them back later, hoping the price falls. The profit is reversed: you gain if the price falls and lose if it rises. To estimate a short trade, enter the price you bought back at as the "buy price" and the price you sold at as the "sell price". Short positions also carry borrowing fees and, in some cases, dividend payments to the lender, which you can include as commissions. Losses on short trades can be larger than the original amount, because there's no limit to how far a price can rise.

Setting a target price

Many investors decide in advance at what price they'd take a profit or cut a loss. Enter your buy price and try different sell prices in the stock profit calculator until the return matches your goal. For example, if you want a 20% return on 100 shares bought at 50 with no fees, you need a sell price of 60. If you'd like to limit a loss to 10%, you'd sell at 45. Having these numbers written down before you trade can help you stick to a plan instead of reacting to every move in the price.

Comparing with a benchmark

A profit on its own doesn't tell you whether a trade was good. If the stock gained 8% in a year when the overall market gained 20%, a simple index fund would have done better. Many investors compare their annualized return from the stock profit calculator with a broad market index over the same period. Doing this regularly shows whether picking individual stocks is actually adding value, after costs, compared with a low-cost fund that tracks the whole market.

Record keeping

Keep a simple record of every trade: the date, the number of shares, the prices, the commissions and any dividends. It makes tax time easier, helps you check your broker's statements, and lets you use the stock profit calculator to review how your decisions turned out over months and years.

Sources and further reading

  • Rate of return on Wikipedia: simple and annualized returns.
  • Capital gain on Wikipedia: how gains on investments are defined and taxed.
  • Investor.gov (SEC): Stocks, how shares work and their risks.

Frequently asked questions

How do I calculate profit on a stock?

Subtract the total cost (shares × buy price + commission) from the sale proceeds (shares × sell price − commission), and add any dividends.

How do I calculate the return on a stock?

Divide the profit by the total cost and multiply by 100.

What is annualized return?

The yearly rate that would produce the same total return over the holding period, so you can compare investments held for different lengths of time.

Does the stock profit calculator include taxes?

No. It shows the profit before tax.

Can I use it for crypto or funds?

Yes. The same arithmetic works for any asset bought and sold at a price, such as funds, ETFs or cryptocurrencies.

Is the stock profit calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep