A method and system of regulating the air to fuel ratio supplied to a burner to maximize the combustion efficiency. Optical means are provided in close proximity to the burner for directing a beam of radiation from hot gases produced by the burner to a plurality of detectors. Detectors are provided for sensing the concentration of, inter alia, CO, CO.sub.2, and H.sub.2 O. The differences between the ratios of CO to CO.sub.2 and H.sub.2 O to CO are compared with a known control curve based on those ratios for air to fuel ratios ranging from 0.85 to 1.30. The fuel flow is adjusted until the difference between the ratios of CO to CO.sub.2 and H.sub.2 O to CO fall on a desired set point on the control curve.