Five gas components (CO2, N2, He, Xe and H2) in a CO2 laser are optimized by applying a genetic algorithm and taking the laser power as an objective function. With a resonator of 1.2ml ength and constant discharge voltage of 15kV, the laser power increases by 1.27 times after the optimization with the optimized gas pressures of 1. 15×133.3Pa for CO2, 7.32×133.3Pa for N2, 12.95×133.3Pa for He, 0.36×13 3.3Pa for Xe and 0.01×133.3Pa for H2 respeotively.