Lens and Mirror Equation Calculator

Solve the thin lens and spherical mirror equation for image distance, object distance, focal length, magnification, image height, and image type. Choose a converging lens, diverging lens, concave mirror, or convex mirror and see the result with a ray diagram.

Inputs

Equation: 1/f = 1/d₀ + 1/dᵢ, magnification m = −dᵢ/d₀ = hᵢ/h₀. Default sign rules: f > 0 for converging (convex lens, concave mirror); f < 0 for diverging (concave lens, convex mirror).

Results

Default example result:

For a converging lens with f = 10 cm, d₀ = 30 cm, and h₀ = 3 cm, the image distance is dᵢ = 15 cm, magnification is m = −0.5, and image height is hᵢ = −1.5 cm. The image is real, inverted, and reduced.

Focal length f & mirror radius R:
For a spherical mirror, R = 2f.
Object distance d₀:
Positive d₀ represents a real object in front of the element.
Image distance dᵢ:
Signs tell side: + usually opposite lens’ object side (real), − same side (virtual).
Magnification m & image height hᵢ:
m = −dᵢ/d₀; hᵢ = m·h₀.
Image nature:
“Real” if rays actually converge; “Virtual” if they seem to from extensions.
Axis Element Focal points Object Image Rays

Advertisement

Formula guide

Thin lenses and spherical mirrors use the same reciprocal-distance equation: 1/f = 1/d₀ + 1/dᵢ. The calculator keeps your selected units consistent, then uses m = −dᵢ/d₀, hᵢ = m·h₀, and, for spherical mirrors, R = 2f.

Pick the quantity you want from the Solve for menu. Inputs that are needed for that mode stay editable, while derived values are filled in automatically.

Solve-for table

Solve for Formula used Required inputs
Image distance dᵢ dᵢ = 1 / (1/f − 1/d₀) f, d₀, h₀
Object distance d₀ d₀ = 1 / (1/f − 1/dᵢ) f, dᵢ, h₀
Focal length f f = 1 / (1/d₀ + 1/dᵢ) d₀, dᵢ, h₀
Magnification m m = −dᵢ / d₀ d₀, dᵢ, h₀
Image height hᵢ hᵢ = m·h₀ m, h₀, d₀
Mirror radius R R = 2f f, d₀, h₀

Worked examples

Converging lens image distance

Given: f = 10 cm, d₀ = 30 cm, h₀ = 3 cm.

Step: dᵢ = 1 / (1/10 − 1/30) = 15 cm.

Result: m = −15/30 = −0.5, so hᵢ = −1.5 cm. The image is real, inverted, and reduced.

Simple magnifier

Given: f = 10 cm, d₀ = 6 cm, h₀ = 1.5 cm.

Step: dᵢ = 1 / (1/10 − 1/6) = −15 cm.

Result: m = 2.5, so hᵢ = 3.75 cm. The image is virtual, upright, and magnified.

Concave mirror radius

Given: a concave mirror with f = 12 cm.

Step: R = 2f = 24 cm.

Result: The mirror radius of curvature is 24 cm.

Sign convention guide

  • Converging elements: convex lens or concave mirror → f > 0.
  • Diverging elements: concave lens or convex mirror → f < 0.
  • Object distance d₀: positive for a real object in front of the element.
  • Lens image distance dᵢ: dᵢ > 0 is real on the far side of the lens; dᵢ < 0 is virtual on the object side.
  • Mirror image distance dᵢ: dᵢ > 0 is real in front of the mirror; dᵢ < 0 is virtual behind the mirror.
  • Magnification: m < 0 means inverted; m > 0 means upright. Values with |m| < 1 are reduced.

FAQ

What happens when the object is at the focal point?

When d₀ = f, the denominator in dᵢ = 1 / (1/f − 1/d₀) becomes zero, so the image distance tends toward infinity. That represents collimated rays.

Can this calculator solve mirror problems as well as lens problems?

Yes. The spherical mirror equation has the same form as the thin lens equation. The sign interpretation differs: a positive mirror image distance is on the front/object side of the mirror.

Why is image height sometimes negative?

A negative hᵢ means the image is inverted relative to the object. A positive hᵢ means the image is upright.

What assumptions does this tool make?

This tool uses ideal thin-lens and spherical-mirror models in the paraxial, small-angle regime. It ignores thickness, aberrations, aperture effects, and manufacturing tolerances.

Educational use only — not for safety-critical design. For precise optical systems, consult detailed lens data and tolerances.

Release update v1.1

v1.1 (June 7, 2026)

  • Added Solve for modes for image distance, object distance, focal length, magnification, image height, and mirror radius of curvature.
  • Added an immediately visible default worked result, plus a formula guide, solve-for table, worked examples, sign convention guide, and FAQ.
  • Fixed the mirror ray diagram so positive mirror image distances draw on the front/object side and virtual images draw behind the mirror.

5 Fun Facts about Lenses & Mirrors

Your brain flips reality

The retina’s image from your eye’s convex lens is upside down and left/right swapped—your visual cortex quietly rotates it back, so you never notice the raw inverted projection.

Human optics

Objects in mirror…

That car-door warning exists because a convex mirror’s negative focal length always yields m < 1: everything is shrunk to squeeze in more field of view, so distances feel longer than they are.

Road safety

Solar furnaces are giant makeup mirrors

Massive concave mirrors in places like Odeillo, France focus sunlight to spots hotter than 3,000 °C—just the lens/mirror equation scaled up to a 54-meter focal length.

Sun power

Hubble needed glasses

A tiny polishing error on Hubble’s main mirror shifted focus by about 2 microns. NASA fixed it by adding corrective optics (like contact lenses in space) that reintroduced the missing curvature.

Space repair

Focus rings barely move

Going from “infinity” to 0.5 m on a 50 mm lens means changing dᵢ by only a few millimeters. Those tiny helicoid twists are solving the same 1/f = 1/d₀ + 1/dᵢ you are.

Camera geekery

Explore more tools