Skip to content

Stock Average Calculator

Add each time you bought a share, coin or fund unit to see your average price, your profit or loss now, and how many to buy to bring the average down.

More options
What do you want to work out?

What are you buying?
Your purchases

Put trades in the order you made them. Fees: an amount, or a % of the trade value. Sells use the average-cost method.

$
$
Your next buy
$
$
$
$
ResultUpdates as you type—Average price——————

This is maths, not investment advice. Averaging down lowers your break-even price, but it also puts more money into something that has fallen.

Trade by trade, with the running average
#TradeSharesPriceFeePaid / gotHeld afterAverage costRealised

How your average price is worked out

Average price = total cost of your buys ÷ total shares.

  1. 1

    Add up the shares

    100 + 100= 200 shares

  2. 2

    Add up the cost

    $5,000 + $4,000= $9,000

  3. 3

    Divide

    $9,000 ÷ 200= $45.00 each

  4. 4

    Profit or loss now

    200 × $42.00− $9,000= −$600 (−6.67%)

Read more: the formula, worked examples, fees, sells and averaging down

Your average price (also called your average cost or cost basis per share) is what you paid in total for the shares you hold, divided by how many you hold. It is the price the share has to beat for you to be in profit. It works the same way for crypto coins, mutual fund or ETF units, gold or anything else you buy in units at different prices.

The formula

cost of a buy = units × price + fee
average price = total cost of your buys ÷ total units
profit or loss now = units × price now − selling fee − total cost
profit or loss % = profit or loss ÷ total cost × 100
break-even price = (total cost + flat selling fee) ÷ units, or total cost ÷ (units × (1 − selling fee %))
units to buy for a target average = (target × units held − total cost − flat fee) ÷ (buy price × (1 + fee %) − target)
price to pay for N units = (target × (units held + N) − total cost − flat fee) ÷ (N × (1 + fee %))

A fee given as a % is that share of the trade value: 0.5% on a 800 buy is 4. Write % as decimals in the formulas: 0.5% is 0.005.

Worked example

You bought 100 shares at $50 (100 × 50 = $5,000) and later 100 more at $40 (100 × 40 = $4,000). You now hold 100 + 100 = 200 shares that cost $5,000 + $4,000 = $9,000, so your average price is $9,000 ÷ 200 = $45.00 a share.

The price now is $42. Your shares are worth 200 × $42 = $8,400, which is $8,400 − $9,000 = −$600, or −600 ÷ 9,000 = −6.67%. With no fees your break-even price is your average, $45, so the share has to rise 45 ÷ 42 − 1 = 7.14% before you are back to even.

Averaging down: the two "what if" sums

How many to buy. To bring the average down to $44 by buying at $40: (44 × 200 − 9,000) ÷ (40 − 44) = (8,800 − 9,000) ÷ (−4) = 50 shares, costing 50 × 40 = $2,000. Check: you then hold 250 shares that cost $11,000, and 11,000 ÷ 250 = $44.

What price to pay. To reach the same $44 average by buying 100 more shares: (44 × 300 − 9,000) ÷ 100 = (13,200 − 9,000) ÷ 100 = $42.00 a share. Check: 9,000 + 4,200 = 13,200, and 13,200 ÷ 300 = $44.

Impossible targets. A new buy can only pull your average towards the price you pay, never past it. Buying at $40 can bring a $45 average close to $40, but never to $39 or below, however many you buy, and it can't raise the average at all. In the same way, buying only 10 more shares can't bring the average below 9,000 ÷ 210 = $42.86 even if they were free. The calculator says so instead of giving a nonsense answer.

Profit at a target price. If the share reaches $55, your 200 shares are worth 200 × 55 = $11,000, a profit of 11,000 − 9,000 = $2,000, or 2,000 ÷ 9,000 = 22.22%.

Fees and break-even

Buy 10 shares at $100 with a $5 fee ($1,005) and 10 at $80 with a 0.5% fee (0.5% of $800 = $4, so $804). The 20 shares cost $1,809: an average of $90.45 with fees, against $90.00 on the prices alone. If selling also costs 0.5%, you only break even when 20 × price × 0.995 = $1,809, which is a price of 1,809 ÷ 19.9 = $90.90.

Sells: average cost vs FIFO

This calculator uses the average-cost method: when you sell, the shares leave at your average cost, so the average of what you still hold does not change. From 200 shares at $45, selling 50 at $60 with a $10 fee brings in 50 × 60 − 10 = $2,990. They cost 50 × 45 = $2,250, so the realised profit is $740, and you still hold 150 shares at $45 ($6,750). Buying 50 more at $30 then gives 200 shares costing $8,250, an average of $41.25.

Some countries and brokers use first in, first out (FIFO) for tax instead: the 50 sold would be the first ones bought at $50, a profit of 2,990 − 2,500 = $490, and the 150 left would cost 2,500 + 4,000 = $6,500, an average of $43.33. Check which method your tax office or broker uses before filing; the averages shown by brokers often follow their own rules.

Averaging down in numbers

You holdYou buyNew averageRise needed from $40 to break even
200 at $45nothing$45.0012.5%
200 at $4550 at $40$44.0010%
200 at $45100 at $40$43.338.33%
200 at $45200 at $40$42.506.25%
200 at $45400 at $40$41.674.17%

Each extra buy helps less: doubling the money you add does not halve the gap.

This is maths, not investment advice. A lower average only helps if the price recovers; averaging down into something that keeps falling makes the loss bigger. Dividends, splits and bonus shares are not included: after a 2-for-1 split, double the units and halve the prices. Taxes on gains follow your country's rules and are not worked out here.

Common questions

How do I calculate my average share price?

Add up what every purchase cost (shares × price, plus any fees) and divide by the total number of shares. 100 shares at 50 (5,000) plus 100 shares at 40 (4,000) is 9,000 for 200 shares, an average of 45 a share.

What does averaging down mean?

Averaging down is buying more of something after its price has fallen, so your average cost per share drops. If you hold 200 shares at an average of 45 and buy 50 more at 40, you have 250 shares that cost 11,000, an average of 44. The share still has to rise above 44 for you to be in profit.

How many shares do I need to buy to lower my average?

Shares to buy = (target average × shares you hold − what they cost) ÷ (new price − target average). Holding 200 shares that cost 9,000, buying at 40 to reach an average of 44 needs (44 × 200 − 9,000) ÷ (40 − 44) = 50 shares. You can never get the average below the price you are buying at.

Does selling shares change my average price?

With the average-cost method, no. The shares you sell are taken out at your average cost, so the average of what is left stays the same and the difference is your realised profit or loss. Some countries use first in, first out (FIFO) for tax, which gives a different average for the shares left; this calculator uses average cost.

Should I include brokerage fees in the average?

Yes, if you want your true break-even. Fees paid when buying are part of what the shares cost you, and a fee when you sell has to be covered too. This calculator shows the average with fees, the average price before fees and the break-even price after the selling fee.

Does this work for crypto and mutual funds?

Yes. Enter coins or fund units with decimals, such as 0.25 BTC or 152.347 units, and the price per coin or the NAV per unit. The maths is the same for anything you buy in units at different prices.

Related calculators

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.Investment calculatorWhat your investment could grow to, or the contribution, starting amount, return or years to reach a goal, with fees, tax and inflation.SIP calculatorWhat a SIP could grow to, or the SIP for a goal.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 average calculator by Zulu Calculator ↗