Abstract Spatial resolution for compositional analysis in STEM depends upon instrumental parameters as well as the characteristics of the sample being observed. In an effort to characterize the importance of these parameters in defining spatial resolution for microanalysis, experiments on materials of scientific interest have been performed and the results tested against a model. Experiments have been performed involving the depletion of Cr at grain boundaries is sensitized stainless steels and the segregation of Fe to grain boundaries in heat-treated MgO. The experimental composition profiles have been determined as a function of sample thickness and incident probe size. These results have been modelled by describing the electron intensity as a Gaussian distribution that broadens with depth in the sample. The impact that increasing sample thickness and increasing electron probe size have on spatial resolution for microanalysis is discussed with reference to the experimental data obtained and the model used.