We study the surface plasmon (SP) resonance energy of isolated spherical Ag nanoparticles dispersed on a silicon nitride substrate in the diameter range 3.5–26 nm with monochromated electron energy-loss spectroscopy. A significant blueshift of the SP resonance energy of 0.5 eV is measured when the particle size decreases from 26 down to 3.5 nm. We interpret the observed blueshift using three models for a metallic sphere embedded in homogeneous background material: a classical Drude model with a homogeneous electron density profile in the metal, a semiclassical model corrected for an inhomogeneous electron density associated with quantum confinement, and a semiclassical nonlocal hydrodynamic description of the electron density. We find that the latter two models provide a qualitative explanation for the observed blueshift, but the theoretical predictions show smaller blueshifts than observed experimentally.