Automated analysis and interpretation of spirograms is provided to assess lung function of a subject. If the shape of a spirogram plot is deemed suitably reliable, the spirogram may be subsequently used for diagnostic purposes. Quality control of spirograms and/or interpretation of reliable spirograms may use shape templates corresponding to common test problems and/or typical lung diseases.