Take the invested amount in a crypto coin, add the fee and divide by the number of coins that you have, in other words (Purchase Price + Fees) / Quantity. This will give you the average price of what you paid for every coin, also known as the cost basis.