A capnography system has a 4.2 micron LED emitter of narrow-band radiation having a center wavelength very close to the 4.26 micron absorption band of CO.sub.2 breathing gas in a breathing tube. The radiation passes through windows in an insert in the breathing passage between the LED source and an infrared detector in an opposite side of the insert. A mirror is optionally placed in the opposite wall to reflect the radiation back to the detector which is then placed on the same side as the emitter. The LED emitter is pulsed at a low frequency repetition rate with a regulated voltage from a power supply. The detector output is applied to processing electronics which includes amplification and dual integrators that integrate the detector output on two signal paths, one the integration of each pulse and the other the integration of detector background with the two differences to provide self calibration against drift and noise. A heater heats the emitter, infrared detector, local electronics and the windows thereby stabilizing these temperature sensitive components to minimize the measured CO.sub.2 value error to a few mm of mercury and to prevent condensation on the insert particularly in the windows. A second emitter is optionally used as a reference and/or to detect additional gas concentrations.