The special properties of the Wasserstein distance make it a particularly well-suited tool for the analysis of spectroscopic data. Firstly, this metric is robust to measurement inaccuracies and shifts along the horizontal axis, as transporting even considerable amounts of mass over small distances is not costly. In practice, it means that for the two spectra that share the intensities of peaks but slightly differ in their positions or lineshapes, the Wasserstein distance will be small. It can be calculated for spectra with distorted, irregular lineshapes resulting from non-homogeneous magnetic fields or peak overlap. Finally, as already mentioned, thanks to representing spectra as probability distributions instead of vectors, any two spectra can be compared this way, regardless of their resolution and spectral window.