Expired carbon dioxide (ECO 2) indicates degree of lung aeration immediately after birth. Favourable ventilation techniques may be associated with higher ECO 2 and a faster increase. Clinical condition will however also affect measured values. The aim of this study was to explore the relative impact of ventilation factors and clinical factors on ECO 2 during bag-mask ventilation of near-term newborns. Methods Observational study performed in a Tanzanian rural hospital. Side-stream measures of ECO 2, ventilation data, heart rate and clinical information were recorded in 434 bag-mask ventilated newborns with initial heart rate <120 beats per minute. We studied ECO 2 by clinical factors (birth weight, Apgar scores and initial heart rate) and ventilation factors (expired tidal volume, ventilation frequency, mask leak and inflation pressure) in random intercept models and Cox regression for time to ECO 2 >2%. Results ECO 2 rose non-linearly with increasing expired tidal volume up to >10 mL/kg, and sufficient tidal volume was critical for the time to reach ECO 2 >2%. Ventilation frequency around 30/min was associated with the highest ECO 2. Higher birth weight, Apgar scores and initial heart rate were weak, but significant predictors for higher ECO 2. Ventilation factors explained 31% of the variation in ECO 2 compared with 11% for clinical factors. Conclusions Our findings indicate that higher tidal volumes than currently recommended and a low ventilation frequency around 30/min are associated with improved lung aeration during newborn resuscitation. Low ECO 2 may be used to identify unfavourable ventilation technique. Clinical factors are also associated with persistently low ECO 2 and must be accounted for in the interpretation.