High-performance liquid chromatography (HPLC) separates the components of a sample by passing it, under pressure, through a column that causes different substances to travel through and exit at different rates. A detector then records each component as it exits, producing a chromatogram. HPLC is commonly used to establish purity: the relative amount of the main compound compared to everything else detected in the sample.
Mass spectrometry measures the mass-to-charge ratio of ionized molecules, which allows a laboratory to determine a sample’s molecular mass very precisely. Comparing an observed mass against the theoretical mass calculated from a compound’s known sequence is a standard way to confirm identity. LC-MS combines liquid chromatography with mass spectrometry, separating a sample and identifying its components in a single run.
What HPLC alone cannot establish is a compound’s identity with certainty — a peak at the expected retention time is consistent with the expected compound, but retention time alone is not conclusive proof of molecular identity the way a mass measurement is. That is one reason identity and purity are reported, and often tested, separately.