Optics · Geometric optics

Lens and mirror equation and magnification calculator

Compute image distance, magnification, and image properties for thin lenses and spherical mirrors using the lens equation.

Everything runs in your browser; no data leaves this page.

How to use (3 steps)

  1. Select the optical system (thin lens or spherical mirror) and the specific element type.
  2. Enter focal length, object distance, and optionally object height (use the same unit such as cm).
  3. Press Compute to get image distance, magnification, and whether the image is real/virtual and upright/inverted.

Defaults show a converging lens example (f = 10 cm, dₒ = 30 cm, hₒ = 2 cm) so you can see a real, inverted, reduced image immediately. Classic classroom demo: place a lamp beyond 2f of a convex lens to form a sharp, inverted image on a screen; move the lamp inside f to see an upright virtual image.

Inputs

Use the same length unit for all inputs (cm recommended).

cm
cm
cm

All calculations stay in your browser; no values are sent to any server.

Results

Quantity Value

How it is calculated

    FAQ

    How do you decide the sign of the distances and focal length?

    You enter all distances as positive values. The calculator applies signs internally: converging lenses and concave mirrors use positive focal length, while diverging lenses and convex mirrors use negative focal length. The sign of the computed image distance tells whether the image is real or virtual.

    What does a negative image distance mean here?

    In this sign convention, a positive image distance means a real image and a negative image distance means a virtual image. Virtual images cannot be projected onto a screen; they appear where light rays seem to diverge.

    How should I read the magnification m and its sign?

    If m is negative the image is inverted; if m is positive the image is upright. When |m| > 1 the image is enlarged, when |m| < 1 it is reduced, and |m| ≈ 1 means the same size as the object.

    Comments

    Load comments only when you need them.