Lens Equation Calculator

Solve the thin lens equation for image distance and magnification, and find whether the image is real or virtual.

cm
cm
cm
Image distance 15 cm
1/f = 1/u + 1/v; magnification = −v / u
Magnification -0.5 ×
Image height -2.5 cm
Image type Real — it can be projected onto a screen
Lens type Converging (convex) — positive focal length
Orientation Inverted, smaller than the object

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Lens Equation Calculator does

This lens equation calculator will solve the thin lens equation for image distance and magnification, and find whether the image is real or virtual. Fill in all 3 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for optics homework on lenses and image formation. The companion to this one is our ohm's law calculator.

How to use it

  1. Enter the focal length — positive for a converging lens, negative for a diverging one.
  2. Enter how far the object is from the lens.
  3. Add an object height to get the image height as well.

How it works

The thin lens equation relates three distances: the focal length, the object distance and the image distance. Knowing any two gives the third. The sign convention used here is the standard one — distances measured on the outgoing side of the lens are positive, so a positive image distance means a real image that forms on the far side and can be caught on a screen, and a negative one means a virtual image on the same side as the object.

Magnification is the negative ratio of image distance to object distance. The minus sign is doing real work: a negative magnification means the image is inverted, which is what a converging lens does to an object beyond its focal point. That is why the image on a camera sensor is upside down and why a magnifying glass flips the view when you hold it far from the page.

The special case is the object sitting exactly at the focal point. The equation gives a division by zero because no image forms at any finite distance — the rays leave the lens parallel and never converge. Moving the object a fraction closer or further produces an image, and the page says what is happening rather than printing infinity.

A diverging lens, with negative focal length, always produces a virtual, upright, reduced image whatever the object distance. That is why a concave lens cannot project and why it is used for correcting short sight rather than for magnifying.

When to use it

  • Optics homework on lenses and image formation.
  • Working out where an image will form in a projector or camera setup.
  • Understanding why a magnifying glass flips the image past a certain distance.

Common mistakes to avoid

  • Using a positive focal length for a diverging lens, which inverts the whole answer.
  • Reading a negative image distance as an error rather than as a virtual image.
  • Forgetting that magnification's sign is the orientation, not part of its size.

Frequently asked questions

What is the thin lens equation?

1/f = 1/u + 1/v, where f is focal length, u the object distance and v the image distance.

What does a negative image distance mean?

The image is virtual — it forms on the same side as the object and cannot be projected onto a screen, though it can be seen by looking through the lens.

Why is my magnification negative?

Because the image is inverted. The sign carries the orientation; the size is the magnitude.

Related tools

See all science & engineering →