A spirometer is a handheld device used to analyse lung capacity by measuring the volume of air inhaled and exhaled by the lungs.