Nondispersive infrared (NDIR) CO2 gas sensor was developed by using White-cell structure and tried to compensate the temperature effects in order to monitor CO2 concentrations without hindering the temperature variations. However, the absorptions of infrared light depend on not only the temperatures but also CO2 concentrations. Thus, a single Beer-Lambert law couldn't properly describe the tendency of voltage decrements within full scale input (FSI, 0 to 5000 ppm) because it was affected by both parameters. In this article, the absorbance of infrared light is defined according to the concentrations of CO2 gas. Then, a new temperature compensation algorithm has been implemented into micro-controller unit (MCU), the measurement errors were within ±3.6% as the temperature-dependent absorbance was chosen at 1450 ppm CO2 concentrations.