In cystic fibrosis (CF) patients airways mucus shows an increased viscoelasticity due to the concentration of high molecular weight components. Such mucus thickening eventually leads to bacterial overgrowth and prevents mucus clearance. The altered rheological behavior of mucus results in chronic lung infection and inflammation, which causes most of the cases of morbidity and mortality, although the cystic fibrosis complications affect other organs as well. Here, we present a quantitative study on the correlation between cystic fibrosis mucus viscoelasticity and patients clinical status. In particular, a new diagnostic parameter based on the correlation between CF sputum viscoelastic properties and the severity of the disease, expressed in terms of FEV1 and bacterial colonization, was developed. By using principal component analysis, we show that the types of colonization and FEV1 classes are significantly correlated to the elastic modulus, and that the latter can be used for CF severity classification with a high predictive efficiency (88%). The data presented here show that the elastic modulus of airways mucus, given the high predictive efficiency, could be used as a new clinical parameter in the prognostic evaluation of cystic fibrosis.