Canada version. Canadian dollars and the CRA's average cost rule for identical shares: commissions added to the ACB, and sales that leave the average cost per share unchanged. US version

Average Cost and ACB Calculator (Canada)

Average cost per share and adjusted cost base (ACB) in Canadian dollars across several buys, with commissions, partial sales, break-even and averaging down.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Stock Average Calculator?

For shares of the same class in the same company, the CRA treats them as identical properties: each time you buy, you work out the new average cost of all of them, and that average is your adjusted cost base (ACB) per share. Selling some does not change the average. This calculator follows exactly that method, so its running average matches the ACB you report on Schedule 3.

The CRA defines the ACB as usually the cost of a property plus any expenses to acquire it, such as commissions and legal fees. So put each buy's commission in its fee box. Commissions on a sale are outlays and expenses that reduce your proceeds; the sell fee here lowers the realized gain in the same way.

The CRA's own example, with no commissions, comes out exactly: 100 shares at $15, 150 at $20, a sale of 200, then 350 more at $21 gives 400 shares with an ACB of $8,250, or $20.63 a share.

  • Weighted average cost across any number of buys, with fees
  • Sells under the average cost method with realized gain or loss
  • Running average after every trade
  • Shares needed to reach a target average at the current price
  • Break-even price, market value and unrealized gain
  • Share link that stores your trades, runs in your browser
Read the guide: Average Cost per Share: Averaging Down, Break-Even and Cost Basis

Updated

How to use the Stock Average Calculator

  1. Enter each trade in date order: choose Buy or Sell, then the number of shares, the price per share and the fee for the whole trade.
  2. Add or delete rows as needed. The average is recalculated after every trade in the running-average table.
  3. Enter the current share price to see market value and unrealized gain or loss.
  4. To average down or up, type a target average to get the shares and cash needed, or type a number of shares to buy and see the new average.
  5. Add a sell fee if you want the break-even price to include it, then copy or share the result.

Worked examples

The CRA example

Input

Buy 100 at $15; buy 150 at $20; sell 200 at $18; buy 350 at $21

Output

400 shares, ACB $8,250, average $20.625 a share

After the second buy the average is $18.00; the sale at $18 takes 200 shares out at that average, leaving 50 shares and $900, and the last buy brings it to $20.625.

Two buys with $9.99 commissions

Input

Buy 60 at $132.40 (fee $9.99); buy 40 at $118.75 (fee $9.99); sell fee $9.99

Output

100 shares, ACB $12,713.98, $127.1398 a share; break-even $127.2397

To bring the average down to $120 by buying at $112 would take about 89.25 shares, or $9,995.72. That is a lot of new money to move the average by $7.

Background and insight

The average cost is a weighted average, not the average of the prices. Buying 100 shares at $50 and 50 shares at $40 costs $7,000 for 150 shares, an average of $46.67, not $45, because more shares were bought at the higher price. Fees belong in the cost: a $5 commission on each of two buys adds $10 to the basis and raises the average slightly.

Averaging down solves one equation. If you hold S shares at an average A and buy n more at price P, the new average is (S x A + n x P) / (S + n). Setting that equal to a target T and solving gives n = S x (A - T) / (T - P). The target must lie between the current price and your average: buying at $30 can pull a $46.67 average toward $30 but never to $30 or below, and the closer the target gets to the price, the more shares it takes. Reaching $38 from 150 shares at $46.67 takes 162.5 shares costing $4,875.

For taxes, the cost basis rules in IRS Publication 550 and Treasury regulation 1.1012-1 apply. For individual stocks the default is first in, first out (FIFO), unless you tell your broker which specific lots you are selling; the average basis method is allowed for mutual fund shares and shares acquired through a dividend reinvestment plan. So the average shown here is right for judging your position and break-even, but the gain your broker reports on Form 1099-B can differ if it uses FIFO or specific lots.

Common use cases

  • Deciding whether to average down

    See exactly how many shares and how much cash it takes to move your average to a level you care about.

  • Setting a break-even sell price

    Know the price at which selling the whole position covers every purchase and fee.

  • Tracking a position built over time

    Keep a running average for regular purchases of the same stock or ETF.

  • Checking a broker statement

    Reconcile the average cost your broker shows with your own trade history.

Tips and limitations

  • Stock splits do not change your total ACB. The CRA example spreads the same $1,000 cost over 200 shares instead of 100 after a 2-for-1 split, so after a split re-enter earlier buys with split-adjusted figures (twice the shares at half the price for 2-for-1) rather than adding a new buy.
  • Keep your trade confirmations: each one shows the price, quantity and commission the fee boxes need.

Sources and further reading

  1. Capital gains (Guide T4037), Canada Revenue Agency. Identical properties and the average cost example; ACB including commissions; outlays and expenses on sale; stock splits.
  2. Definitions for capital gains, Canada Revenue Agency. Adjusted cost base and outlays and expenses.

Frequently asked questions

How do I calculate ACB on shares bought at different prices?

Add the cost of every purchase, including commissions, and divide by the number of shares you hold. Recalculate after each buy. The CRA example gives $18.00 after two buys (100 at $15 and 150 at $20) and $20.63 after a later buy of 350 at $21.

Does selling shares change my ACB per share?

No. The CRA says dispositions of identical properties do not change the ACB per share. The sale removes shares at the average, and the difference from the sale price, less commissions, is your capital gain or loss.

Are brokerage commissions part of the ACB?

Commissions to buy are added to the ACB, since the CRA defines it as cost plus expenses to acquire the property. Commissions to sell are deducted from the proceeds as outlays and expenses.

What does the break-even price mean here?

It is the price at which selling every share covers the ACB and the sell commission. For 100 shares with a $12,713.98 ACB and a $9.99 fee it is $127.24.

How many shares do I need to buy to average down?

Shares held × (average − target) / (target − current price). Enter a target average and today's price and the calculator gives the number and the cost. The target must lie between today's price and your current average.

Is there an in-depth guide to the Stock Average Calculator?

Yes. “Average Cost per Share: Averaging Down, Break-Even and Cost Basis” covers the background, how it works, common pitfalls and worked examples. Read the full guide.