Calculating Gain or Loss on a Stock Sale

by Tax Guy - Burlington Accountant on February 25, 2009 Print This Post Print This Post


  • I bought 100 shares of xx on day 1 for $10.
  • I bought 100 shares of xx on day 2 for $5.
  • I sold 100 xx on day 3 for $2.

Can the sale be against the $10 stock, i.e. a loss of $8/share? Alternatively, must it be against the average of $7.5/share?

What is a Capital Gain?

Simply stated, the gain or loss on the sale of a share is the proceeds of disposition less the adjusted cost base or ACB.  For tax purposes, the taxable portion of a gain or loss is 1/2 of the gain or loss.

Proceeds of Disposition (Proceeds of The Stock Sale)

The proceeds of disposition is simply the amount you received from selling a stock, bond or mutual fund. Deduct any commissions paid to the broker to arrive at new proceeds of disposition.

Adjusted Cost Base

The adjusted cost base is the price you originally paid for the stock or other investment, less any commission paid to your broker, and less any return of capital (you may run into return of capital with certain mutual funds).

When you have purchased the same shares over a period of time and then sell a portion of your holdings you must use the average adjusted cost base per share. In the information provided,

The total adjusted cost base before the sale:

$1,500 = (100 x $10) + (100 x$5)

And your average adjusted cost base per share is:

$7.50 = ($1,500 / 200)

When you sell your 100 shares on day 3 for $2 each you will have a loss of:

$550 = 100 x ($2.00 – $7.50). Of this loss only $275.00 may be claimed as a capital loss for tax purposes.

The loss is then calculated against the average.

Superficial Losses

While the topic here is calculating the adjusted cost base of multiple purchases of securities it is important to remind you about superficial losses (also called stop losses). 

If the same stock or investment was purchased 30 days before or after a sale, any losses are denied.  The amount of the loss is added to the cost of re-acquired shares.  Similarly, if you sell your shares and your spouse re-purchases the investment the loss will still be denied.

(Thanks to DK for pointing out the importance of this!)

About The Tax Guy...

Dean Paley CGA CFP is a Burlington accountant and financial planner who services individuals and business owners locally, nationally and internationally. Dean has appeared in the National Post, Toronto Star and Metro News.

To find out more, visit Dean's website Dean Paley CGA CFP or connect via Twitter @DeanPaleyCGACFP.

Print This Post Print This Post


DK March 3, 2009 at 5:54 pm

Aren’t you forgetting the superficial loss rules? The $550 loss was a superficial loss and therefore cannot be claimed as a capital loss. Rather, the loss is added to the ACB of the remaining shares.

Tax Admin March 3, 2009 at 8:05 pm

Agreed. In context, though the question was about determining the adjusted cost base of multiple purchases. If the same security s acquired 30 days before or after a disposition and a loss results, that loss is denied and the amount of the loss is added to the ACB of reacquired shares.

Clueless March 5, 2009 at 12:24 pm

What about exchange rates? If you purchased a U.S. dollar stock, for example the exchange rate was $1.40 CND = $1.00 US, and sell stock when the exchange rate is lower, for example, $1.06 CND = $1.00 US, how is the factored into your Captial Gains or Loss?

Tax Guy March 5, 2009 at 12:45 pm

You convert your purchase into Canadian dollars using the rate in effect when you bought the stock.

You the convert your stock into Canadian dollars using the rate in effect when you sold it.

When you record the gain or loss, the exchange rate is factored into the amounts.

Remember the CRA is concerned with Canadian dollars only. When you engage in any taxable transactions, you need to take note of the exchange rates on the day you did the transaction.

TJW April 9, 2009 at 9:51 pm

What are the rules around selling shares in a private company so I can lock in a gain? I want to buy back those same shares at the higher price the same day-if possible. Essentially I have a loan for 50 on shares worth 100. Since my existing postion has 50 in capital gains (which qualify for the 750,000 exemption), I want to access that amount by selling. But becuase I need to own shares (job requirment), I need to buy them back by financing the purchase. Are there rules around waiting to buying back the shares like there is on selling to record a loss?

Tax Guy April 9, 2009 at 10:51 pm


There does not appear to be any issue with your plan.

Since this is a small business corporation, I must strongly recommend you get an independent professional opinion.


TG April 28, 2009 at 10:25 pm

