A nutritional study of Xanthomonas campestris in the production of xanthan gum was carried out by factorial design and analysis of experiments. The concentrations of nutrients such as nitrogen, phosphorus, magnesium, and sulfur were studied by means of a factorial design at two levels, reduced to a half with four central points for error estimation. Three responses were considered, corresponding to biomass, sucrose, and xanthan concentrations, at four different times: 12, 16, 20, and 24 h. The influence of nitrogen, phosphorus, and magnesium on the biomass, and the influence of nitrogen, phosphorus, and sulfur on xanthan production, were significant, although any variable influenced sucrose consumption. An optimized medium was proposed for xanthan production.