Mirror Equation Solver – Solve 1/f = 1/do + 1/di for f, do or di

Use this free Mirror Equation Solver to work with the spherical mirror formula 1/f = 1/do + 1/di. Choose which value you want to find — image distance, focal length or object distance — enter the other two, and the calculator also gives you the magnification and tells you whether the image is real or virtual.

object image F mirror

Formula

1/f = 1/do + 1/di  •  magnification m = −di / do

Sign convention (real-is-positive): distances in front of the mirror (where the light actually goes) are positive. The focal length is positive for a concave mirror and negative for a convex mirror. A positive di means a real image in front of the mirror; a negative di means a virtual image behind it. A negative magnification means the image is inverted.

How to use

Worked example

An object stands 30 cm in front of a concave mirror of focal length 20 cm.
1/di = 1/f − 1/do = 1/20 − 1/30 = 1/60, so di = 60 cm.
Magnification m = −60 ÷ 30 = −2 — the image is real, inverted and twice as tall as the object.

FAQ

Which sign convention does this calculator use?
The "real is positive" convention taught in most school courses: everything in front of the mirror is positive. If your course uses the Cartesian convention (distances measured against the light direction are negative), flip the signs of all distances before entering them.

What does a negative image distance mean?
The image forms behind the mirror, so it is virtual — it cannot be caught on a screen, but you can see it when you look into the mirror. This always happens with convex mirrors, and with concave mirrors when the object is inside the focal length.

What happens when the object is exactly at the focal point?
1/di becomes zero, so the image forms at infinity — the reflected rays come out parallel. The calculator will tell you this instead of giving a number.