Thin Lens Equation Calculator

The thin lens equation predicts where an image forms and how large it is for a lens whose thickness can be ignored. Enter the focal length and the object distance to find the image distance and the magnification. A converging lens uses a positive focal length, a diverging lens a negative one. The result includes the sign so you can tell a real, inverted image from a virtual, upright one.

0.00
0.00
--

Thin lens formula

1/f = 1/do + 1/di
di = 1 / (1/f - 1/do) = (f * do) / (do - f)
Magnification m = -di / do

Positive di is a real image on the opposite side of the lens; negative di is a virtual image on the same side. Negative m means inverted, positive m means upright.

Worked example

A converging lens has f = 10 cm and an object at do = 30 cm. di = (10 * 30) / (30 - 10) = 300 / 20 = 15.00 cm. The image is real (positive di). Magnification m = -15 / 30 = -0.50, so the image is inverted and half the object's height.

Thin lens equation: frequently asked questions

What is the thin lens equation?

The thin lens equation is 1/f = 1/do + 1/di, where f is the focal length, do is the object distance, and di is the image distance. It relates where an object sits to where its image forms for a lens thin enough to ignore its thickness.

What sign convention does this use?

It uses the standard convention: a converging lens has positive focal length, a diverging lens negative. Object distance do is positive for a real object. A positive image distance di means a real image on the far side; a negative di means a virtual image on the same side as the object.

How is magnification found?

Magnification m = -di / do. A negative magnification means the image is inverted, a positive value means upright. The absolute value gives the size ratio: greater than 1 is enlarged, less than 1 is reduced.

What happens when the object is at the focal point?

When do equals f, the term 1/di becomes zero, so the image distance is infinite and no image forms (rays emerge parallel). The calculator reports this as an undefined image distance.

Sources

  • NIST: SI units (metre).
  • The thin lens equation and magnification relation are standard results of geometrical optics.

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.