Calculation of mass from concentration and purity