We compare the effects of spherical aberration on the penetration depth of single-photon and two-photon excitation for instances in which the aberration is caused by the refractive-index mismatch when a beam is focused through an interface. It is shown both theoretically and experimentally that two-photon fluorescence imaging experiences less spherical aberration and can thus propagate to a deeper depth within a thick medium.