Calculation of ventilation rate