A spirometer is a medical device used to measure how well your lungs are working by checking lung volume and airflow.