Stock Price Calculator

Work out your profit or loss and return on a stock trade. Includes commissions, dividends, capital gains tax, break-even price, and annualized return.

https://hexacalculator.com/calculators/finance/corporate-finance/stock-price-calculator

Finance

Corporate Finance

Stock Price Calculator

Work out your profit or loss and return on a stock trade. Includes commissions, dividends, capital gains tax, break-even price, and annualized return.

Stock Price Calculator

Your trade

$
$

Add trading commissions

Most brokers are commission-free; switch this on if yours charges per trade.

Add dividends, tax and holding period

Adds the total return with dividends, the tax on the gain, and the annualised return.

Your results

$
$
$

This trade makes a profit of $2,500, a return of 50% on your $5,000 cost.

Return on investment
%
Break-even sell price
$
Loading calculator…

The stock gain calculator tool turns the details of a transaction into the really important numbers: how much you paid to buy the shares, how much you got when you sold them and the difference - your profit or loss. It also calculates the percentage return so that small gains on large positions can be compared with big gains on small positions using the same yardstick.

How to use the calculator:

Enter four pieces of information about your transaction: the number of shares you bought or sold, the price per share when you bought it, the price per share when you sold it, and any fees that were charged to buy or sell. The prices are not total amounts; they're per share. For example, if you bought 10 shares (5), then your purchase price is $5, not $50.

As most online brokers eliminated stock trading fees a few years ago, these fields can usually be set to zero. By opening the optional section you will see the return per year taking into account dividends received, taxes on gains or holding period.

The profit is calculated as follows:

The gain is simply the sale proceeds less the acquisition cost, which includes both buyer and seller's fees. The calculator first determines the acquisition cost, or the total amount actually paid to acquire the shares.

Cost=(Shares×Buy price)+Buy commission\text{Cost} = (\text{Shares} \times \text{Buy price}) + \text{Buy commission}

Next we calculate the actual sale proceeds. This is the amount you will actually receive after deducting the sales commission.

Proceeds=(Shares×Sell price)Sell commission\text{Proceeds} = (\text{Shares} \times \text{Sell price}) - \text{Sell commission}

Profit or loss is the difference between the purchase price and the selling price, and return indicates what percentage of the invested capital has been gained as profit.

Profit=ProceedsCostROI=ProfitCost×100%\text{Profit} = \text{Proceeds} - \text{Cost} \qquad \text{ROI} = \frac{\text{Profit}}{\text{Cost}} \times 100\%

A full example:

Say you buy 100 shares at $20 per share and sell them later for $25. If both the buyer and seller pay a commission of $5 on each transaction, your cost is (100) times (20) plus (5), or ($2,005). Your actual sale proceeds are (100) times (25) less (5), or ($2,495). Your profit is ($2,495) less ($2,005), or ($490). Your return on investment is 24.4%.

Step

Figure

Cost basis (100 x 20 + 5)

2,005

Proceeds (100 x 25 - 5)

2,495

Profit (2,495 - 2,005)

490

Return on investment (490 / 2,005)

24.4 percent

Break-even sell price

20.10

Break-even price:

The break-even price is the selling price per share at which there is no profit or loss after both the purchase and sale commissions have been paid. If this price is below it will result in a loss and if above it will result in a gain. It is calculated by taking the total cost of the purchase plus the sales commission, divided by the number of shares purchased.

Break-even price=Cost+Sell commissionShares\text{Break-even price} = \frac{\text{Cost} + \text{Sell commission}}{\text{Shares}}

In the example above, $2,010 divided by 100 is $20.10 per share; the ten cents added to the purchase price of $20 a share is the result of two $5 commissions divided by 100 shares.

Dividends and total income

For many stocks the price increase is only part of the return. Dividends are cash paid by the company during your holding period and must be included in the return. By entering the dividends received per share, the calculator will add them to the gain so that you can see not just the profit from the price but also the total return. For stocks that pay regular dividends this can make a big difference between a moderate increase in value and a really high return.

Capital gains tax

If you sell a stock for more than what you paid for it, that gain is considered capital gains and is usually taxed. In the United States, the tax rate depends on how long you held the stock. If the stock was held for longer than one year, then a lower long-term tax rate applies, which for many investors will be 0%, 15% or 20%. If the stock is sold within one year, that gain is considered short term capital gains and is taxed at your regular income tax rate. Losses are not taxed and can usually be used to offset other gains.

When you enter the tax rate, the calculator will apply it to the profit and show the taxable profit as well as the after-tax return. Only profits are taxed, never losses.

Why Annualized Returns Matter

A 30% gain sounds appealing but there is a big difference between making 30% over ten years and making 30% in one year. The annualized return converts the total return into a constant yearly return, and it's the only fair way to compare transactions with different holding periods.

Annualized=(Ending valueCost)1/n1\text{Annualized} = \left(\frac{\text{Ending value}}{\text{Cost}}\right)^{1/n} - 1

Here n is the number of years you held the stock and the ending value includes dividends. When you enter the holding period, the tool will calculate the result for you. The period can be entered in days, weeks, months or years so pick a unit that makes sense to you.

Elements not considered by this calculator

This is a simplified estimate of one transaction only and does not represent a full tax return. Effects such as wash sales, dividend taxes, exchange rate fluctuations are not taken into account, nor are the effects of inflation. Inflation stealthily reduces the actual value of long-term investment gains. Please check applicable tax laws and regulations and your holding periods or consult with a tax advisor for important tax questions.

This calculator is for educational and planning purposes only and does not constitute financial or tax advice. Investment returns are not guaranteed and taxes vary based on individual circumstances and applicable law. Please consult a qualified professional for all aspects that may affect your actual decisions.

Frequently asked questions

How to calculate stock profit?

You subtract the total cost from the total sale. The cost is the number of shares multiplied by the purchase price plus the purchase fees. The sale is the number of shares multiplied by the selling price minus the selling fees. For example, if you bought 100 shares at $20 each and later sold them for $25 each with a $5 fee to both the buyer and seller, then your cost would be $2,005, your sale would be $2,495, and your profit would be $490.

How high should the return on a stock investment be?

The return on an equity investment is calculated by dividing the gain by the cost and expressing the result as a percentage. There's no universal "good" value, but over the long term the US stock market has averaged about 10% annualized return, after inflation of about 7%. Comparing your own annualized return to this average can be a useful measure.

How are stock gains taxed?

Gains made from selling stocks are subject to capital gains tax. In the US, there are lower tax rates for stocks held longer than a year, typically 0%, 15% or 20%. Stocks held less than a year are usually taxed as regular income. Losses aren't taxable and can be offset against other gains. When you enter your tax rates, you'll see after-tax figures.

What is the break-even price for stocks?

It is the selling price per share at which there would be no profit or loss after both purchase and sale fees have been paid. It is calculated by adding the cost of acquisition to the sales commission and then dividing it by the number of shares purchased. If you sell a stock above this value, you will make a profit; if below, you will incur a loss.

Should dividends be included in stock returns?

If you want to find out your actual total return then this is what you should do. Dividends are cash that you receive when you own a stock, and therefore increase your return. If you enter the dividend received per share, the calculator will show both the price appreciation plus the total return including dividends.

Related calculators

Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.

References

  1. IRS: Topic No. 409, Capital Gains and Losses

    Official U.S. rules on short-term vs long-term capital gains and the rates that apply.

  2. Investor.gov: Compound Interest and Long-Term Investing

    U.S. SEC explainer on returns and compounding over time.