🔍Lens Equation Calculator

Enter any two of focal length, object distance, and image distance to solve for the third.

Sign convention: converging lens f > 0, diverging lens f < 0. Leave one field blank to solve for it.

Free Lens Equation Calculator

This lens equation calculator solves the thin lens formula 1/f = 1/dₒ + 1/dᵢ for whichever variable — focal length, object distance, or image distance — you leave blank. It also computes magnification (m = −dᵢ/dₒ) and tells you whether the resulting image is real or virtual, and upright or inverted.

Using the standard sign convention: a converging (convex) lens has positive focal length, a diverging (concave) lens has negative focal length, positive image distance means a real image on the opposite side, and negative image distance means a virtual image on the same side as the object.

Useful for optics coursework covering lenses, cameras, and the eye. Free, runs entirely in your browser, no sign-up required.

About the Lens Equation Calculator

Features

Solve for any variable

Leave f, dₒ, or dᵢ blank and the calculator finds it.

Magnification

See the image size ratio and orientation.

Image type

Real or virtual, upright or inverted, determined automatically.

Instant, private

Runs entirely in your browser. No data is sent anywhere.

Frequently Asked Questions

What is the thin lens equation?

1/f = 1/dₒ + 1/dᵢ, where f is focal length, dₒ is object distance, and dᵢ is image distance, all measured from the lens.

What sign convention does this calculator use?

A converging (convex) lens has a positive focal length; a diverging (concave) lens has a negative focal length. A positive image distance means a real image on the far side of the lens; negative means a virtual image on the same side as the object.

What does magnification tell you?

Magnification m = −dᵢ/dₒ gives the ratio of image size to object size. A magnitude greater than 1 means the image is larger than the object; a negative sign means the image is inverted.

What's the difference between a real and virtual image?

A real image forms where light rays actually converge and can be projected onto a screen; a virtual image only appears to come from a location where rays don't actually meet, like a magnifying glass image.

What does 'upright' vs 'inverted' mean?

An upright image has the same orientation as the object; an inverted image is flipped upside down. This is determined by the sign of the magnification.

Can I solve for focal length instead of image distance?

Yes — leave any one of the three fields (f, dₒ, or dᵢ) blank, and the calculator solves for that one using the other two.

What happens with a diverging lens?

Enter a negative focal length. Diverging lenses always produce virtual, upright, reduced images regardless of object distance.

Why can't any value be zero?

The lens equation involves dividing by f, dₒ, and dᵢ, so a value of zero would make the equation undefined.

Does this work for mirrors too?

The mirror equation has the same mathematical form (1/f = 1/dₒ + 1/dᵢ), so the numbers work the same way, though the physical sign conventions for mirrors differ slightly from lenses.

Is this calculator free to use?

Yes, completely free with no sign-up, and it runs entirely in your browser.