If I have a superficial loss on stocks that were bought and sold throughout the year, can I sell them all and book the loss.

Eg. Stock is bought and sold February-November numerous times and has a superficial loss. If I sell all remaining shares in November and do not buy any more for 31 days can it be delared a loss?

Tax Guy April 29, 2009 at 8:22 am

@ TG

If you had purchased a security 30 days before or after you sold it, the gain is taxable and the loss is superficial and denied.

For each and every purchase, you must go back and determine if there was a gain or loss. If the transaction occurred within the 30 day period, the amount of the loss is added to the ACB of your new purchase. You must repeat this process until you have accounted for all transactions in the tax year.

Again, be mindful that if you have a gain, it is realized and your ACB is then reset.

The process is not simple, but is required.

TG April 29, 2009 at 8:58 am

Let me provide an hypothetical example of Company XYZ that was bought and sold throughout 2008:

15-Jul-08 Buy 18 $56.86
16-Jul-08 Buy 12 $55.63
23-Jul-08 Buy 22 $52.76
24-Jul-08 Buy 11 $52.13
8-Sep-08 Sell 20 $52.78
24-Sep-08 Buy 25 $49.63
16-Oct-08 Sell 68 $41.75

Bought in July and sold out of the whole position eventually in October. I should be able to declare a loss on the overall position right? It would be bona-fide 31 days after October 16.

Or am I missing something?

Tax Guy April 29, 2009 at 12:39 pm

@ TG:

Not on the whole position.

After July 24th your ACB is $3,419.25 on 63 Shares, or $54.3681 per share.

On September 8th, you sold 20 shares and received $1,055.60. The loss as of September 8th is $31.76 [= 1,055.6 – (25 x $54.3681)]. Your new ACB is $2,337.83.

You bought 25 of the same shares September 24th, which was only 16 days later so the September 8th loss is superficial and is added back to the ACB of the new shares. Following the September 24th re-purchase, your ACB is $2,337.83 plus 25 x $49.63 plus the $31.76 loss from September 8th or $3,610.34 (this is $53.0933 per share).

On October 16th you sold the entire position. October 16th is only 22 days from September 24th and therefore any loss on the first 25 shares is superficial (see * note below) and the remainder is a capital loss. These are calculated as:

Superficial loss = (25 x $49.63) – (25 x 53.0933) = $283.58*
Realizable Capital Loss = (43 x $49.63) – (43 x $49.63) = $487.76.

* As long as the shares are not reqcquired within 30 days of October 16th, then the entire loss is realizable an none of it is superficial.

Mike December 24, 2010 at 10:47 pm

Realizable Capital Loss = (43 x $49.63) – (43 x $49.63) = $487.76.
I believe this should be =(43*53.0933)-(43*41.75)=487.76
Superficial loss = (25 x $49.63) – (25 x 53.0933) = $283.58
As long as the shares are not reqcquired within 30 days of October 16th, then the entire loss is realizable an none of it is superficial.
If this is the last transaction for this stock, are you saying the Capital Loss is $771.34?

Thank you for your help

Tax Guy December 27, 2010 at 8:54 am

Yes. The total capital loss would be 771.35 after 30 days.

RS May 4, 2009 at 3:15 pm

For stock options, is the gain from Same Day Sale calculated as direct income or capital gain?

Tax Guy May 4, 2009 at 8:11 pm


Whether a gain or loss capital or not depends on whether the taxpayer’s transactions in securities are considered capital or income.

If your investments are normally considered capital then exercising options and selling the investments immediately would be capital.

JR April 15, 2010 at 12:09 pm

I understand your advice about converting the transaction amounts to CAD using the exchange rate on the date of the transaction. I wonder if you can tell me what I should do for eMini Futures like ES (S&P 500 futures). Because one future could be over $50000, even small currency fluctuations can be significant.

For example:
day 1: Buy 1 ES at 1000 (value $50000 US)
– exchange = 1.10 CAD/USD -> $55000 CAD
day 2: Sell 1 ES at 1001 (value $50050 US)
– exchange = 1.09 CAD/USD -> $54554.5 CAD

So even though we have a profit of $50 US, in CAD we have a loss of $445.50. What do I use the CAD loss, or do I just convert the $50 US profit to $54.50CAD using day 2s exchange rate?


Tax Guy April 15, 2010 at 12:19 pm

