Finance calculators

ACB Calculator

Updated Aug 31, 2026 By Infinity Calculator
Rate Formulas
Enter Transactions

Record each purchase (Buy) or disposal (Sell) of shares. Commission is optional and defaults to $0. ACB is recalculated using the weighted average cost method after every transaction.

ACB Summary
Shares Held
0
current position
Total ACB
$0.00
book value of holdings
ACB per Share
$0.00
weighted average cost
Realized Gain / Loss
$0.00
net from all sells
Transaction-by-Transaction ACB Calculation
# Type Date Shares Price / Share Commission Cost / Net Proceeds ACB of Sold Capital Gain / Loss Shares Held Running ACB ACB / Share
Enter transactions above and click Calculate ACB.
ACB per Share vs. Transaction Price

Introduction

The Adjusted Cost Base (ACB) Calculator helps you track what your shares really cost you. ACB is the average price you paid for each share, plus any fees like commissions. You need this number to work out your capital gain or loss when you sell.

Just add each Buy or Sell you made. Type in the date, the number of shares, the price per share, and the commission. The calculator then shows your ACB per share, your total book value, and your realized gain or loss after every trade.

It uses the weighted average cost method, the same way the Canada Revenue Agency (CRA) expects. So when you buy more shares at a new price, your ACB per share updates right away. When you sell, the tool subtracts the ACB of those shares from your net proceeds to find your gain or loss.

You also get a full table of every step and a chart that compares your ACB per share to the price you paid or got. This makes it easy to see your numbers, keep good records, and get ready for tax time.

How to use our ACB Calculator

Enter each time you bought or sold shares. The calculator works out your adjusted cost base (ACB), your ACB per share, and your capital gain or loss on every sale.

Type: Pick Buy if you bought shares, or Sell if you sold them.

Date: Type the date of the trade. This is optional, but it helps keep your records in order.

Shares: Enter how many shares you bought or sold in that trade. You can use partial shares.

Price / Share: Enter the price you paid or got for one share, before fees.

Commission: Enter the trading fee for that order. Leave it at 0 if there was no fee. Fees on a buy raise your ACB. Fees on a sell lower your proceeds.

Add Transaction: Click this to add another buy or sell row. Add your trades in the order they happened.

Calculate ACB: Click this to see your shares held, total ACB, ACB per share, and total realized gain or loss. A table and chart show how your ACB changes after each trade.

Remove and Reset: Click Remove to delete one trade row. Click Reset twice to clear everything and start again.

What Is Adjusted Cost Base (ACB)?

Adjusted cost base, or ACB, is the average cost you paid for the shares you own. In Canada, the Canada Revenue Agency (CRA) uses your ACB to work out your capital gain or loss when you sell an investment. Your ACB includes the price of the shares plus any fees, like broker commissions, that you paid to buy them.

How ACB Is Calculated

Canada uses the weighted average cost method. That means all shares of the same stock in the same account are pooled together. You do not track each buy on its own. Instead:

  • ACB per share = total book value ÷ total shares you hold
  • When you buy: add the cost plus commission to your total ACB, and add the new shares to your share count. This changes your average cost.
  • When you sell: your ACB per share stays the same. You remove the sold shares' share of the ACB from your book value.

Working Out Capital Gain or Loss

When you sell, the math is simple:

Capital gain or loss = net proceeds − ACB of the shares sold

Net proceeds are the sale price times the number of shares, minus the selling commission. If the answer is positive, you have a capital gain. If it is negative, you have a capital loss. In Canada, you normally report 50% of a capital gain as taxable income. Capital losses can lower capital gains from the same year, past years, or future years. To estimate the tax owing on those gains, try the Capital Gains Tax Calculator.

A Quick Example

You buy 100 shares at $25 with a $9.99 fee. Your ACB is $2,509.99, or about $25.10 per share. Later you buy 50 more shares at $30 with a $9.99 fee, adding $1,509.99. Now you hold 150 shares with a total ACB of $4,019.98, so your ACB per share is about $26.80. If you then sell 75 shares at $35 with a $9.99 fee, your net proceeds are $2,615.01 and the ACB of those shares is about $2,010. Your capital gain is roughly $605.

Things That Change Your ACB

  • Commissions and fees: buying fees raise your ACB. Selling fees lower your proceeds. Ongoing fund fees are separate.
  • Return of capital (ROC): some ETFs and trusts pay ROC, which lowers your ACB.
  • Reinvested distributions (DRIPs): reinvested amounts raise your ACB, even if you never saw the cash.
  • Stock splits: the share count changes, so ACB per share changes, but total ACB stays the same.
  • Foreign stocks: convert both buys and sells to Canadian dollars using the exchange rate on each trade date.

