Solve 1/f = 1/dₒ + 1/dᵢ for the image distance, object distance or focal length. You also get the magnification, whether the image is real or virtual, upright or inverted, its height, the lens power and a ray diagram drawn to scale.
Last updated:
Solve for
Positive for a converging (convex) lens, negative for a diverging (concave) lens
Distance from the object to the lens (positive)
Positive = real image on the far side; negative = virtual image on the object side
Used for the image height and the ray diagram
Enter your values to see the result.
Advertisement
Advertisement
How to use the Thin Lens Equation Calculator
Choose what to solve for: image distance, object distance or focal length.
Pick a length unit and enter the two known values. Use a negative focal length for a diverging lens.
Add the object height if you want the image height.
Read the result: distance, magnification and the image description.
Check the ray diagram and the table to see how the image moves as the object moves.
Thin lens formulas
Quantity
Formula
Example (f = 10 cm, dₒ = 30 cm)
Image distance
dᵢ = 1 / (1/f − 1/dₒ) = f·dₒ / (dₒ − f)
15 cm (real)
Object distance
dₒ = f·dᵢ / (dᵢ − f)
dᵢ = 15 cm → 30 cm
Focal length
f = dₒ·dᵢ / (dₒ + dᵢ)
30 × 15 / 45 = 10 cm
Magnification
m = −dᵢ/dₒ = hᵢ/hₒ
−0.5 (inverted, half size)
Lens power
P = 1/f (f in m)
+10 D
Newtonian form
xₒ·xᵢ = f² (distances from the focal points)
20 × 5 = 100
Where the image forms (converging lens)
Object position
Image position
Image
Everyday example
Very far (∞)
At F
Real, inverted, point-sized
Burning glass, telescope objective
Beyond 2F
Between F and 2F
Real, inverted, reduced
Camera, the eye
At 2F
At 2F
Real, inverted, same size
1:1 copier / macro
Between F and 2F
Beyond 2F
Real, inverted, enlarged
Projector, enlarger
At F
At infinity
No image
Collimator, spotlight
Inside F
Same side as object
Virtual, upright, enlarged
Magnifying glass
A diverging (concave) lens always forms a virtual, upright, reduced image between the lens and its focal point, which is why it is used to correct short-sightedness and in peepholes.
Drawing a ray diagram
Two rays from the top of the object are enough. A ray parallel to the axis bends through the far focal point (or appears to come from the near focal point for a diverging lens), and a ray through the centre of the lens passes straight through. Where the rays cross is the top of a real image; where their backward extensions cross is the top of a virtual image.
Frequently asked questions
What is the thin lens equation?
1/f = 1/dₒ + 1/dᵢ, where f is the focal length, dₒ the distance from the object to the lens and dᵢ the distance from the lens to the image. It holds for lenses whose thickness is small compared with these distances.
What sign convention does this calculator use?
The real-is-positive convention: object distances in front of the lens are positive, a positive image distance means a real image on the far side, a negative one means a virtual image on the object side, converging lenses have positive f and diverging lenses negative f.
How do I calculate magnification?
m = −dᵢ/dₒ = hᵢ/hₒ. A negative m means the image is inverted, a positive m means upright. |m| > 1 is enlarged and |m| < 1 is reduced. Example: dₒ = 30 cm and dᵢ = 15 cm give m = −0.5, an inverted image half the size.
When is the image real and when is it virtual?
For a converging lens the image is real and inverted when the object is farther than f from the lens, and virtual, upright and enlarged when it is closer than f (a magnifying glass). A diverging lens always gives a virtual, upright, reduced image of a real object.
What happens when the object is at the focal point?
The refracted rays leave parallel, so no image forms (dᵢ is infinite). This is how a collimator or a flashlight with the bulb at the focus works.
What is lens power in diopters?
Power P = 1/f with f in metres. A +2.5 D reading lens has f = 0.4 m; a −4 D lens is diverging with f = −0.25 m. Powers of thin lenses in contact add.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.