Lens and Mirror Equation Calculator

The thin lens equation relates the three key distances in any optical system: focal length, object distance and image distance. Written as 1/f = 1/do + 1/di, it applies equally to converging lenses (convex, positive focal length), diverging lenses (concave, negative focal length) and curved mirrors under the same sign convention. You enter any two of the three values and choose which quantity you want to solve for, and the calculator returns the missing distance along with the lateral magnification, image type and orientation. Focal length is a fixed property of the lens or mirror: positive for converging optics and negative for diverging optics. Object distance do is almost always positive and is measured from the optical centre to the object. Image distance di can be positive or negative: positive means a real image forms on the far side of a lens (or in front of a mirror), and negative means a virtual image appears on the same side as the object (or behind a mirror). Magnification M equals negative di divided by do. A negative M means the image is inverted; a positive M means it is upright. A magnitude greater than one means the image is enlarged. This calculator supports converging lens mode, diverging lens mode and concave mirror mode. It is suited to secondary school and university physics optics problems, and to photographers and optical engineers checking system geometry. The real-is-positive sign convention is used throughout. Results are ideal thin-lens approximations; thick-lens effects, aberrations and chromatic dispersion are not modelled.

Advertisement
cm
cm
cm
60.00 cm
image distance (di)
Magnification M-2.00x
Image typeReal
OrientationInverted

Sign convention: distances in front of the lens or mirror are positive. A negative focal length indicates a diverging lens or convex mirror. Results are thin-lens approximations only.

How it works

The thin lens equation is 1/f = 1/do + 1/di. Rearranging for image distance: 1/di = 1/f minus 1/do, so di = 1 divided by (1/f minus 1/do). For object distance: do = 1 divided by (1/f minus 1/di). For focal length: f = 1 divided by (1/do + 1/di). Lateral magnification is M = negative di divided by do. A positive di indicates a real image where light actually converges; a negative di indicates a virtual image where rays appear to diverge from that point. For a converging lens or concave mirror enter a positive focal length; for a diverging lens or convex mirror enter a negative focal length.

Worked example

A converging lens has a focal length of 20 cm. An object sits 30 cm from the lens. Solving for image distance: 1/di = 1/20 minus 1/30 = 3/60 minus 2/60 = 1/60, so di = 60.00 cm. The image is real (positive di) and forms 60 cm on the far side of the lens. Magnification M = negative 60 divided by 30 = negative 2.00x: the image is inverted and twice the height of the object.

Related calculators