This lens calculator works the thin-lens equation — 1/f = 1/dₒ + 1/dᵢ — solving for focal length, object or image distance, and reporting magnification and image orientation with the standard sign conventions.

–

One Equation, Every Lens

The thin-lens equation ties the triangle of optics: 1/f = 1/dₒ + 1/dᵢ, with magnification m = −dᵢ/dₒ. Sign conventions do the physics: positive f for converging (convex) lenses, negative for diverging (concave); positive dᵢ means a real image behind the lens, negative means virtual, on the object's side. Cameras (image close to f for distant scenes), magnifiers (object inside f, virtual upright image), projectors and eyes are all this one equation wearing different constraints — built, ultimately, on the Snell's law bending at two curved surfaces. Part of our Physics Calculators collection.

Worked Example (Verified)

A converging lens, f = 10 cm, with an object 30 cm away:

  • 1/dᵢ = 1/10 − 1/30 = 2/30 → dᵢ = 15 cm
  • Magnification = −15/30 = −0.50×: a real, inverted image, half size — the camera/projector regime
  • Move the object to 15 cm and the image retreats to 30 cm (the pair are conjugates — positions swap freely); at 20 cm the image sits at 20 cm, life-size (m = −1); at exactly f, the image flies to infinity; inside f (object at 8 cm), dᵢ = −40 cm: a virtual image 5× magnified — the magnifying glass

Reading Magnification Like a Photographer

  • |m| < 1: nearly all photography (a face onto a sensor is a big reduction).
  • m ≈ −1: macro 1:1 territory — the lens spends its travel close to the subject.
  • m > 0 (virtual, upright): magnifiers, and the view through a diverging lens — which by itself can never form a real image, at any object distance.
  • Power in diopters (eyeglasses, optometry) is simply P = 1/f(metres): f = 10 cm is a +10 diopter lens. Photographers quote mm; eyes are prescribed in the same equation's units.

Related Tools

Frequently Asked Questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ: focal length, object distance and image distance locked in a reciprocal triangle. Know any two, get the third — f = 10 cm with an object at 30 cm puts the image at 15 cm.

How do you calculate magnification?

m = −dᵢ/dₒ (also image height ÷ object height). The sign carries orientation: negative means inverted. −0.5× is inverted and half size; +5× is upright and enlarged (the magnifier's virtual image).

What is a virtual image?

One that forms where the rays only appear to meet — on the same side as the object (negative dᵢ here). It can be seen by eye or photographed (your eye adds its own lens) but never caught on a screen placed at its location.

Why can't a diverging lens form a real image?

With negative f, the equation's solution for dᵢ is negative for every object distance: rays spread as if from a virtual point. Diverging lenses always give upright, reduced virtual images — used in peepholes and to correct myopia in combination systems.

What is a diopter?

Lens power P = 1 ÷ f in metres. Your prescription (+2.50, −4.00) is this in optical clothing: a −4.00 diopter lens has f = −25 cm, diverging, for nearsightedness.

Is this lens calculator free?

Yes — free, instant, no sign-up.