Using density functional theory combined with thermochemical data, we analyze the formation of native and carbon-related defects in yttrium aluminum garnet (YAG) grown in a CO-containing atmosphere. The concentrations of various defect species in as-grown YAG are computed as functions of the partial pressures of CO, CO2, and O2. Under reducing conditions, carbon preferentially forms negatively charged CO defects, whereas positively charged CAl defects at the tetrahedral 24(d) positions dominate