In general terms, the cost base can be calculated as follows:
Cost Base = Purchase Price + Brokerage on Purchase + Brokerage on Sale
The above is only relevant for shares and units. For other assets, such as property, other costs may need to be included. Visit the ATO to learn more.