Skip to content

Stock Profit Calculator

Enter how many shares you bought and the prices you bought and sold at to see your profit or loss and return. Advanced adds fees, dividends, dates, tax, short selling and foreign currency.

More options
Your currency
Type of trade
$
$
Fees
$
$
$
$
%

Enter your own rate; tax rules vary by country and holding time.

%
Is the stock priced in another currency?

How much of your currency 1 unit of the stock's currency was worth on each day. Prices, fees and dividends above are in the stock's currency.

ResultUpdates as you type—Profit————————————

For learning and planning only; this is maths, not investment or tax advice.

How your stock profit is worked out

Profit = what you got when you sold − what you paid, after fees.

  1. 1

    What you paid

    100 × $50.00= $5,000

  2. 2

    What you got

    100 × $65.00= $6,500

  3. 3

    Take one from the other

    $6,500 − $5,000= $1,500 profit

  4. 4

    Return %

    $1,500 ÷ $5,000= +30.00%

Read more: the formula, a worked example, short selling, fees, tax and currency

Your stock profit is what you got when you sold, minus what you paid, after every fee. The return % compares that profit with the money you put in, so you can compare trades of any size. Add the dates you bought and sold to see the return as a yearly rate.

The formula

what you paid = shares × buy price + buy commission
what you got = shares × sell price − sell commission
profit = what you got − what you paid + dividends − other fees
return % = profit ÷ what you paid × 100
annualised return = (1 + return %)^(1 ÷ years held) − 1
profit after tax = profit − profit × your tax rate (no tax on a loss)
break-even sell price = (what you paid − dividends + other fees + flat sell fee) ÷ shares, or ÷ (shares × (1 − sell fee %)) for a % fee
target sell price = (what you paid × (1 + target %) − dividends + other fees + flat sell fee) ÷ shares

A commission given as a % is that share of the trade value: 0.5% of a 5,000 buy is 25. Write % as decimals in the formulas: 20% is 0.20.

Worked example

You buy 100 shares at $50 and sell them at $65. You paid 100 × 50 = $5,000 and got 100 × 65 = $6,500, so your profit is 6,500 − 5,000 = $1,500. The return is 1,500 ÷ 5,000 × 100 = 30%. With no fees you break even at your buy price, $50, and to make a 20% profit you would sell at 5,000 × 1.2 ÷ 100 = $60.

You bought on 1 January 2024 and sold on 1 January 2026, exactly 2 years (731 days). The annualised return is (1.30)^(1 ÷ 2) − 1 = 1.140175 − 1 = 14.02% a year, a little less than 30 ÷ 2 = 15% because growth compounds.

Adding fees and tax

Now say each trade cost a $10 commission. You paid 5,000 + 10 = $5,010 and got 6,500 − 10 = $6,490, so the profit is 6,490 − 5,010 = $1,480, a return of 1,480 ÷ 5,010 × 100 = 29.54%. Break-even is (5,010 + 10) ÷ 100 = $50.20. If your tax rate on the gain is 15%, the tax is 1,480 × 0.15 = $222 and you keep $1,258 (25.11%).

Short selling

In a short sale you sell borrowed shares first and buy them back later, hoping the price falls. Sell 100 short at $65 ($6,500) and buy back at $50 ($5,000): the profit is 6,500 − 5,000 = $1,500, a return of 1,500 ÷ 6,500 = 23.08% on the value you shorted. Any dividend paid while you are short is owed to the lender, so it is taken off. If the price rises, you lose: buying back at $80 costs $8,000, a loss of $1,500, and there is no limit to how high the price can go. Margin interest and borrowing fees go in Other fees.

Selling only part

If you bought 100 shares with a $10 commission and sell 40 of them, 40 ÷ 100 of the buy commission ($4) goes with the shares you sold. The 40 cost 40 × 50 + 4 = $2,004. Selling them at $65 with a $5 fee brings in 2,600 − 5 = $2,595, a profit of $591. The 60 shares you still hold cost 3,000 + 6 = $3,006.

Foreign stocks and exchange rates

For a share priced in another currency, enter prices in that currency and the rate on each day (how much of your currency 1 unit was worth). Buying 100 at $50 when $1 = ₹80 cost 5,000 × 80 = ₹4,00,000. Selling at $65 when $1 = ₹85 brings in 6,500 × 85 = ₹5,52,500. The profit is ₹1,52,500 (38.13%), of which 6,500 × (85 − 80) = ₹32,500 came from the rate moving. Dividends and other fees are converted at the sell-day rate.

Return on 5,000 at different sell prices

Sell priceYou getProfit or lossReturn
$40$4,000−$1,000−20%
$50$5,000$00%
$55$5,500$50010%
$65$6,500$1,50030%
$75$7,500$2,50050%
$100$10,000$5,000100%

A fall and a rise of the same % don't cancel out: after a 20% fall from $50 to $40, the price must rise 25% to get back to $50.

This is maths for learning and planning, not investment or tax advice. Tax on gains depends on your country, how long you held the shares and your income, so the calculator uses whatever rate you enter and does not apply any country's rules. To find your average price across several buys, use the stock average calculator.

Common questions

How do I calculate profit on a stock?

Multiply the number of shares by the price you sold at, take away any selling fee, then take away what you paid (shares × buy price plus the buying fee). 100 shares bought at 50 and sold at 65 is 6,500 − 5,000 = a 1,500 profit.

How do I work out the return % on a stock?

Divide the profit by what you paid and multiply by 100. A 1,500 profit on 5,000 is 1,500 ÷ 5,000 × 100 = 30%. Include fees and dividends in the profit for your true return.

What is the annualised return?

It is the steady yearly growth rate that would turn what you paid into what you ended with over the time you held the shares. 30% over exactly 2 years is (1.30)^(1 ÷ 2) − 1 = 14.02% a year, not 15%, because growth compounds.

How is profit worked out on a short sale?

You sell borrowed shares first and buy them back later. Profit = what the short sale brought in − what buying back cost − fees − any dividends you had to pay the lender. Selling 100 short at 65 and buying back at 50 makes 6,500 − 5,000 = 1,500. If the price rises instead, the loss has no upper limit.

What is the break-even price?

The sell price at which you neither make nor lose money once all fees are paid. With 5,000 paid for 100 shares and a 10 selling fee, you break even at (5,000 + 10) ÷ 100 = 50.10 a share.

How much tax will I pay on my stock profit?

It depends on your country, how long you held the shares and your income. Enter your own rate and the calculator takes it off any gain. A loss is not taxed and may be usable against other gains, depending on local rules.

Related calculators

Stock average calculatorYour average cost from several buys, with fees, sells, profit or loss, break-even, and the shares or price needed to average down to a target. Works for crypto and fund units too.CAGR calculatorCompound annual growth rate from start and end values or dates, plus end value, time to a target, XIRR for irregular deposits and two investments compared.Dividend calculatorDividend yield, income per payment and per month, yield on cost, the investment needed for a target income and a DRIP projection with dividend and price growth.ROI calculatorReturn on investment and annualised ROI, with fees, tax, payback, a target ROI, marketing ROI and ROAS, and up to three investments compared.

Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

Embed this calculator on your site

Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

Stock profit calculator by Zulu Calculator ↗