\mathrm { CO } ( J = 1 - 0 ) line emission is a widely used observational tracer of molecular gas , rendering essential the X _ { \mathrm { CO } } factor , which is applied to convert \mathrm { CO } luminosity to \mathrm { H _ { 2 } } mass . We use numerical simulations to study how X _ { \mathrm { CO } } depends on numerical resolution , non-steady-state chemistry , physical environment , and observational beam size . Our study employs 3D magnetohydrodynamics ( MHD ) simulations of galactic disks with solar neighborhood conditions , where star formation and the three-phase interstellar medium ( ISM ) are self-consistently regulated by gravity and stellar feedback . Synthetic \mathrm { CO } maps are obtained by post-processing the MHD simulations with chemistry and radiation transfer . We find that \mathrm { CO } is only an approximate tracer of \mathrm { H _ { 2 } } . On parsec scales , W _ { \mathrm { CO } } is more fundamentally a measure of mass-weighted volume density , rather than \mathrm { H _ { 2 } } column density . Nevertheless , \langle { X } _ { \mathrm { CO } } \rangle = 0.7 - 1.0 \times 10 ^ { 20 } ~ { } \mathrm { cm ^ { -2 } K ^ { -1 } % km ^ { -1 } s } consistent with observations , insensitive to the evolutionary ISM state or radiation field strength if steady-state chemistry is assumed . Due to non-steady-state chemistry , younger molecular clouds have slightly lower \langle { X } _ { \mathrm { CO } } \rangle and flatter profiles of X _ { \mathrm { CO } } versus extinction than older ones . The \mathrm { CO } -dark \mathrm { H _ { 2 } } fraction is 26 - 79 \% , anti-correlated with the average extinction . As the observational beam size increases from 1 ~ { } \mathrm { pc } to 100 ~ { } \mathrm { pc } , \langle { X } _ { \mathrm { CO } } \rangle increases by a factor of \sim { 2 } . Under solar neighborhood conditions , \langle { X } _ { \mathrm { CO } } \rangle in molecular clouds is converged at a numerical resolution of 2 ~ { } \mathrm { pc } . However , the total \mathrm { CO } abundance and luminosity are not converged even at the numerical resolution of 1 ~ { } \mathrm { pc } . Our simulations successfully reproduce the observed variations of X _ { \mathrm { CO } } on parsec scales , as well as the dependence of X _ { \mathrm { CO } } on extinction and the \mathrm { CO } excitation temperature .