Purity is measured by chemical analysis. The analysis should determine both what the substance is, and what impurities it contains. There are several analytical techniques available, depending on what you want to know. For organic compounds, the most common are infrared spectroscopy, mass spectrometry, and nuclear magnetic resonance spectroscopy. Other methods include titration and combustion analysis. Also it has a fixed melting point or boiling point at constant pressure. For example, pure water boils at 373K at 1 atmospheric pressure. But water containing some invisible dissolved substance boils at a temperature above 373K.