Lenses and mirrors

Solve the thin-lens or spherical-mirror equation with a declared Cartesian sign convention.

About this tool

Choose a thin lens or spherical mirror and the distance to calculate. Only the two known distances are entered. All lengths are in metres. The Gaussian sign convention is 1/f=1/dₒ+1/dᵢ, M=−dᵢ/dₒ, hᵢ=Mhₒ. Positive f means converging lens or concave mirror; negative f means diverging lens or convex mirror. Positive dₒ is a real object on the incoming side; negative dₒ is a virtual object.

Positive dᵢ is a real image: beyond a lens, or in front of a mirror. Negative dᵢ is virtual: in front of a lens, or behind a mirror. Negative magnification means inverted. |M|=1 means equal size. For lenses, power=1/f in dioptres; for mirrors R=2f. Choose a small object height for the paraxial approximation.

The diagram uses the actual computed distances and heights with equal physical scales. Blue marks the object; amber marks the image. Solid lines are actual rays; dashed lines indicate virtual extensions. Lens thickness and mirror symbols are schematic. For an exactly zero reciprocal denominator, the selected quantity is at infinity and no finite diagram is shown; small nonzero denominators give finite results. Very unequal distances can make nearby features appear tiny.

Ideal paraxial optics only: no thickness, refractive-index model, aberrations or finite aperture. Edits clear outdated results. Valid calculated parameters are retained.