PARCEL 1. I buy 1000 shares in company AAA at $1. The brokerage is $20
PARCEL 2. I buy a further 2000 shares in AAA at $2. The brokerage is $30
PARCEL 3. I sell 2600 in AAA at $3. The brokerage is $40.
Before reading on please note I am not an accountant and have never played one on TV. This is not advice.
Some replies in this thread have taken a simple averaging approach, while that is acceptable for your own record keeping it is not acceptable to the ATO. I suggest keeping records one way is easier and thus you may as well do it the way the ATO wants.
Generally speaking you can only parcel share purchases of one company if they are bought on the same day. So in your case as in most cases you can't parcel your purchases together.
Your records for the ATO should look like this:
PARCEL 1. I buy 1000 shares in company AAA at $1. The brokerage is $20. Cost Basis is 1000*1+20 = 1020 / # shares for per share costs is 1020/1000 = $1.02
PARCEL 2. I buy a further 2000 shares in AAA at $2. The brokerage is $30
Cost Basis is 2000*2+30 = 4030 / # shares for per share costs is 4030/2000 = $2.015
PARCEL 3. I sell 2600 in AAA at $3. The brokerage is $40. The ATO is generous in that it lets you decide how to split the sale, i.e. you can choose any logic you like.
I'll assume you want to minimise your current CGT (if you had losses you may wish to maximise, or if you anticipate higher income in future etc).
So, sell 2000 at $3 and apportion 2000/2600ths of the commission ie 30/2600*2000 = 23.08. So receive $6000-23.08 = $5976.92. Minus the original cost basis of 4030 gives CGT of $1946.92 on that parcel.
Then next parcel 600 shares at $3 and remaining commission (30/2600*600) of 6.92 for total received of $1793.08. Minus cost basis of parcel 1 (600*1.02) 612 = $1181.08.
It is very easy to keep track of this on a spreadsheet, or most financial software do it for you.