A new method for the measurement of pulmonary gas exchange during inhalational anaesthesia is described which measures fresh gas and exhaust gas flows using carbon dioxide as an extractable marker gas. The theoretical precision of the method was compared by Monte Carlo modelling with other approaches which use marker gas dilution. A system was constructed for automated measurement of uptake of oxygen, nitrous oxide, volatile anaesthetic agent and elimination of carbon dioxide by an anaesthetized patient. The accuracy and precision of the method was tested in vitro on a lung gas exchange simulator, by comparison with simultaneous measurements made using nitrogen as marker gas and the Haldane transformation. Good agreement was obtained for measurement of simulated uptake or elimination of all gases studied over a physiologically realistic range of values. Mean bias for oxygen and nitrous oxide uptake was 0.003 l min(-1), for isoflurane 0.0001 l min(-1) and for carbon dioxide 0.001 l min(-1). Limits of agreement lay within 10% of the mean uptake rate for nitrous oxide, within 5% for oxygen and isoflurane and within 1% for carbon dioxide. The extractable marker gas method allows accurate and continuous measurement of gas exchange in an anaesthetic breathing system with any inspired gas mixture.