The influence of stress on the elastic modulus E and hardness H in soda-lime glass was studied in the Vickers residual stress field by nanoindentation. The Oliver–Pharr method of analysis first gave higher values of E and H, but after correcting for the pileup contact areas around the nanoindents, results consistent with literature values were obtained at regions in the stress field where the stresses were either low or close to zero. Determination of the pileup contact areas was made possible by the use of the atomic force microscope, which has facility for generating cross-section images of the indents. The elastic modulus was found to decrease with stress, which is explained with reference to the influence of applied stresses on the Si–O–Si bond angle. The hardness on the other hand did not depend on the stresses except in the region very close to the edge of the Vickers indent where the stresses are high.