Calculating concentration/fraction of a compound in a solution