The sample dependent spatial resolution was calculated for transmission electron microscopy (TEM) and scanning TEM (STEM) of objects (e.g., nanoparticles, proteins) embedded in a layer of liquid water or amorphous ice. The theoretical model includes elastic- and inelastic scattering, beam broadening, and chromatic aberration. Different contrast mechanisms were evaluated as function of the electron dose, the detection angle, and the sample configuration. It was found that the spatial resolution scales with the electron dose to the −1/4th power. Gold- and carbon nanoparticles were examined in the middle of water layers ranging from 0.01–-10 µm thickness representing relevant classes of experiments in both materials science and biology. The optimal microscope settings differ between experimental configurations. STEM performs the best for gold nanoparticles for all layer thicknesses, while carbon is best imaged with phase-contrast TEM for thin layers but bright field STEM is preferred for thicker layers. The resolution was also calculated for a water layer enclosed between thin membranes. The influence of chromatic aberration correction for TEM was examined as well. The theory is broadly applicable to other types of materials and sample configurations.