Lateral profiles of the electron probe of scanning transmission electron microscopy (STEM) were simulated at different vertical positions in a micrometers-thick carbon sample. The simulations were carried out using the Monte Carlo method in CASINO software. A model was developed to fit the probe profiles. The model consisted of the sum of a Gaussian function describing the central peak of the profile and two exponential decay functions describing the tail of the profile. Calculations were performed to investigate the fraction of unscattered electrons as a function of the vertical position of the probe in the sample. Line scans were also simulated over gold nanoparticles at the bottom of a carbon film to calculate the achievable resolution as a function of the sample thickness and the number of electrons. The resolution was shown to be noise limited for film thicknesses less than 1 µm. Probe broadening limited the resolution for thicker films. The validity of the simulation method was verified by comparing simulated data with experimental data. The simulation method can be used as quantitative method to predict STEM performance or to interpret STEM images of thick specimens.