A method (200) for measuring a patient's expired CO2 level in a non-invasive ventilator system (100) while maintaining a positive inspiratory pressure. The method includes the steps of: receiving (220), by the non-invasive ventilator system, a signal comprising an instruction to obtain a CO2 measurement from a patient; lowering (230), by the non-invasive ventilator system in response to the signal, the expiratory positive airway pressure from a first, higher level to a second, lower level for a first time period comprising one or more breaths; obtaining (240), by a CO2 sensor (160), a CO2 measurement during the first time period; and returning (250), after the first time period, the expiratory positive airway pressure to the first, higher level.