How to Calculate Adjusted Cost Base (ACB) and Capital Gains

The Canada Revenue Agency (CRA) requires, in most cases, that taxes be paid on capital gains for all property including investments such as stocks, bonds, mutual funds, and exchange-traded funds. In the simplest form, a capital gain is equal to the proceeds received when selling a property, minus the original cost of the property.

As a simple example, let’s assumed that you purchased 100 shares of RY for $50 per share settling on March 3, 2012. Then you sell all 100 shares for $120 per share settling on May 1, 2014. For simplicity, let’s assume that you did not pay any commission on either the purchase or sale transactions. In this case the cost of the shares is equal to

  100 shares x $50/share
= $5,000

and the total proceeds of the sale is equal to:

  100 shares x $120/share
= $12,000

This results in a capital gain (applied in the year 2014) equal to:

Capital Gain = Sale Proceeds – Original Cost
             = $12,000 – $5,000
             = $7,000

This particular example is very simple because there are no transaction costs, and there is only a single purchase transaction and only purchase and one sale where all shares are sold. When transaction costs are incurred, they must be added to the cost of the shares when buying and subtracted from the sale proceeds when selling. The most common transaction costs for stocks are brokerage commissions, but in general transaction costs can include a number of other such as legal fees.

Things become more complex when there’s a series of multiple buy and sell transactions at various price levels. In this case you might ask yourself, when a sale transaction occurs where only a portion of shares are sold, what should I use as the cost when calculating the capital gain? Should I use the cost of the first shares purchased? The most recent shares purchased? The answer is that the CRA requires you to keep a running total of the Adjusted Cost Base (ACB) for tax purposes.

When you buy shares, the total ACB is recalculated to be the previous total ACB, plus the total cost of the new shares, plus any transaction costs:

New Total ACB After a Buy Transaction = (Previous Total ACB) + (Cost of New Shares) + (Transaction Costs)

Or, it can be expressed using the price per share and number of shares purchased:

New Total ACB After a Buy Transaction = (Previous Total ACB) + ((Share Price) x (Number of Shares Purchased)) + (Transaction Costs)

When a sale transaction occurs, the new total ACB must be reduced from the previous based on the proportion of shares that are sold:

New Total ACB After a Sell Transaction = (Previous Total ACB) x (((Previous Number of Shares) – (Number of Shares Sold)) / (Previous Number of Shares))


New Total ACB After a Sell Transaction = (Previous Total ACB) – ((ACB per Share) x (Number of Shares Sold))

The capital gain (or loss) from a sale is calculated by taking the proceeds of the sale (less transaction costs) and subtracting the ACB per share multiplied by the number of shares sold:

Capital Gain (or Loss) = ((Share Price) x (Number of Shares Sold)) – (Transaction Costs) – ((ACB per Share) x (Number of Shares Sold))
                       = ((Share Price) x (Number of Shares Sold)) – (Transaction Costs) – (((Total ACB) / (Previous Number of Shares)) x (Number of Shares Sold))

Note that ACB can be expressed either as the total ACB or ACB per share. It is important not to confuse the two forms.

As a more complex example, let’s assume the following transactions occur:

Settlement Date Transaction Shares Bought or Sold Price Per Share Commission Share Balance
1. Mar 3 Buy 100 $50 $10 100
2. May 1 Sell 50 $120 $10 50
3. Jul 18 Buy 50 $130 $10 100
4. Sep 25 Sell 40 $90 $10 60

Transaction 1 is identical to the first transaction in the previous example

New Total ACB = (Previous Total ACB) + ((Share Price) x (Number of Shares Purchased)) + (Transaction Costs)
              = $0 + ($50/share x 100 shares) + $10
              = $5,000 + $10
              = $5,010

Note that a capital gain does not occur for a buy transactions; it only needs to be calculated for a sell transaction.

For Transaction 2, the new ACB becomes:

New Total ACB = (Previous Total ACB) x (((Previous Number of Shares) – (Number of Shares Sold)) / (Previous Number of Shares))
              = $5,010 x (((100 shares) – (50 shares)) / (100 shares))
              = $2,505

The capital gain for Transaction 2 is calculated as follows:

