Separation and quantitative analysis of impurities in solution