Physics · Geometric optics

Thin lens equation calculator.

Enter the focal length and where the object sits. Get the image distance, magnification and whether the image is real, inverted or enlarged. It also solves for object distance or focal length.

1/f = 1/do + 1/diLenses and mirrorsAny length unit

Advertisement

Inputs

Use any one length unit for every distance.

Result

Enter your values.

Thin lens equation

For a thin lens, 1/f = 1/do + 1/di, where f is the focal length, do the object distance and di the image distance. Magnification is m = hi/ho = −di/do. A positive f is a converging lens (or concave mirror); a negative f is a diverging lens (or convex mirror). A positive di is a real image, a negative di a virtual image, and a positive m means an upright image. The mirror equation has exactly the same form, so the calculator works for spherical mirrors too, with f = R/2.

Worked example. A converging lens with f = 10 cm and an object 30 cm away: 1/di = 1/10 − 1/30 = 1/15, so di = 15 cm. m = −15/30 = −0.5, so the image is real, inverted and half the object size. Move the object to 5 cm (inside the focal length): di = −10 cm, m = +2, a virtual, upright, enlarged image, which is how a magnifying glass works. With the object exactly at f the image forms at infinity, so the tool reports that instead of a number.

This is the paraxial thin-lens model. Thick lenses, aberrations and a lens that is not thin compared with its focal length need a full ray trace.

Frequently asked questions

What is the thin lens equation?

1/f = 1/do + 1/di, where f is the focal length, do is the object distance and di is the image distance. Magnification is m = -di/do.

How do I tell if the image is real or virtual?

A positive image distance (di) means a real image formed on the far side of a lens. A negative di means a virtual image on the same side as the object, which cannot be projected on a screen.

What happens when the object is at the focal point?

The rays leave the lens parallel, so the image forms at infinity and the equation has no finite image distance.

Does this work for mirrors?

Yes. The mirror equation is 1/do + 1/di = 1/f with f = R/2, using the same sign convention: positive f for a concave mirror, negative for a convex mirror.

What units do I use?

Any length unit, as long as f, do, di and the heights all use the same one. Optical power in dioptres needs f in metres.

Sources

Checked

OpenStax gives 1/do + 1/di = 1/f, m = -di/do, f = R/2 and the sign table used here. The worked example is arithmetic on those formulas. Runs entirely in your browser. Nothing you type is sent or stored.

Scope

Physics classroom model (paraxial, thin lens). Not for lens design or eyewear prescriptions.

Advertisement
Advertisement