No ads, no sign-upChecked 2026-08-24

Thin Lens Equation Calculator

Result

15.000cm

Result: 15.000 cm

The thin lens equation 1/f = 1/dₒ + 1/dᵢ rearranges to dᵢ = (f × dₒ) ÷ (dₒ − f). A positive image distance means a real image behind the lens; a negative one means a virtual image on the same side as the object. Enter both distances in the same unit.

The numbers at a glance

Held fixed: Focal length f 10.00 cm.

Object distance dₒ (cm)Result (cm)
20.0020.000
30.00Your value15.000
40.0013.333
50.0012.500
60.0012.000

Worked examples

How it's calculated

dᵢ = (f × dₒ) ÷ (dₒ − f)

  1. StepEnter the focal length: positive for a converging lens, negative for a diverging one.
  2. StepEnter how far the object sits in front of the lens, always positive.
  3. ResultRead the image distance; a negative value marks a virtual image.

What this number means

The sign of the image distance is the answer

A positive image distance means a real image behind the lens, one you can catch on a screen. A negative one means a virtual image on the same side as the object, the view you get through a magnifying glass.

A diverging lens takes a negative focal length

A converging lens gets a positive f, a diverging lens a negative one, and the object distance stays positive in front of the lens. With f = −10 cm and an object at 30 cm the image lands at −7.5 cm, virtual as it always is for a diverging lens.

An object at the focal point has no image distance

With dₒ = f the term (dₒ − f) is zero and no finite answer exists. The rays leave the lens parallel and the image forms at infinity. Move the object slightly nearer or farther and a number comes back.

Both distances in the same unit

Both fields are in centimetres here, and the image distance comes back in centimetres too. Data in millimetres has to be converted for both fields, never for just one of them.

Commonly misread

With f = 10 and dₒ = 30, the image distance is 1/10 − 1/30.

That expression is 1/dᵢ, not dᵢ. It comes to 1/15, so the image distance is 15 cm.

The object sits in front of the lens, so its distance goes in as a negative number.

The object distance is always positive on this page. The sign convention carries its information in the image distance instead, and in the sign of the focal length.

An image at 15 cm from an object at 30 cm magnifies by 0.5.

The magnification is m = −dᵢ ÷ dₒ, so it is −0.5. The minus belongs to the formula and marks the image as inverted.

Reference table

Focal length, object distanceImageImage distance
10, 30Real, inverted, half size15
10, 20Real, inverted, same size20
5, 15Real, inverted, half size7.5
20, 60Real, inverted, half size30
10, 5Virtual, upright, magnified-10
-10, 30Diverging lens, always virtual-7.5

Questions

How do I use the thin lens equation?

Rearrange 1/f = 1/dₒ + 1/dᵢ to dᵢ = (f × dₒ) ÷ (dₒ − f) and enter both distances in the same unit. A focal length of 10 cm with an object 30 cm away gives an image distance of 15 cm.

What is the difference between a real and a virtual image?

It comes down to the sign of the image distance. A positive value means a real image forms on the far side of the lens and can be caught on a screen. A negative value means a virtual image on the same side as the object, visible only through the lens, like the view in a magnifying glass.

What sign convention does this calculator use?

A converging lens has a positive focal length, a diverging lens a negative one, and the object distance is always positive in front of the lens. Positive image distances are real, negative ones virtual.

Why does an object at the focal point give no answer?

With dₒ = f the term (dₒ − f) is zero and the division is undefined. Physically the rays leave the lens parallel and the image forms at infinity, so no finite image distance exists. Move the object slightly nearer or farther and the calculator returns a number again.

What about the magnification?

The magnification is m = −dᵢ ÷ dₒ, so an image distance of 15 cm with an object at 30 cm gives m = −0.5: half the size and upside down. The minus sign is part of the formula and marks the inversion.

Sources and last check

  1. hyperphysics.phy-astr.gsu.edu

Information, not professional advice.