In this work, a numerical study on the loop-terminated Mach–Zehnder interferometer (LT-MZI) structure for CO2 gas sensing applications is carried out via the finite element method. The sensing arm is covered with a polyhexamethylene biguanide (PHMB) polymer which is highly receptive to CO2 gas. The refractive index of the host material decreases due to the absorption of the CO2 gas resulting in a shift in the interference pattern of the LT-MZI structure. As a result, a redshift in the wavelength is observed in the transmission spectrum of the device. The sensitivity of the device is estimated at 7.63 pm/ppm, 34.46 pm/ppm, and 74.78 pm/ppm for the sensing arm lengths of 5 µm, 10 µm, and 15 µm, respectively. The sensitivity can be further enhanced, however, at the cost of the bigger footprint of the device. Utilizing the innovative sensor design, a comprehensive range of CO2 gas concentrations spanning from 0 to 524 ppm is effectively detected. This compact and highly sensitive device serves as a vital tool for monitoring indoor CO2 levels, fostering a healthier breathing environment for all occupants.