Lens Equation Calculator

Thin lens and mirror equation: image distance and magnification.

About this tool

Choose a lens or mirror and what to solve for, then enter the other two values and the object height. The tool gives the answer, magnification, image height, whether the image is real or virtual and upright or inverted, and the lens power or mirror radius.

The thin lens equation

For thin lenses and curved mirrors, 1/f = 1/dโ‚’ + 1/dแตข, where f is the focal length, dโ‚’ the object distance and dแตข the image distance. This tool uses the real-is-positive convention: converging (convex) lenses and concave mirrors have positive focal lengths, diverging ones negative; a positive image distance is a real image that can be projected onto a screen, a negative one is virtual. Magnification m = โˆ’dแตข รท dโ‚’; a negative value means the image is inverted. With a 10 cm converging lens and an object 30 cm away, the image forms 15 cm behind the lens, real, inverted and half size, as in a camera. Bring the object inside the focal length, say 5 cm, and the image becomes virtual, upright and twice the size, as in a magnifying glass. At exactly the focal length no image forms. Lens power in dioptres, used on glasses prescriptions, is 1 รท f in metres, so f = 10 cm is +10 D. Honest limits: the thin-lens, small-angle model ignores lens thickness and aberrations. The Snell's law calculator and the wavelength and frequency calculator are related.

Frequently asked questions

What is the lens equation?

1/f = 1/do + 1/di, linking focal length, object distance and image distance.

How do I calculate magnification?

m = โˆ’di รท do. Its size gives how much bigger or smaller the image is; a negative sign means inverted.

When is an image virtual?

When the object is inside the focal length of a converging lens, or for any object with a diverging lens; the image distance is negative.

What are dioptres?

Lens power: 1 divided by the focal length in metres. A +2 D lens has a 50 cm focal length.

Is my data sent anywhere?

No. Everything is calculated in your browser, and nothing is stored or sent.