Thin Lens Equation Calculator
Use the thin lens equation to find the image distance, magnification and image height from a lens’s focal length and the object distance.
How it works
1/f = 1/d_o + 1/d_i ⇒ d_i = 1 ÷ (1/f − 1/d_o) · Magnification m = −d_i ÷ d_o · h_i = m·h_o
The thin lens equation, 1/f = 1/d_o + 1/d_i, relates the focal length f to the object distance d_o and image distance d_i. Using the sign convention that a converging lens has positive f and a positive image distance means a real image on the far side, the magnification is m = −d_i/d_o: a negative m means the image is inverted, and |m| tells you how many times larger it is. When the object sits inside the focal length of a converging lens, d_i comes out negative — an upright, magnified virtual image, exactly how a magnifying glass works.
Worked example
A converging lens with f = 10 cm and an object 30 cm away: 1/d_i = 1/10 − 1/30 = (3 − 1)/30 = 2/30, so d_i = 15 cm. Magnification m = −15/30 = −0.5, so a 5 cm object forms a real, inverted image 2.5 cm tall.
Sources: Thin lens equation — Wikipedia
Frequently asked questions
What do the signs mean in the thin lens equation?
A positive focal length is a converging (convex) lens, negative is diverging (concave). A positive image distance means a real image on the opposite side of the lens from the object; a negative image distance means a virtual image on the same side. A negative magnification means the image is inverted.
When does a lens produce a virtual image?
A converging lens makes a virtual, upright, magnified image when the object is closer than one focal length — the magnifying-glass case. A diverging lens (negative f) always produces a virtual, upright, reduced image regardless of object distance.
What does the magnification tell me?
The magnification m = −d_i/d_o gives both the size and orientation of the image: |m| greater than 1 means enlarged, less than 1 means reduced, and a negative sign means inverted. Multiply it by the object height to get the image height.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.