Spherical Aberration Simulator Back
Optics Simulator

Spherical Aberration Simulator — Paraxial vs Marginal Focus

In a plano-convex lens, rays at different heights focus at different points. Simulate this third-order spherical aberration by varying radius, refractive index and ray aperture height.

Parameters
Radius of curvature R
mm
Refractive index n
Ray height h
mm
Lens diameter D
mm

The ray height h sets the height used to evaluate the marginal ray focus shift. The lens diameter D sets the drawing range (up to D/2).

Results
Paraxial focal length f_paraxial
Longitudinal aberration LA
Marginal ray focus f_marginal
Numerical aperture NA = (D/2)/f_p
Plano-convex lens and ray diagram

Parallel rays at several heights (green = near-axis, red = marginal) / blue dashed line = paraxial focus f_p, orange dashed line = marginal focus f_marginal

Theory & Key Formulas

For a plano-convex spherical lens (planar second surface), the paraxial focal length is given by the refractive index n and the radius of curvature R as:

$$f_\text{paraxial} = \frac{R}{n-1}$$

The third-order spherical aberration at ray height h (the focus shift) is approximated by the following expression. Larger h gives a shorter focus.

$$\Delta f(h) = -\,f_\text{p}\,\frac{(n^2+2n-1)\,h^2}{8\,n\,(n-1)\,R^2}$$

The marginal ray focus, longitudinal spherical aberration LA, and numerical aperture NA are:

$$f_\text{marginal} = f_\text{p} + \Delta f(h),\quad LA = f_\text{p} - f_\text{marginal},\quad NA = \frac{D/2}{f_\text{p}}$$

Spherical aberration scales as h squared, a positive third-order aberration. The coefficient sign is negative, so the marginal focus f_marginal lies closer to the lens than the paraxial focus.

What is the Spherical Aberration Simulator

🙋
When taking photos, opening the aperture blurs the edges, and stopping down makes everything sharp. Is that related to spherical aberration?
🎓
Very much so. Roughly speaking, a spherical lens focuses rays near the optical axis and rays through the rim at different points. As a formula the focus shift $\Delta f(h)$ scales as the square of the ray height $h$. In the simulator above, increase the "ray height h" and watch the marginal focus f_marginal move inward, closer to the lens, away from the paraxial focus f_p.
🙋
Wait, h squared? So rays through the rim hurt much more than rays near the center?
🎓
Right. That is why stopping down — which blocks the marginal rays — makes the image sharp; only the near-axis rays survive. With the defaults R=100mm, n=1.5, h=20mm the LA is about 5.67mm, roughly 3% of the 200mm paraxial focus. Halve h to 10mm and LA shrinks to about 1.4mm — one quarter. The square-law dependence really bites.
🙋
What happens to LA if I raise the refractive index n? Does a high-index glass help?
🎓
Yes, it helps. Look at the coefficient $(n^2+2n-1)/(8n(n-1))$ — pushing n from 1.5 to 1.8 roughly halves the LA. That is why high-index glasses and high-index polymers help in a single element. Polish the surface as an asphere and you can drive LA toward zero in principle. Smartphone camera lenses are almost all aspheric.
🙋
What does the numerical aperture NA = (D/2)/f_p actually mean?
🎓
NA measures the "strength" of light gathering — essentially the sine of the half-angle of the converging cone the lens captures. With the defaults NA = 0.150. Larger NA gives a brighter image and finer resolution, but spherical aberration grows as h² along with it. High-NA design is fundamentally a spherical-aberration correction problem, which is why telescope objectives and microscope objectives stack many elements.

Frequently Asked Questions

An aspheric lens is shaped as a free-form surface with a conic constant and higher-order coefficients rather than a pure sphere. Refraction can be tuned to weaken slightly toward the rim so that marginal and paraxial rays cross at the same point. Smartphone camera lenses and Blu-ray pickup lenses are typical examples, where a single aspheric element drives spherical aberration close to zero.
The classic solution is a doublet (achromat): a positive element bonded to a negative one. Convex elements introduce negative spherical aberration and concave elements introduce positive aberration, so by choosing indices and shapes the two cancel. Triplets and four-element photographic lenses extend this to suppress spherical aberration, coma, field curvature, distortion and chromatic aberration together.
Seidel classified the monochromatic third-order aberrations of imaging systems into five terms: spherical aberration, coma, astigmatism, field curvature and distortion. Spherical aberration depends on the on-axis ray height, while coma, astigmatism and field curvature also depend on field angle. Modern lens design software drives these five coefficients plus two chromatic terms below specified targets through optimization.
With spherical aberration, axial rays focus at the paraxial focus while marginal rays cross the axis closer to the lens. Between them the ray bundle pinches to its narrowest point, called the circle of least confusion (CoLC), which sits roughly midway between paraxial and marginal foci. Placing the sensor at this point yields the sharpest image.

Real-World Applications

Camera and smartphone lens design: Photographic lenses almost always combine aspheric elements with several glass or polymer elements to suppress spherical aberration. Smartphone cameras in particular stack seven or eight aspheric elements within a 1–2 mm thickness, achieving near-zero spherical aberration in a high-NA optical system around F/1.8.

Astronomical telescope and microscope objectives: Large-aperture telescopes and high-power microscopes need high NA, and the difficulty of spherical aberration correction explodes. A classic Schmidt-Cassegrain telescope uses a corrector plate to cancel spherical aberration, while modern microscope objectives correct chromatic and spherical aberrations simultaneously with 10 to 15 precisely polished glass elements.

Optical disk pickups and laser machining: Blu-ray pickups and laser machining condenser lenses use ultra-high-NA optics around 0.85 to focus down to a spot smaller than the wavelength. A single aspheric lens drives spherical aberration to essentially zero in theory, achieving a diffraction-limited spot at the wavelength scale.

Ophthalmology and contact lenses: Myopia-correcting lenses and intraocular lenses after cataract surgery are also designed with spherical aberration in mind. When the pupil opens wide in low light, marginal rays carry more weight and spherical aberration becomes visible, so aspheric intraocular lens designs are used to improve night vision.

Common Misconceptions and Cautions

The first trap is to confuse spherical aberration with "the image being out of focus". Defocus is simply a distance error between the image plane and the focal point, and stopping down does not change where the image is in focus. Spherical aberration, however, is a phenomenon in which rays from the same object focus at different points depending on ray height. Stopping down leaves only axial rays and improves the image. Lowering h to a small value such as 5mm in the simulator shrinks LA to about 0.35mm — exactly the "stopped down" state.

The next common mistake is to believe that higher refractive index makes spherical aberration worse. The opposite is true. The coefficient $(n^2+2n-1)/(8n(n-1))$ decreases as n grows: about 1.42 at n=1.5, 0.74 at n=1.8, 0.59 at n=2.0 — monotonically falling. High-index glasses have larger chromatic dispersion, but they are favorable for spherical aberration correction. Try moving the n slider in the simulator and watch LA change.

Finally, do not assume this formula is "always exact". The simulator uses Seidel's third-order aberration approximation, which is accurate when $h/R$ is small (roughly below 0.3). As $h/R$ approaches 1, as in h=50mm and R=50mm, fifth-order and higher aberration terms can no longer be ignored, and the real focus shift exceeds this formula's prediction. Practical lens design uses ray-tracing software such as Code V or Zemax to compute every ray rigorously, and the third-order approximation serves only as guidance for the initial design.