Breath composition is altered in liver diseases. We tested if ion-molecule-reaction mass spectrometry (IMR-MS) combined with a new statistical modality improves the diagnostic accuracy of breath analysis in liver diseases. We analysed 114 molecules in the breath of 126 individuals (healthy controls, and patients with non-alcoholic and alcoholic fatty liver disease and liver cirrhosis) by IMR-MS. Characteristic exhalation patterns were identified for each group. Combining two to seven molecules in the new stacked feature ranking model reached a diagnostic accuracy (area under the curve) for individual liver diseases between 0.88 and 0.97. IMR-MS followed by sophisticated statistical analysis is a promising tool for liver diagnostics by breath analysis.