Mirror & Lens Equation Calculator

Find image distance and magnification.

Result

15.0000
-0.5000

How it is calculated

The tool solves 1/di = 1/f − 1/do for the image distance, then m = −di / do. Here f is the focal length, do the object distance and di the image distance, all in one length unit (the unit cancels in the magnification).

Sign convention used: object distance must be positive; focal length is positive for a converging lens or concave mirror and negative for a diverging lens or convex mirror. A positive di is a real image, a negative di a virtual one. A negative m means inverted. Results show four decimals. No result is given when the object distance is zero or negative, the focal length is zero, or the object sits exactly at the focal point, where the image would be at infinity.

Worked example

A converging element with f = 10 and an object at do = 30. Then 1/di = 1/10 − 1/30 = 3/30 − 1/30 = 2/30, so di = 15.0000. Magnification is −15 / 30 = −0.5000. The image is real (positive distance), inverted (negative sign) and half the size of the object. Moving the object to 5 with the same f would give di = −10 and m = 2: a virtual, upright, enlarged image.

Try this example →

Common mistakes

  • Entering a negative focal length for an ordinary magnifying glass or concave mirror. Those are positive; only diverging lenses and convex mirrors take a negative f.
  • Placing the object exactly at the focal length and expecting a number. The image is at infinity there, so the tool gives no result.
  • Reading a negative magnification as 'smaller'. The minus sign only means inverted; the size is the absolute value, so −2 is twice as large and upside down.
  • Mixing units, such as f in centimetres and the object distance in metres. Use the same unit for both, and the image distance comes back in that unit.
  • Treating a negative image distance as an error. It is a valid answer meaning a virtual image on the same side as the object.

About this calculator

This calculator solves the thin lens/mirror equation, 1/f = 1/do + 1/di, relating focal length f, object distance do, and image distance di for a lens or curved mirror, and derives magnification as m = −di/do — a negative m means an inverted image, while |m| > 1 means the image is magnified relative to the object.

This single equation, with a sign convention distinguishing converging from diverging elements, predicts whether a lens or mirror produces a real or virtual image, upright or inverted, and how large — the exact same physics that determines how a camera lens focuses light onto a sensor, how a magnifying glass or telescope eyepiece works, and how a concave shaving mirror produces an enlarged upright image at close range.

Physics students working through optics problems, optical engineers designing camera and telescope systems, and photography and astronomy enthusiasts curious about how their equipment forms images all use this calculator, entering focal length and object distance.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators