Geometric optics · Imaging

Thin Lens & Mirror Equation Calculator

Solve focal length, object distance, or image distance, then calculate magnification and classify the image.

Formula shown Runs locally Reviewed Aug 11, 2026
Follow us on Google
Equation guide

Paraxial rays and an ideal thin lens or spherical mirror

Imaging equation

1/f = 1/dₒ + 1/dᵢ

Magnification

m = −dᵢ/dₒ

Image height

hᵢ = mhₒ
Geometric optics

Form an image with a lens or mirror

Use the real-is-positive sign convention: real objects, real images, and converging focal lengths are positive; virtual objects, virtual images, and diverging focal lengths are negative. Enter at most three decimal places; displayed results are rounded likewise.

1/f = 1/dₒ + 1/dᵢ

Choose the unknown and enter the other signed distances.

Using the model

Symbols, assumptions and limitations

Interpretation notes

The calculator uses the real-is-positive sign convention shared by the displayed thin-lens and spherical-mirror equations. Positive focal length describes a converging lens or concave mirror; negative focal length describes a diverging lens or convex mirror. Real object and image distances are positive, while virtual object and image distances are negative.

Paraxial (Gaussian) approximation: the rays are assumed to travel close to the optical axis and make small angles with it, so sin θ ≈ tan θ ≈ θ when θ is measured in radians. This first-order approximation makes the thin-lens equation possible. Rays far from the axis, wide apertures, and steep angles reveal spherical and other aberrations and need a more complete ray-tracing model.

Worked examples

See the method in practice

01

Converging system

With f = 10 cm and dₒ = 30 cm, the image forms at dᵢ = 15 cm with m = −0.5: real, inverted, and reduced.

02

Object inside focal length

With f = 10 cm and dₒ = 5 cm, dᵢ = −10 cm and m = +2: virtual, upright, and enlarged.

Questions

Frequently asked

Which sign convention is used?

The calculator uses real-is-positive signs: dₒ is positive for a real object and negative for a virtual object, dᵢ is positive for a real image and negative for a virtual image, and f is positive for converging systems.

What does negative magnification mean?

The image is inverted relative to the object. Positive magnification means it is upright.

What happens when dₒ equals f?

Emerging rays are parallel and the ideal image lies at infinity, so no finite image distance is returned.

Sources & review

Equations and examples are checked against the references below. Results are educational and should be independently verified for safety-critical work.

OpenStax University Physics — Thin Lenses OpenStax University Physics — Spherical Mirrors

Written by the STEM Hub editorial team · Reviewed August 11, 2026 · Review methodology