Skip to content
ScienceQuest
Waves & Optics Calculator School

Thin Lens Calculator

Solve 1/f = 1/dₒ + 1/dᵢ for focal length or either distance, and see whether the image is real or virtual, upright or inverted, enlarged or reduced.

Calculator

Positive for a converging lens, negative for a diverging one.

15

Working, with your numbers

  1. 1/di = 1/f - 1/do
  2. = 1/0.1 - 1/0.3
  3. = 6.6667 per m
  4. di = 0.15 m

Values are converted into the units the equation is worked in before the arithmetic.

Magnification
m = −dᵢ/dₒ. Negative means inverted.
-0.5 ×
Image type
Real
Orientation
Inverted
Size
Reduced

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

1f=1do+1di\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}

Thin-lens equation, Gaussian optics

What the thin lens equation tells you

A lens takes rays diverging from a point on the object and redirects them so they converge on a point on the image. The thin lens equation, 1/f = 1/dₒ + 1/dᵢ, is the bookkeeping for where that convergence lands. “Thin” means the lens is thin enough that the two refractions at its surfaces can be collapsed into one event at a single plane, which is accurate for ordinary lenses and stops being accurate for thick ones like a glass marble.

Notice it is the reciprocals that add. That is why the arithmetic feels unintuitive and why moving an object a centimetre near the focal point swings the image metres, while the same centimetre far away barely moves it. Sign convention does the rest of the work: a positive focal length is a converging lens, a negative one diverges, and a negative image distance means the image forms on the object’s side of the lens.

Worked example

A 5.0 cm converging lens has an object placed 7.5 cm in front of it. Where is the image, and how big?

  • 1/dᵢ = 1/f − 1/dₒ = 1/5.0 − 1/7.5
  • 1/dᵢ = 0.2000 − 0.1333 = 0.06667 per cm
  • dᵢ = 15 cm, on the far side of the lens
  • m = −dᵢ/dₒ = −15/7.5 = −2.0

So the image is real, sits 15 cm behind the lens, is inverted, and is twice the size of the object. That is a projector: object just outside the focal length, image large and far away, and upside down unless you flip the slide.

Reading the four image cases

Every result for a converging lens falls into one of a few regimes, and the readouts name which one you are in. Beyond 2f the image is real, inverted and reduced. That is a camera. Exactly at 2f it is real, inverted and the same size. Between f and 2f it is real, inverted and enlarged, the projector case above. Inside f the image distance goes negative: virtual, upright and enlarged, which is a magnifying glass or a loupe.

A diverging lens has only one case. Whatever you do, the image is virtual, upright and reduced, which is why spectacles for short-sightedness make the world look slightly smaller. Enter a negative focal length here and you will see that hold for every object distance.

Common mistakes

  • Adding the distances instead of the reciprocals. With f = 5 and dₒ = 7.5, subtracting gives 2.5 and the right answer is 15. Invert first, then combine, then invert back.
  • Dropping the minus sign in the magnification. The sign is the orientation. Reporting a magnification of +2 for a real image from a converging lens says the image is upright, which it never is.
  • Expecting an image when the object sits at the focal point. The rays leave parallel, so nothing converges anywhere. The equation returns an infinite image distance and this tool says so explicitly.
  • Mixing units between the three fields. A focal length in millimetres with an object distance in metres gives an answer that is wrong, and not by any tidy factor of a thousand, because the equation adds reciprocals and those only combine when they share a unit. Each field here carries its own unit selector and the conversion happens internally.
Thin Lens Calculator: the equation 1/f = 1/d o + 1/d i, solved for any of f, dₒ and dᵢ.
The equation the calculator is built on, with its source. Image © ScienceQuest, CC BY 4.0. Free to reuse with credit and a link to this page; how to reuse it. Download PNG

Worked examples

Each one runs through the calculator above, so the arithmetic here is the arithmetic it does.

Where is the image of an object 5 cm from a magnifying glass of 10 cm focal length?

  1. 1/di = 1/f - 1/do
  2. = 1/0.1 - 1/0.05
  3. = -10 per m
  4. di = -0.1 m

−10 cm, and the minus sign puts the image on the same side as the object, where it is virtual, upright and twice the size. That only happens with the object inside the focal length. Move it out to 15 cm and the image jumps to 30 cm on the far side of the lens, real and inverted.

What focal length does a lens need to image an object 30 cm away at 60 cm?

  1. 1/f = 1/do + 1/di
  2. 1/0.2 = 1/0.3 + 1/0.6

20 cm, from 1/30 + 1/60 = 1/20. The equation is symmetric in the two distances, so the same lens also focuses an object 60 cm away onto a screen at 30 cm, reduced instead of enlarged. For a fixed 90 cm between object and screen, those are the only two lens positions that give a sharp image.

Common questions

What does a negative image distance mean?

That the image is virtual and sits on the same side of the lens as the object. You cannot catch it on a screen, but your eye can see it by looking through the lens. This is what happens with a magnifying glass held closer to the object than its focal length, and it is always the case for a diverging lens.

Why is the magnification negative?

Because m = −dᵢ/dₒ, and the sign carries the orientation rather than the size. A negative magnification means the image is inverted, which is the normal outcome for a real image from a converging lens. Take the absolute value if you only want the size ratio.

What happens when the object sits at the focal point?

No image forms. The rays leave the lens parallel, so they never converge and the equation returns an infinite image distance. Move the object even slightly inside or outside the focal point and an image reappears, which is why real collimators are so sensitive to positioning.