acalculator

What will my stock trade make?

Work out a trade’s profit and return, or work back from a goal to the sell price or the number of shares you need.

Your numbers

Find the
Commissions
Profit
$1,000.00

100 shares bought at $50.00 and sold at $60.00 make $1,000.00, a 20% return.

Return
20%
Total cost
$5,000.00
Net sale proceeds
$6,000.00
Break-even sell price
$50.00

Profit: $1,000.00. 100 shares bought at $50.00 and sold at $60.00 make $1,000.00, a 20% return.

The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use

How to calculate

Works out the profit and return of a stock trade from the shares and the buy and sell prices, or the sell price for a target return or profit, or the shares for a target profit, with commissions.

Example with the default inputs (Find the Profit, Number of shares 100, Buy price per share $50.00, Sell price per share $60.00, Commission to buy $0.00, Commission to sell $0.00): 100 shares bought at $50.00 and sold at $60.00 make $1,000.00, a 20% return.

Method: Profit = (shares × sell price − commission to sell) − (shares × buy price + commission to buy); return = profit ÷ (shares × buy price + commission to buy) × 100. For a target, the same equation is solved for the sell price or the shares.

  • Prices are what you type; nothing is looked up.
  • Commissions are dollar amounts for the whole trade.
  • Taxes and dividends are not included. This is an estimate, not investment advice.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Find the Profit, Number of shares 100, Buy price per share $50.00, Sell price per share $60.00 gives Target profit $1,000.00, Target return 20%, Total cost $5,000.00, Net sale proceeds $6,000.00, Break-even sell price $50.00.Source: IRS Publication 550: gain = amount realized minus basis (https://www.irs.gov/publications/p550)
  2. Find the Sell price, Number of shares 200, Buy price per share $25.50, Target Return (%), Target return 20%, Commission to buy $5.00, Commission to sell $5.00 gives Sell price per share $30.66, Target profit $1,021.00, Target return 20%, Total cost $5,105.00, Break-even sell price $25.55.Source: IRS Publication 550, basis includes the commission to buy and the amount realized is net of the commission to sell (https://www.irs.gov/publications/p550)
  3. Find the Sell price, Number of shares 40, Buy price per share $80.00, Target Profit ($), Target profit $500.00, Commission to buy $1.00, Commission to sell $1.00 gives Sell price per share $92.55, Target return 15.620119%, Net sale proceeds $3,701.00.Source: IRS Publication 550, basis and amount realized (https://www.irs.gov/publications/p550)
  4. Find the Shares, Buy price per share $12.00, Sell price per share $15.00, Target profit $1,500.00 gives Number of shares 500, Target return 25%, Total cost $6,000.00.Source: IRS Publication 550, gain on a sale (https://www.irs.gov/publications/p550)

How the stock calculator works

All money is worked out in exact decimal arithmetic from the numbers as typed, and each result becomes a number once. An empty commission counts as $0. With n shares, buy price B, sell price S, commission to buy F₁ and commission to sell F₂:

  • Total cost = n × B + F₁.
  • Net sale proceeds = n × S − F₂.
  • Profit = net sale proceeds − total cost.
  • Return = profit ÷ total cost × 100.
  • Break-even sell price = (total cost + F₂) ÷ n.

Find the profit (the default) uses the shares and both prices.

Find the sell price uses the shares, the buy price and a target:

  • a target return R: target profit = total cost × R ÷ 100;
  • or a target profit P typed in dollars.

Then S = (total cost + target profit + F₂) ÷ n. A sell price below $0 or over $10 million a share is no answer.

Find the shares uses both prices and a target profit P: n = (P + F₁ + F₂) ÷ (S − B). There is no answer when S = B (the profit is then −F₁ − F₂ for any shares), when n comes out 0 or less (P + F₁ + F₂ and S − B have opposite signs, or P + F₁ + F₂ is 0), or when n is over 1 billion. A loss target works too: with S below B, n = (P + F₁ + F₂) ÷ (S − B) is positive when P + F₁ + F₂ is negative.

Limits. Shares above 0 and at most 1 billion; a buy price above $0 and a sell price from $0, both at most $10 million a share; commissions from $0 to $1 million; a target return from −100% to 100,000%; a target profit within ±$1 trillion. A result that is not a finite number is no answer.

Display. Money to the cent, rounded half up from the exact value (so $30.655 shows as $30.66); the return to 2 decimals; shares to at most 4 decimals.

Assumptions

  • Every price is one you type; nothing is looked up.
  • Commissions are dollar amounts for the whole trade.
  • Taxes and dividends are not included. This is an estimate, not investment advice.

Worked examples by hand

The profit of a trade. 100 shares at $50, sold at $60, no commissions. Total cost = $5,000, net sale proceeds = $6,000, profit = $1,000, return = 1,000 ÷ 5,000 = 20%, break-even = $50.

The sell price for a 20% return. 200 shares at $25.50, $5 each way. Total cost = 200 × 25.50 + 5 = $5,105. Target profit = 5,105 × 0.20 = $1,021. Sell price = (5,105 + 1,021 + 5) ÷ 200 = $30.655, shown as $30.66. Break-even = (5,105 + 5) ÷ 200 = $25.55.

The sell price for a $500 profit. 40 shares at $80, $1 each way. Total cost = $3,201. Sell price = (3,201 + 500 + 1) ÷ 40 = $92.55. Net sale proceeds = 40 × 92.55 − 1 = $3,701; return = 500 ÷ 3,201 = 15.62%.

The shares for a $1,500 profit. Bought at $12, sold at $15, no commissions. Shares = 1,500 ÷ 3 = 500. Total cost = $6,000; return = 1,500 ÷ 6,000 = 25%.

Other questions people ask

How do I use the stock calculator?

Choose what to find. For the profit, enter the shares, the buy price and the sell price: 100 shares bought at $50 and sold at $60 make $1,000, a 20% return. For a sell price, enter the shares, the buy price and a target return or profit. For the shares, enter the two prices and the profit you want.

What sell price do I need for a 20% return?

Take the total cost (shares × buy price + commission to buy), add the target profit (20% of that cost) and the commission to sell, and divide by the shares. For 200 shares at $25.50 with $5 each way: cost $5,105, profit $1,021, sell price (5,105 + 1,021 + 5) ÷ 200 = $30.655, shown as $30.66.

How many shares do I need to make a certain profit?

Divide the profit you want, plus both commissions, by the gain per share (sell price − buy price). To make $1,500 when a stock goes from $12 to $15, you need 1,500 ÷ 3 = 500 shares. If the sell price is not above the buy price, no number of shares makes a profit.

Why is the return lower than the price change?

The return counts the commissions: the profit is after both commissions, and the cost includes the commission to buy. Without commissions the two are equal. The stock profit calculator also adds dividends, dates and the holding period.

Does the calculator use real stock prices?

No. Every price is one you type, so it works for any stock, ETF or share on any exchange, and your numbers never leave the page.

What is the break-even sell price?

It is the sell price at which the trade makes exactly $0 after both commissions: (total cost + commission to sell) ÷ shares. With no commissions it is the buy price.