When you buy an investment or other taxable property, you may have a capital gain  or loss when you eventually sell. The Gain or loss is the difference between what you received from the sale and what you paid for it.
Knowing what is included in the cost, can help reduce your tax bill. Particularly when it comes to dividend reinvestment programs (DRIP) common to mutual funds  and some stocks, as well as vacation  or rental properties.
Adjusted Cost Base: The Basics
The Income Tax Act allows for certain adjustments to the purchase price for income tax purposes , hence the term adjusted. These adjustments may increase your cost base for tax purposes and reduce your future capital gains.
The starting point is either the value of the property on December 31, 1971, of course if you owned it on that date, or the purchase price paid for the asset.
Adjustments, or additions to the cost for tax purposes may include other incidental costs such as commissions, transfer taxes, sales taxes, legal or accounting fees. Some investments such as REIT’s or certain mutual funds may pay a return of capital which can lower your ACB.
Real Estate & ACB
The cost of your investment in real estate includes not only the price paid, plus real estate agent commissions, legal fees and land transfer taxes. The cost may also include, improvement costs including renovations and certain maintenance costs.
Failing to keep track of these costs can cost you. Consider a $50,000 addition on a rental property or vacation property. Failing to include the renovation cost may cost you $12,000 in extra taxes.
Mutual Funds & Stocks
Mutual funds distribute the interest and dividends the fund received to its unitholders and many unitholders agree to allow the fund to reinvest these back into the fund. The fund uses the distribution to buy new units of the fund at the current fund price. Example:
You invested $50,000 into XYZ fund. You received 3,390 units. Three months later, the fund distributed $150 of income when the unit price was $15.25 per unit. The ACB is:
The original ACB is $50,000, plus the $150 re-invested in the fun, or $50,150. The number of units owned are 3,399.836.
The reinvested funds are simply added to the cost.
Also note that the ACB is the cumulative total cost and has little to do with the number of units. The only time the number of units comes into play is at the time of sale, when you divide the total cost by the number of units and multiply the result by the number of units sold. This amount is the ACB of the sale and reduces the gross ACB.
Stocks work very much the same way, although if you have DRIP on your stocks, any commission would also be added to the ACB.