I believe they factor into calculating the gain/loss. E.g., if you buy 100 units for $99 plus a $1 fee, then your cost basis is ($99 + $1)/(100 units) = $1.00/unit. If you later sell them all for $111 with a $1 fee, then your capital gain is ($111 - $1) - ($100) = $10.
I believe they factor into calculating the gain/loss. E.g., if you buy 100 units for $99 plus a $1 fee, then your cost basis is ($99 + $1)/(100 units) = $1.00/unit. If you later sell them all for $111 with a $1 fee, then your capital gain is ($111 - $1) - ($100) = $10.