PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Optics & Light

Other simulators in this category — or see all 44.

View category →
NewSchool

Prism & Dispersion

White light through a prism creating a rainbow spectrum.

Launch Simulator
NewSchool

Thin-Film Interference

Wedge fringes: n, d, θ; cos²(δ/2) colors and I(λ) at mid thickness.

Launch Simulator
NewSchool

Newton’s Rings

Spherical lens on flat glass: air-film thickness fringes; optional π phase on reflection.

Launch Simulator
NewSchool

Anti-Reflection Coating

Air–film–glass at normal incidence: R(λ) from two-interface interference; quarter-wave design.

Launch Simulator
NewUniversity / research

Michelson Interferometer

I(Δ) = V cos²(πΔ/λ); tilt fringes; coherence length envelope.

Launch Simulator
NewUniversity / research

Mach–Zehnder Interferometer

Two-beam recombination; I ∝ cos²(πΔ/λ) vs one-arm OPD; schematic + fringe plot.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Optics & Light/Thin Lens Equation

Thin Lens Equation

The Thin Lens Equation Simulator visualizes the fundamental relationship between object distance, image distance, and focal length for a converging lens. At its core is the Gaussian thin lens equation: 1/f = 1/d_o + 1/d_i, where f is the focal length, d_o is the object distance, and d_i is the image distance. This equation is a cornerstone of geometric optics, derived from the paraxial approximation where light rays make small angles with the optical axis. The simulator plots the hyperbola d_i(d_o), which has a vertical asymptote at d_o = f and a horizontal asymptote at d_i = f. This graphical representation powerfully illustrates how the image location changes dramatically as the object approaches the focal point from either side. A key learning feature is the ability to verify the reciprocal relationship by plotting 1/d_i versus 1/d_o, which yields a straight line with a slope of -1 and a y-intercept of 1/f. The model simplifies reality by assuming a perfectly thin, ideal lens free from aberrations, and uses the sign convention where distances for real objects and images are positive. By interacting with the controls, students learn to predict image characteristics (real/virtual, inverted/upright, magnified/diminished) based on object position, reinforcing the concepts of focal points, principal planes, and the real image formation condition (d_o > f).

Who it's for: High school physics students and introductory undergraduate optics courses covering geometric optics and image formation.

Key terms

  • Thin Lens Equation
  • Focal Length
  • Object Distance
  • Image Distance
  • Converging Lens
  • Real Image
  • Virtual Image
  • Magnification

Live graphs

1/f = 1/d_o + 1/d_i

14 cm
28 cm

For a thin lens, d_i = d_o f / (d_o − f). Converging: real image when d_o > f (usual convention). Diverging: d_i < 0 always for a real object.

Shortcuts

  • •Compare d_o to |f| for real vs virtual image

Measured values

f14.00cm
d_o28.00cm
d_i28.000cm
m = −d_i/d_o-1.0000
1/d_o + 1/d_i0.071431/cm
1/f0.071431/cm
ImageReal

How it works

The Gaussian thin-lens formula relates object distance, image distance, and focal length. The graph of d_i versus d_o is a hyperbola with a vertical asymptote at d_o = f for a converging lens. Moving the pink point with the d_o slider shows how small changes near the focal plane send the image to infinity or flip the sign of d_i.

Key equations

1/f = 1/d_o + 1/d_i
d_i = d_o f / (d_o − f) · m = −d_i/d_o

Frequently asked questions

Why does the graph shoot up to infinity when the object is at the focal point (d_o = f)?
When d_o equals f, the thin lens equation requires 1/d_i to be zero, meaning d_i is mathematically infinite. Physically, this means the refracted rays are parallel and never converge to form a real image. This is the boundary between forming real images (d_o > f) and virtual images (d_o < f).
What is the practical use of plotting 1/d_i vs. 1/d_o?
Plotting the reciprocals transforms the hyperbolic thin lens equation into a linear form: 1/d_i = -1/d_o + 1/f. This linear graph is extremely useful in lab experiments. By measuring several object and image distances, you can plot this line, where the y-intercept directly gives the reciprocal of the focal length (1/f), providing an accurate method to determine f.
Does this simulator apply to diverging (concave) lenses?
This specific simulator models a converging (convex) lens, where the focal length f is positive. For a diverging lens (f negative), the thin lens equation still holds, but the graph d_i(d_o) is different—the image distance is always negative (virtual) for a real object. The sign convention is crucial for extending the model.
In a real camera or eye, is the lens truly 'thin'?
No, real lenses have thickness. The thin lens approximation is a powerful simplification that works remarkably well when the lens thickness is small compared to the object and image distances. Complex lens systems, like camera lenses, are often analyzed as combinations of thin lenses or using more advanced 'thick lens' formulas.