Lens Equation Solver – Thin Lens Formula with Magnification

Use this free Lens Equation Solver to work with the thin lens formula 1/f = 1/do + 1/di. Solve for image distance, focal length or object distance, and get the magnification m = −di/do plus a plain-English description of the image at the same time.

object image F F

Formula

1/f = 1/do + 1/di  •  magnification m = −di / do = image height ÷ object height

Sign convention: light travels left to right. The object distance is positive on the side the light comes from. A positive di means a real image on the far side of the lens (it can be projected on a screen); a negative di means a virtual image on the same side as the object. Focal length is positive for a converging (convex) lens and negative for a diverging (concave) lens. A negative m means the image is inverted.

How to use

Worked example

An object is placed 15 cm from a converging lens of focal length 10 cm.
1/di = 1/f − 1/do = 1/10 − 1/15 = 1/30, so di = 30 cm.
Magnification m = −30 ÷ 15 = −2 — a real, inverted image twice the size of the object, exactly how a projector lens behaves.

FAQ

What is the difference between a real and a virtual image?
A real image is formed where the light rays actually meet, so it can be caught on a screen or camera sensor (positive di). A virtual image only appears where the rays seem to come from — you can see it through the lens, like with a magnifying glass, but no screen will catch it (negative di).

When does a converging lens make a virtual image?
When the object is closer to the lens than the focal length (do < f). Then 1/di comes out negative, giving an upright, magnified virtual image — the magnifying-glass case.

Can I use metres instead of centimetres?
Yes — the equation works in any unit as long as all three distances use the same one. The answer then comes out in that unit too.