A differential mobility analyzer (DMA) was tested at different compositions of aerosol and sheath gas flow using monodisperse polystyrene latex particles. The actual size of the particles had been determined by scanning electron microscopy. We found that different conditions of relative humidity in aerosol and sheath flow in the DMA cause changes less than 3% in particle size. Different gas compositions (air and nitrogen, air and carbon dioxide and air and helium) result in a change of particle size less than 6% if the density ratio k of aerosol and sheath flow is close to one (0.95 < k < 1.05). For ratios of k much smaller or larger than one the changes depend on the gas used for the composition. They may range from poor resolution to no resolution at all.