Capital Gain (or Loss) = ((Share Price) x (Number of Shares Sold)) – (Transaction Costs) – (((Total ACB) / (Previous Number of Shares)) x (Number of Shares Sold))
                       = ((($120/share) x (50 shares)) – $10) – (($5,010 / (100 shares)) x 50 shares)
                       = $3,485

Next, Transaction 3 (a purchase transaction) results in the following ACB:

New Total ACB = (Previous Total ACB) + ((Share Price) x (Number of Shares Purchased)) + (Transaction Costs)
              = $2,505 + ($130/share x 50 shares) + $10
              = $9,015

Finally, Transaction 4 (a sell transactions) results in the following ACB:

New Total ACB = (Previous Total ACB) x (((Previous Number of Shares) – (Number of Shares Sold)) / (Previous Number of Shares))
              = $9,015 x (((100 shares) – (40 shares)) / (100 shares))
              = $5,409

And a capital loss of $16 occurs:

Capital Gain (or Loss) = ((Share Price) x (Number of Shares Sold)) – (Transaction Costs) – (((Total ACB) / (Previous Number of Shares)) x (Number of Shares Sold))
                       = ((($90/share) x (40 shares)) – $10) – (($9,015 / (100 shares)) x 40 shares)
                       = –$16

As you can see, calculating ACB can become very tedious and complex.  The onus is on the taxpayer to track ACB and calculate capital gains. Your brokerage will not, in most cases, perform the calculations for you. And even if they do, the information can often be wrong.

The calculations are summarized in the following table:

Settlement Date Transaction Shares Bought or Sold Price Per Share Commission Share Balance ACB ACB per Share Capital Gain (Loss)
1. Mar 3 Buy 100 $50 $10 100 $5,010 $50.10
2. May 1 Sell 50 $120 $10 50 $2,505 $50.10 $3,485
3. Jul 18 Buy 50 $130 $10 100 $9,015 $90.15
4. Sep 25 Sell 40 $90 $10 60 $5,409 $90.15 ($16) is a web application that performs all the necessary calculations for you. All you need to do is enter the details of each transaction. Although it’s important to understand the concepts when calculating ACB, makes things less tedious and reduces the risk of human calculation error.  Here are the results after entering the transactions from the example into

Transactions for RY

This overview is meant to be a general guideline, and will not apply in all situations.

The following are some other details to consider:


