Lens Equation
calculator.
Find where a thin lens forms its image, how big it is, and whether it is real.
Use a minus sign for a diverging lens or a virtual image.
- Magnification
- −0.5
- Lens power (D)
- 10
The object sits beyond twice the focal length, so the image is real, inverted and smaller, as in a camera or the eye.
Ray diagram
Drag the object to move itThe object is 30 cm from a lens of focal length 10 cm. The image forms 15 cm on the far side, real, inverted, smaller, at 0.5 times the object's height. The three colored lines are the rays that are easiest to draw: one parallel to the axis, one through the center, one through a focal point.
This lens with the object elsewhere
| Object, cm | Image, cm | Magnification | Image |
|---|---|---|---|
| 50 | 12.5Real, inverted | −0.25 | Real, inverted |
| 30 | 15Real, inverted | −0.5 | Real, inverted |
| 20 | 20Real, inverted | −1 | Real, inverted |
| 15 | 30Real, inverted | −2 | Real, inverted |
| 12 | 60Real, inverted | −5 | Real, inverted |
| 5 | −10Virtual, upright | 2 | Virtual, upright |
Working
- 1The thin lens equation1f=1dₒ+1dᵢ
- 2Rearrange for dᵢ1dᵢ=1f−1dₒ
- 3Reciprocals, with distances in metersf = 0.1 m, dₒ = 0.3 m
- 4Put the numbers in1dᵢ= 10 − 3.333 = 6.667 per m, so dᵢ = 0.15 m
- 5Magnificationm = −dᵢdₒ= −0.150.3= −0.5
- 6Check: both reciprocals add up to the lens10.3+10.15= 10 per m, and 1 over f = 10
How it's worked out
A thin lens links three distances. The object distance dₒ runs from the object to the lens, the image distance dᵢ from the lens to the image, and the focal length f from the lens to the point where parallel light meets. OpenStax writes the rule as a sum of reciprocals.
To find one distance, subtract the known reciprocal and flip the result. For the image distance, that reads:
Signs carry the meaning. The focal length is positive for a converging lens, which is thicker in the middle, and negative for a diverging one. The image distance is positive when the image forms on the far side, where you could catch it on a screen. That is a real image. A negative image distance means a virtual image, on the same side as the object, that you can only see by looking through the lens.
The magnification m compares the image height with the object height. A minus sign means the image is upside down.
Lens power is the reciprocal of the focal length in meters, measured in diopters (D). OpenStax College Physics gives the example of a magnifier that focuses sunlight 8.00 cm away: its power is 12.5 D.
Worked examples
Jun focuses a 50 mm lens on a friend
Jun's friend stands 2 m from a 50 mm lens. The sharp image forms 51.28 mm behind the lens, so the lens sits about 1.3 mm further out than it does for a distant hill, where the image is at 50 mm.
The magnification is −0.0256: the image is inverted and about 39 times smaller than Jun's friend. If the friend is 1.7 m tall, the image is only 43.6 mm tall.
Ama reads small print with a magnifier
Ama holds a 10 cm magnifier 8 cm above a label, inside the focal length. The image distance is −40 cm, so the image is virtual and sits behind the label. It is upright and 5 times the size of the print.
At 5 cm the image shrinks to 2 times. At 9 cm it grows to 10 times, but it moves 90 cm away, so the view is larger but further off.
Leo measures an unknown lens
Leo puts a candle 30 cm from a lens and finds a sharp image on a card 60 cm on the other side. Solving for the focal length gives 20 cm, a power of 5 D.
The magnification is −2, so the flame on the card is upside down and twice its real height. Since the candle sits between one and two focal lengths, a larger real image is just what the rules predict.
Reading your result
Where the object sits sets the kind of image you get from a converging lens. Beyond twice the focal length, the image is real, inverted and smaller, as in a camera. At exactly 2f it is the same size: a 10 cm lens with the object at 20 cm puts the image at 20 cm with a magnification of −1. Between f and 2f it is real and larger, as in a projector. Inside f it turns virtual and upright, as in a magnifier.
A diverging lens always gives a virtual, upright, smaller image of a real object, and the image stays inside the focal length. With f = −15 cm, an object at 30 cm gives an image at −10 cm. Move the object out to 3 m and the image only reaches −14.3 cm.
Glasses are labeled in diopters, so the focal length is 1 over the power. Reading glasses of +1.75 D have f = 57.1 cm. A distance lens of −2.5 D, for someone who is nearsighted, has f = −40 cm.
Common mistakes
- Dropping the minus sign on a diverging lens. A book that says "a 15 cm diverging lens" gives only the size. Entered as +15 cm with an object at 30 cm, it predicts a real image 30 cm behind the lens, when the true image is virtual at −10 cm.
- Reading a negative magnification as "smaller". The sign tells you the image is inverted. The size comes from the number without its sign, so −2 is twice as tall.
- Mixing a book that uses another sign rule. Some optics texts, such as HyperPhysics, count a real object distance as negative and write the equation with a minus sign. Pick one convention and keep it for the whole problem.
- Putting the object at the focal point. The rays leave parallel and no image forms at any finite distance, so there is nothing to solve.
- Using it for a thick lens or wide angles. The equation holds for rays close to the axis through a thin lens. A thick camera lens has two principal planes, and distances are measured from those.