For me I would compute it the simplest way possible. For example, I add all expenses that I have made when buying coins using fiat currency until it reaches the wallet on cryptocurrency exchanges and multiply it by two. This is for the sending back process to fiat. Now if I am going to sell my coins it should be more than the expenses that I have computed in advance. By deducting I wil know how much did I gain.