Hi JR:

The best way to think of it, is this way. For tax purposes all “transactions” must be converted to Canadian dollars at the relevant rate in effect at the time the transaction settled. The CRA is not accepting the currency risk, the investor is.

In this example, your cost is $55,000 and your POD is $54,554.50. The loss is $445.50.

Take alook at

JR April 15, 2010 at 1:07 pm

Thanks Tax Guy.
I guess the thing that gets me is that it’s possible to buy an ES contract with only a small amount of capital (something like 5000). It seems strange that even though you may not have exchanged a huge amount of CAD currency in order to buy the contract the currency exchange applies to the full value of the contract. I read the link you posted, and I think that this would be equivalent to using a “borrowed funds” to purchase capital property.
It’s not affecting me this way, but if the exchange rate didn’t cooperate I could see easily having to pay far more capital gains tax than you actually realized.

Ed April 17, 2010 at 1:27 am

Hi Tax Guy,
Got the following example from CRA site. I can follow their explanation on Average Cost and ACB, but as a beginner, I can’t figure out what happened in 2006. Selling 200 shares with a proceed of $3600, would there be no capital gain/loss, seeing that the ACB is $18 before and after the sale?

Also, what type of capital gain if there is a sale in 2010?

1999 Buy 100 $15.00 ACB = 15
2004 Buy 150 $20.00 new ACB = 18

2006 Sell 200 $18.00 new ACB = 18
2009 Buy 350 $21 new ACB = 20.63

2010 Sell 200 $ 30

Tax Guy April 17, 2010 at 2:50 pm

Hi Ed:
100 x $15 plus 150 x $20 is $4,500. Since they own 250 shares the ACB is $18/shares.

Since the FMV in 2006 was $18 per share there is no gain or loss.

In 2010 the gain is $1,939.75 and the taxable gain is $969.88

Ed April 19, 2010 at 12:11 am

Hi Tax Guy,
Thanks for the explanation. However, I couldn’t see how the gain for 2010 = $1939.75.
given that:
2009 Buy 350 $21 new ACB = 20.63
2010 Sell 200 $ 30

shouldn’t the gain be:
($30-ACB$20.63)*200 shrs= $1874?
I’m sorry if I’m missing something here.

Thanks again.

Tax Guy April 19, 2010 at 8:06 am

Ha ha, my mistake. You are correct: The gain should be $1,874.

Ed April 20, 2010 at 2:35 pm

Hi Tax Guy,
Thanks for clearing that up.
A friend did thousands of trades for 2009. His method of calculating Cap gain/loss is by using info from his broker’s summary statement. I’m not sure if this is correct, but this is what he used:

Gain/loss = [total proceeds+(shares remaining*average shr price)]- total cost

I’ve tried using the method you described (using ACB) vs his method. The result is very different.

What do you think?


Tax Guy April 20, 2010 at 2:51 pm

Hello Ed,

The acquisition and disposition of capital property is done at the security level and not at the account level. By default, your friend’s method is incorrect.

The cost of all common shares of XYZ must be determined and then the average cost per share of XYZ calculated. The gain on XYZ is the proceeds of the disposition less the average cost per share of XYZ.

Then you move to ABC, and RTQ etc. until each gain and loss on each position is calculated. The net gain or net loss is added to the tax return.

You’ll need a spreadsheet with a tax for each security.

Ed April 20, 2010 at 4:33 pm

Hi Tax Guy,
Sorry, I should’ve mentioned that all of his trades are of the same security. Hope I’m not troubling you too much. Here’s an example, using your method (ABC).

all in 2009
Buy 100 $10.00 ACB = 10
buy 200 $29.00 ACB = 16.67
sell 200 $30.00 gain = proceed $6000-(200*16.67) = $2,666.67
buy 100 $20.00 ACB = 18.33

my friend’s method:
(note: average cost=total cost/total shrs; 17.50=7000/400)
gain=[proceeds+(units remaining*average cost)]-cost
$2500.00 = [6000+(200+17.50)]-7000

As you can see, not only is the gain different ($2,666.67 vs $2,500), but so is the last ACB (18.33 vs 17.50).

Is there a simple reason why this is so?


Tax Guy April 20, 2010 at 7:47 pm

Hello Ed,

I’m not sure where the $16.67 comes from.