41 thoughts on “How to Calculate Adjusted Cost Base (ACB) and Capital Gains

  1. rob

    Hoping you can clarify the Capital Gain(loss) column in the transactions area for a security. In particular, when I enter a bunch of transactions on same security throughout the year, is the capital gain/loss figure for the very last SALE transaction, the adjusted capital gain/loss amount that would go in column 5 on ‘Schedule 3’ of taxes, or do i have it wrong here, and am I supposed to be adding up all capital gains – all capital losses for the year to get the figure for schedule 3?? My guess is the ACB that keeps getting readjusted recalculates the capital gain/loss up to end of year? Is this right? Some positions I have do not have a “0” share balance yet, and then I have several that do have ACB of “0”. Would love clarification to this if I possibly can . Many thanks! Rob

  2. Post author


    The “Capital Gain (Loss)” column indicates the capital gain or loss only for each transaction (it is not any kind of cumulative total). When completing Schedule 3, I would suggest that you use a separate line for each sale transaction (even if there are multiple sale transactions for a given year). Yes, the capital gain should appear in column 5.

  3. rob

    I had a question regarding a position in a Cdn stock as seen below. My question is how can the capital gain be $562.60 on the initial sell order when my initial ACB is $4255 and the proceed from 1st Sell order is $4307 which in theory is a difference of (-52). Does the 600 remaining shares I’ve kept, in essence, become the capital gain?? Here are my transactions below:

    Sell on 2014-Mar-13
    Total Amount: $4,312.00
    Shares: 4,400
    Amount per Share: $0.98
    Commission: $5.00
    Cap Gain (Loss): $562.60
    Share Balance: 600
    Change in ACB: —$3,744.40
    New ACB: $510.60
    New ACB/Share: $0.85

    Buy on 2013-Oct-10
    Total Amount: $4,250.00
    Shares: 5,000
    Amount per Share: $0.85
    Commission: $5.00
    Share Balance: 5000
    Change in ACB: +$4,255.00
    New ACB: $4,255.00
    ACB/Share: $0.85

    Thanks very much! Rob

  4. Post author


    The gain on the sale is calculated as follows:

    Capital Gain (or Loss) = ((Share Price) x (Number of Shares Sold)) – (Transaction Costs) – ((ACB per Share) x (Number of Shares Sold))
    = ($0.98 x 4,400) – $5.00 – ($0.851 x 4,400)
    = $562.60

    Since only some of the shares are sold only a portion of the ACB is subtracted from the proceeds when determining the capital gain. Or looking at it another way, you’ve sold shares for $0.98 per share that had an ACB per share of $0.851.

  5. David

    Did I miss your explanation about ACB of shares acquired by an employee? Some companies have stock as a performance bonus. Can the cost of these shares be found in a breakdown of the amount on the employee’s T4 slip? Where does one get the cost for RSU (restricted stock units)?

  6. Caroline

    Hello and thank you for all your help!

    So it I understand correctly, better not have a US investment account because it make calculating the ACB even more complicated?

    best regards,


  7. Post author


    While holding US dollar denominated accounts or investments can make things more complicated (not just in terms of ACB but also due to foreign reporting requirements and estate planning) there are other factors to consider.

    For more information on calculating ACB with foreign investments, please see the following:

  8. Tegan

    Hi there,

    I am trying to determine which ACB to enter on my taxes. There is a column for “New ACB”. When I enter a sale on my taxes, do I use the New ACB on the same line as the sale or do I use the New ACB amount on the line above the sell?
    eg. (numbers aren’t accurate)
    LINE 1: BUY – New ACB
    LINE 2: SELL – New ACB

    If I am entering the sale in line 2, do I use the ACB value in line 2 or line 1?

    My second question is, do I enter the total ACB or the ACB/share value?

    Thank you kindly

  9. Post author


    I’m assuming you’re referring to filling out Schedule 3 (or a similar interface in your tax software). For Schedule 3 you should include a line for each sell transaction. Here is the correspondence between the columns on Schedule 3 and the columns listed on

    (2) Proceeds of disposition: Amount
    (3) Adjusted cost base: Change in ACB (the absolute value)
    (4) Outlays and expenses: Commission
    (5) Gain (or loss): Capital Gain (Loss)

  10. Hesen

    Thank you for a concise explanation on the topic. I have a specific question which I can’t find be be addressed anywhere else.

    If I acquire a stock in year 2010 and dispose it in 2011 do I enter Acquisition and Disposition in 2011 reporting year OR do I enter, for 2010 Acquisition amount with 0 Disposition and 2011 0 Acquisition with Disposition amount?

    Thank you

  11. Jason

    Thank you for the site. I have a question regarding the tool.

    I have a question regarding the following scenario.

    1) I have a bank account with $100USD which I got a 1:1 ratio a while ago
    2) I purchase a US stock with those US funds when Canadian dollar is worth more at $1.04
    3) I sell the stock back to US dollars and the Canadian dollar is now $1.02
    4) I purchase a new US stock few days later when the Canadian dollar is worth $1.06

    shouldn’t there be a realized loss between 3 and 4? does this tool or any other tools take that into account?

  12. Post author


    The US cash and US stocks should be treated as separate securities.

    A purchase of US stock with US cash results in a deemed disposition of the US cash. It can be seen as first converting the US cash into Canadian cash and then purchasing the US stock with Canadian cash, even though a conversion may not have occurred.

    Similarly, a sale of US stock with the proceeds kept in US cash is equivalent to selling the US stock and receiving proceeds in Canadian dollars, and buying US cash with the proceeds.

    Yes, can be used for this purpose. Further information on this is available here:

  13. doug

    Hey there awesome site. I have a question..

    I bought shares in a dual listed stock on a Canadian exchange a few years ago. This year I transferred a large portion of the position to the US exchange but only sold the remaining shares I held onto on the Canadian exchange.

    I’m assuming my cost base wouldn’t have changed and i’m only going to be paying capital gains on the small position I sold on to the Canadian exchange but I noticed my broker calculated the transfer to the US exchange as a sell and I re-bought my position with a new ACB.

  14. Post author


    I don’t think that journaling the shares from one exchange to the other should result in a deemed disposition. Therefore your ACB should not change after transferring the shares to the U.S. exchange.

    This sounds like another reason to add to the list for why you shouldn’t trust your brokerage to calculate capital gains for you:

  15. Charles

    Great site, tons of info, but I can’t quite find exactly what I’m looking for. I’ve been trying to get assistance from various sources about some investing I started this year, but I keep getting the “talk to an accountant” response, then I talk to an accountant who tells me they can only help me if I file through them (even though I’ve offered to pay for their time), except 1 who told me they would help me for 30 minutes for $300, which I am not willing to pay for 30 minutes. I want to file my taxes on my own, so neither option is viable yet.

    Anyways, I recently began FOREX trading using an online platform. My account with them is in USD, and I deposit using CAD. I plan on reporting via capital gain/loss treatment (I have a primary job, this is more of a hobby) and I am definitely in a loss. I have my statement from them, and I have thousands of trades – over 500 pages (page 1 gives me a nice summary but it’s all in USD).

    So far here’s what I understand:
    1) I will need to report on schedule 3
    2) I need to input ACB, Disbursement & outlays
    3) The amounts must be reported in CAD

    What I am trying to figure out:
    1) Do I need to convert every single trade individually? (this doesn’t seem reasonable)
    2) How do I calculate my ACB?
    3) How to deal with the unrealized money that was still tied up in trades

    What I know:
    1) I know how much CAD I put into the account
    2) I know how much USD I had at the end of the year in that account
    3) I had some unrealized money at the end of the year (still tied up in trades) – and I know how much was unrealized in USD.
    4) How much money I withdrew back into my bank account (in CAD)
    5) The fees I paid for those withdrawls.

    As an example lets say I deposited $1000CAD throughout the year, at various times, lets say I paid $25 USD in withdrawl fees and withdrew the equivalent of $100CAD back into my bank account. And lets say I had $50USD left in the account at the end of the year with another $25USD unrealized tied up in trades.

    Would it be as simple as the following?:

    “ACB=1000-50(but I would convert to CAD based on the rate 31-Dec)-25(but convert to CAD based on the rate 31-Dec)”
    “Outlays=$25 (but convert to CAD the date the fee was taken)”
    “and Disbursements= $100”

    Which would result in capital loss= Approximately $850 loss (would be slightly higher once I convert the USD to CAD)

    Thank you!
    Any assistance would be greatly appreciated!

  16. Post author


    The calculation method you’ve described sounds similar the calculating gains and losses on income account, but you’ve indicated you want the calculations to be done on capital account. Unfortunately, the process described above is necessary to calculate the gain or loss on capital account.

    In some limited cases the calculated results may end up the same whether you use the income account method or capital account method, but that’s usually not the case unless you have a zero share/foreign currency balance both at the beginning of the year and at the end of the year.

  17. Peter

    Hi, did you mean “shares sold” rather than “shares purchased” in your example “The capital gain for Transaction 2 is calculated as follows:” Same for “Finally, Transaction 4 (a sell transactions) results in the following ACB:”

  18. John

    I’m looking for capital gains calculations done using FIFO. Does your website have this capability?


  19. Post author


    Sorry but does not support calculating capital gains with the FIFO method. It’s intended for Canadian tax payers only, and the Canada Revenue Agency does not allow that method.

  20. James

    Dividend payments certainly complicate the ACB calculation. Dividends may be re-invested automatically into more shares, or not. Or PARTIALLY re-invested. I gather from other comments here that it is the re-invested portion that must be considered in the ACB calculation, not the original dividend payment? That doesn’t seem right in my mind, because the ENTIRE dividend payment is taxable and it affects the unit price of the shares. Here’s a simple example that illustrates my confusion. 400 shares are purchased for $28000. Next, there is a $140 dividend payment. Dividends are automatically used to purchase additional shares. But fractional shares are not allowed in my account, so $75 is used to purchase 1 additional share, and the other $65 is left behind in cash. What is my ACB now for the 401 shares? Is it $28075? Or is it $28140? I think it should be $28140.

  21. Tony

    If I acquired shares over time in a DRIP, I know how to calculate the ACB.

    But what do I enter on Form 3, for the date of acquisition?


  22. Post author


    The CRA doesn’t seem to offer clear instructions on that. I would suggest either using the year when the bulk of the shares were initially acquired, or if possible list all the years when there were acquisitions.

  23. Michel

    I assume that RSU sold on the day of vesting to cover taxes are not taken into account in the computation of the ACB. Is that assumption correct?

  24. Lori Bulmer

    how do I calculate my ACB when 100 shares I purchased in Boralex Income Fund for $403.95 converted to 497 shares in Boralex Inc, then were redeemed for $497

  25. Post author


    You’ll need to check up on the details of the taxation of this conversion. But assuming there is no deemed disposition or other taxable event due to the conversion, it would be equivalent to the following transactions:

    1. Sell 100 shares of Boralex Income Fund for the total ACB at the time of conversion.
    2. Buy 497 shares of Baralex Inc. for that same total ACB.

  26. Martin

    Hi. I bought the same stock over two years, and sold some shares, but not all, recently (current year). How do I report the acquisition date and disposition date? e.g. BUY 1000 in Oct 2014; BUY 1000 in Feb 2015; SELL 500 in March 2015.

  27. Martin

    To make it a bit more complicated, let’s add another SELL in April 2015.
    My general problem with the reporting is how to deal with selling small amounts of a larger holding, when the stock has been held for a few years.

  28. Post author


    If your question is about completing Schedule 3, then I would suggest putting all the years in column (1) (year of disposition). Each disposition can go on a separate line.

  29. Al Moser

    My son inherited 250 stock from his grandmother in 1996. The stock split 2 for 1 in 1999. He placed the stocks with a brokerage in 2014 and sold them in 2015. For his ACB, would he use the historic value of stock the day he received them in 1996 for 250 of them? Then the value of the Stock in 1999 for the remaining 250?

  30. Gayle

    A mutual fund annually “sells” a couple of units as a commission type of fee.
    When recording these, I have adjusted the ACB and I have calculated the capital gains or loss and reported them on my tax forms. My question is does a capital gain on this type of sale get added to the ACB since I am taxed on it without actually receiving it similar to a reinvested dividend? Or can I deduct the capital gain along with the fee as an investment expense?

  31. Nelson

    I purchased 25 shared of Hertz and paid $536.45. Not after a confusing transaction (the company effectively split into two entities), I now own 1.666667 shares of HRI (formerly Hertz due to a 15:1 revers stock split) and 5 shares of a newly formed company, HTZ. How do I allocate the original cost of $536.45 to what is now two separate holdings?

  32. Post author


    That sounds like a foreign spin-off. More information about that can be found here:

    By default, the receipt of the foreign spin-off shares are deemed to be foreign dividend income, taxable when they’re received, based on fair market value. However, if certain conditions are met, you can elect to defer paying taxes on the distribution, and allocate the previous ACB based on the relative fair market values of the shares. The link above shows an example of this.

    The CRA has a list of eligible foreign spin-offs here:

    Note that Hertz is not yet on the list, but you may want to give it some time as the spin-off was just announced a few days ago.

    You’ll need to make an election along with your tax return to have the spin-off treated this way, and there are restrictions about how you can file your return with the election.

  33. Patricia

    I have shares, held in my name only, in certificate form. I have a joint brokerage account with my spouse. My spouse has a brokerage account, in his name only. There are shares of some companies held in all three “names” e.g. Royal Bank common shares: held in my name only (share certificate), held in our names (brokerage account) and held in my spouse’s name (brokerage account).
    For tax purposes I declare all the dividends in the joint account on my tax return (the money invested came from me).
    My question is: Do I treat all three “names” as separate persons for ACB recording purposes or does the CRA require some other treatment?

    Fantastic website, thank you!

  34. satuk

    Hi I am evaluating a job offer where they included RSUs in cash in the compensation plan. I work in Canada and the RSUs will be issued in USD. I can cash them out every quarter, if I choose to. I would like to understand what would be the tax implication for me. Does RSU work to my advantage or would I end up paying more tax? Thank you.

  35. Brodie

    I bought shares of Company X in my name in one account and on a separate date for a different price, my wife and I jointly bought more shares of Company X in our joint account (50/50 contribution) . If I decide to sell my shares but not the jointly owned shares, is my ACB simply my purchase price plus transaction costs in my own account or do I have to recalculate my ACB in consideration of the purchase of shares in the joint account? Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *