A breathing mask (3) for ventilating a patient is disclosed herein. The breathing mask includes a housing (15) covering a respiratory passage of the patient and a first cavity (25) surrounded at least partly by the housing conveying both an inspiratory and expiratory gas. The breathing mask further includes a respiratory port (32) delivering the inspiratory gas from the first cavity (25) and the expiratory gas to the first cavity (25) and a sampling cell (26) in flow communication with the first cavity, which sampling cell is adapted to convey both the inspiratory gas towards the respiratory port and the expiratory gas from the respiratory port. The sampling cell comprises at least one component (33) for enabling a signal acquisition of at least one of the inspiratory and expiratory gas compound. A gas analyzer for respiratory gas measurement is also provided.