The ACB after the two buys is:
$6,800 / 300 = $22.67

The gain is $6,000 (200 x $30) less $4,533.33 (200 x $22.67) = $1,466.67.

You need to calculate each trade independently and adjust for superficial losses if they apply.

Ed April 20, 2010 at 9:00 pm

Hi Tax Guy,

The $16.67 came from my butter finger. The purchase price of the 200 shares should have been $20, my typo. Thank you very much for your expert advice. Much appreciated.


shaz suleman April 25, 2010 at 8:28 am

What is the best tax software for keeping track of stock gains/losses over multiple years .
I am having a lot of difficulty with My Us stocks that I purchased 5 years at a different exchange rate.I have aspecial US a/c for these stocks.

Tax Guy April 25, 2010 at 8:57 am

Hi Shaz:
Realistically, Microsoft Excel or any other spreadsheet. Track the price, exchange rate, and commission paid. That’s it really.

With the exchange rate, you should use the nominal rate on the date of the buy or sell. You can get this from the Bank of Canada. For dividends and interest, use the average rate for the year.

Ra H123 May 4, 2010 at 8:42 pm

Hello Tax Guy and Tax experts,

a> I bought 17K worth of US stocks in USD in 2008 trhu Questrade

b> At the time if I exhcanged my CAD to USD
it would have cost 19.5K CAD

c> I waited couple of months and converted my CAD
to USD to pay for the stocks it cost me $21.5K CAD
in 2008

d> I sold my stocks for 23K USD

e> At the if I exhcanged I would have got 24.5K CAD

f> I waited and exchanged my USD back into CAD
in 2010 for 24K.

Please advise me on my
Capital gains
Currency gain/loss
Which year these are applicable.

I look forward to your reply.

Ra H123 May 4, 2010 at 8:44 pm

d> I sold my stocks for 23K USD happened in December 2010.

Note: all numbers and conversion are approximate.

Ra H123 May 4, 2010 at 8:45 pm

d> I sold my stocks for 23K USD happened in December 2009

DK May 4, 2010 at 8:59 pm


Your capital gain for tax purposes is $5000 for 2009.

You simply take the proceeds of the sale ia measured in CAD ($24,500) and subtract your cost basis as measured in CAD ($19,500) = $5000.

The applicable year is 2009 as that is when you realized the gain by selling the stock.

Ra H123 May 4, 2010 at 9:09 pm

Thank you.
I want to know about Currency losses how much and for what year ?

Berni June 9, 2010 at 9:58 am

7 years ago I received 150,000 shares in a private corporation as part of my hire contract. The value of the shares at the time was $0.29 per share. I was told that I didn’t have to pay capital gain on the shares at that time because of the way the shares were issued. The company has gone bankrupt in 2009. Can I claim a capital loss for the shares on my 2009 tax return even though I never filed the original shares on my taxes 7 years ago?

Tax Guy June 9, 2010 at 10:43 pm

Hello Berni:

First of all your ACB per share would be $0.29. You can claim a deemed disposition on your tax return on the shares for nil value if the company is bankrupt under the Bankruptcy and Insolvency Act or is winding up under the Winding-up and Restructuring Act.

You simply make the election by including a letter to your return indicating you are claiming a loss on the shares under section 50(1) of the Income tax Act.

If you cannot use all of the losses and the company was a CCPC, you may be able to claim the loss as an allowable business investment loss as opposed to a capital loss. This would allow you to claim a deduction of about $43,500 to be used against all income.

Certain conditions need to be met, and I would encourage you to work with an accountant to make the claim.

lee September 17, 2010 at 7:29 am


If for example I buy a US stock on Nasdaq for $5 and then sell it 3 months later for $10. What would be the capital gains tax that I must pay on this (I am a resident/citizen of Canada). Would I pay a lower capital gains tax if I hold the stock for a full 12 months or longer assuming it went from $5 to $10 in these 12 + months ?

Thanks for your input.

Tax Guy September 17, 2010 at 11:39 am

You need to convert the $5 into Canadian dollars using the rate that was in effect on the day you bought the share.

The sale proceeds must be converted into Canadian dollars using the rate in effect on the day the shares were sold.

The difference between the two converted amount is the gain or loss. The time you held the stocks is irrelevant in Canada.

Comments on this entry are closed.

Previous post:

Next post: