The first in first out (FIFO) accounting method is one way to calculate cost basis. FIFO is the simplest and more common accounting method used. Once you choose any accounting method you must continue to use the same method for the life of the associated investment.
When selling shares using the FIFO method the earliest purchased shares are those which get sold first. Your cost basis is the amount spent acquiring the sold shares. Fund Manager includes any commission fees or loads associated with the purchases in your cost basis. The cost basis is also adjusted for any account fees or return of capital distributions. Account fees increase your cost basis, while return of capital distributions reduce your cost basis. Fund Manager subtracts off any commission fees or loads associated with the sell to obtain the sell value. The capital gains incurred equals the sell value minus the cost basis.