PublicSoftTools

Lens & Mirror Calculator

Solve the thin lens equation for focal length, image distance, object distance, and magnification. Supports converging and diverging lenses, and concave and convex mirrors. No signup, runs entirely in your browser.

1/f = 1/dₒ + 1/dᵢ
Solve for:
Image Distance33.333 cm
Magnification m-0.6667
Real image · Diminished · Inverted

How to Use the Lens & Mirror Calculator

  1. 1Choose the optic type: converging or diverging lens, concave or convex mirror.
  2. 2Enter any two of the three distances — focal length (f), object distance (dₒ), image distance (dᵢ) — in consistent units (cm or m).
  3. 3The calculator solves 1/f = 1/dₒ + 1/dᵢ for the missing value and reports the magnification m = −dᵢ/dₒ.
  4. 4Interpret the signs: positive dᵢ = real image, negative dᵢ = virtual; negative m = inverted, positive m = upright.

Worked Example: One Lens, Two Very Different Images

Take a converging lens with focal length f = 10 cm and place an object 15 cm away. Solving the thin lens equation: 1/dᵢ = 1/10 − 1/15 = 1/30, so dᵢ = +30 cm. Magnification m = −30/15 = −2: the image is real (it can be focused onto a screen), inverted, and twice the object's size. This is the projector configuration — object just beyond the focal point, enlarged real image on the far side.

Now slide the same object inside the focal point, to 5 cm. The math flips sign: 1/dᵢ = 1/10 − 1/5 = −1/10, so dᵢ = −10 cm and m = −(−10)/5 = +2. The image is virtual, upright, and doubled — you cannot project it, but looking through the lens you see it magnified. That is exactly how a magnifying glass works. Same lens, same equation; the only change is whether the object sits beyond or inside the focal length.

Optics Tips

Real vs virtual images

Positive image distance = real image (can be projected on a screen). Negative image distance = virtual image (appears to be on the same side as the object).

Focal point check

When the object is exactly at the focal point (dₒ = f), the image is at infinity. The tool returns a very large value — this is physically correct, not an error.

Magnification sign

Negative magnification means the image is inverted relative to the object. Positive magnification means the image is upright. The magnitude indicates size ratio.

Diverging lenses

Diverging lenses and convex mirrors always produce virtual, upright, diminished images regardless of object position. Focal length is entered as positive — the tool applies the negative sign internally.

Frequently Asked Questions

What is the thin lens equation?

The thin lens equation is 1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ is the object distance, and dᵢ is the image distance. The same equation applies to curved mirrors using the mirror equation.

What does magnification mean?

Magnification m = -dᵢ/dₒ. A value of +2 means the image is twice the size and upright (virtual). A value of -0.5 means the image is half the size and inverted (real). m = 1 means the same size.

What is the sign convention?

For lenses: object distance is positive when the object is in front of the lens (real object). Image distance is positive for real images (on the far side) and negative for virtual images. Focal length is positive for converging lenses and negative for diverging ones.

What is the difference between a real and virtual image?

A real image forms where light rays actually converge — it can be projected onto a screen. A virtual image forms where rays appear to diverge from — it cannot be projected. Diverging lenses and convex mirrors always form virtual images.

How does a concave mirror differ from a converging lens?

Both can form real inverted images when the object is beyond the focal point. The key difference is that mirrors work by reflection so the image forms on the same side as the object, while lenses form images on the opposite side.

Is my data stored?

No. All calculations run locally in your browser. No data is sent to any server.