🔬
🔬 Science & engineering

Thin Lens Equation Calculator (image distance & magnification)

Results update as you type.

Your numbers

Understanding the thin lens equation calculator — concept and principle

This calculator applies the thin-lens equation to find where a lens forms an image, how large it is, whether it is real or virtual and whether it is upright or inverted. It also gives the lens power in dioptres. Physics students use it for homework, and it helps when setting up a projector, magnifier or simple camera.

Thin lens ray diagramObject at 30 cm, f = 10 cmobject 2 cmimage −1 cmFdo = 30di = 15m = −0.5real · inverted1/30 + 1/15 = 1/10 · power 10 D
Rays from the object meet 15 cm behind the lens, forming a half-size inverted image.

How it is calculated

1/do + 1/di = 1/f, so di = 1 ÷ (1/f − 1/do)

m = −di ÷ do; image height hi = m × ho

Power P = 100 ÷ f (dioptres, with f in cm)

The principle

A converging lens bends every ray from one point of the object so that the rays meet again at one point of the image. Two special rays make the geometry easy: a ray parallel to the axis passes through the focal point, and a ray through the centre goes straight on. Similar triangles formed by these rays give the thin-lens equation. The same triangles show that image height and object height scale as di to do, which is the magnification. The lens is assumed thin compared with the distances, so it can be treated as a single plane.

Worked example

Default inputs: f = 10 cm, do = 30 cm, ho = 2 cm.

  1. 1/di = 1/10 − 1/30 = 0.1 − 0.0333 = 0.0667, so di = 15 cm.
  2. m = −15 ÷ 30 = −0.5.
  3. hi = −0.5 × 2 = −1 cm: the image is 1 cm tall and upside down.
  4. di is positive, so the image is real, on the far side of the lens; it is inverted, reduced.
  5. Power = 100 ÷ 10 = 10 dioptres.
How Image distance (cm) changes with Object distance from the lens (cm)How Image distance changes with Object d…-40-20020407.51522.53037.54560Example: 15Object distance from the lens (cm)
Each point is the calculator re-run with only “Object distance from the lens (cm)” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Object distance from the lens (cm)Image distance (cm)
7.5-30
1530
22.518
3015
37.513.64
4512.86
6012

How to read the result

For a converging lens, an object beyond 2f gives a smaller inverted real image (like a camera), an object between f and 2f gives a larger inverted real image (like a projector), and an object inside f gives an enlarged upright virtual image (like a magnifying glass). A diverging lens always gives a smaller, upright virtual image. Eyeglass prescriptions are written in dioptres: plus for converging lenses, minus for diverging ones.

Common mistakes

Keep in mind: The thin-lens model ignores lens thickness and aberrations. Thick lenses and multi-element systems need principal planes or ray tracing.

Frequently asked questions

What happens when the object is exactly at the focal point?

The rays leave parallel and no image forms at a finite distance; the calculator reports the image at infinity.

Can a real image be upright?

Not with a single thin lens. A single lens's real images are always inverted.

What does a magnification of −0.5 mean?

The image is half the object's size and upside down.

Does the formula work for mirrors?

The mirror equation has the same form, though the sign conventions for distances differ.

Sources: OpenStax, University Physics Volume 3 (2016), §2.4 "Thin Lenses"

Checked 9 Nov 2026. OpenStax, University Physics Volume 3 (2016), Chapter 2 “Geometric Optics and Image Formation”, §2.4 Thin Lenses — thin-lens equation 1/do + 1/di = 1/f, magnification m = −di/do, optical power P = 1/f.

🔬 All science & engineering tools →🌍 Calculators by country →