Rules Worth Knowing

The superficial loss rule blocks a capital loss if you (or your spouse, or a company you control) buy the same stock within 30 days before or after the sale and still hold it. The denied loss is added to your ACB instead.

You must also keep one ACB pool per stock across all your non-registered accounts, not one per account. ACB does not matter inside an RRSP, RRIF, TFSA, or FHSA, because gains in those accounts are not taxed as capital gains. Keep your trade records and slips, since brokers do not always report ACB correctly. The same pooling idea applies to coins and tokens, which the Crypto Tax Calculator covers.


Formulas used

Cost of a Buy Transaction
\text{Cost} = \text{Shares} \times \text{Price} + \text{Commission}
Running ACB After a Buy
\text{ACB}_{\text{new}} = \text{ACB}_{\text{prev}} + (\text{Shares} \times \text{Price} + \text{Commission})
ACB per Share (Weighted Average Cost)
\text{ACB per Share} = \frac{\text{Total ACB}}{\text{Shares Held}}
ACB of Shares Sold
\text{ACB}_{\text{sold}} = \frac{\text{ACB}_{\text{prev}}}{\text{Shares}_{\text{prev}}} \times \text{Shares}_{\text{sold}}
Net Proceeds of a Sell Transaction
\text{Net Proceeds} = \text{Shares}_{\text{sold}} \times \text{Price} - \text{Commission}
Capital Gain / Loss on a Sale
\text{Gain} = \text{Net Proceeds} - \text{ACB}_{\text{sold}}
Running ACB and Share Balance After a Sell
\text{ACB}_{\text{new}} = \text{ACB}_{\text{prev}} - \text{ACB}_{\text{sold}}, \quad \text{Shares}_{\text{new}} = \text{Shares}_{\text{prev}} - \text{Shares}_{\text{sold}}
Total Realized Gain / Loss
\text{Total Gain} = \sum_{i \in \text{sells}} \left( \text{Net Proceeds}_i - \text{ACB}_{\text{sold},i} \right)

Frequently asked questions

Does the order I enter my trades in matter?

Yes. Add your trades in the order they happened, oldest first. The calculator works down the list one row at a time. If a sell comes before the buy that gave you those shares, the math will be wrong or you will see an error.

Why do I get an error saying I cannot sell that many shares?

You tried to sell more shares than you held at that point in the list. Check three things:

  • Did you enter all your earlier buys?
  • Are your trades in date order?
  • Did you type the share count correctly?

What if I leave the commission blank?

It is treated as $0. If your broker charges no fee, that is fine. If you did pay a fee, enter it, or your ACB and your gain will both be off.

Why does my ACB per share drop to $0.00 after I sell everything?

Because you own nothing. When your share count hits zero, your total ACB is zero too, so there is no cost per share left. Your realized gain or loss stays in the summary.

How do I handle a stock split?

Splits do not change your total ACB, only your share count. Adjust the shares and price on your earlier buy rows to the post split numbers. For a 2 for 1 split, double the shares and halve the price on each buy.

Is the realized gain shown before or after tax?

Before tax. It is your full capital gain or loss from all sells added together, after commissions. No inclusion rate or tax rate is applied.

Why did my ACB per share go up after I bought more shares?

Because you paid more than your old average. New buys are blended into the pool, so a higher price pulls the average up and a lower price pulls it down. Selling never changes your ACB per share.

Does a sell change my ACB per share?

No. A sell removes shares and removes their share of the book value at the same average cost. Your cost per share stays where it was until your next buy.

Should I include shares held in my TFSA or RRSP?

No. Gains in registered accounts are not taxed as capital gains, so ACB does not matter there. Only track your non registered, taxable holdings.

I hold the same stock at two brokers. Do I combine them?

Yes. The CRA wants one ACB pool per stock across all your non registered accounts. Enter every buy and sell from both brokers into one list, in date order.

Why do I have to click Reset twice?

It is a safety step so you do not wipe out your trades by accident. The first click asks you to confirm. Click again within five seconds to clear everything.

Does this handle the superficial loss rule?

No. The calculator shows the raw loss. If you rebought the same stock within 30 days before or after the sale, that loss may be denied and added to your ACB instead. Check that rule yourself.

Why is my gain slightly different from my broker's number?

Brokers often track ACB per account, not across all your accounts. They may also miss ROC, DRIPs, or foreign exchange. Your own pooled record is usually the more accurate one for tax.