Thin Lens Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/9/2026
The distance of the image formed by a thin lens is calculated with di = (f × do) ÷ (do − f), from the thin lens equation 1/f = 1/do + 1/di. For a lens with a 10 cm focal length and an object placed at 30 cm, the image forms 15 cm from the lens.
Explanation
The thin lens equation, 1/f = 1/do + 1/di, relates the focal length (f, a fixed property of the lens), the object's distance (do, measured from the optical center), and the distance of the formed image (di). This calculator solves this equation for di, the quantity most often sought in practice: knowing your lens (f) and the position of the object you're observing (do), where does the image form? The image's position and nature depend directly on the object's position relative to the lens's characteristic distances: beyond twice the focal length (do > 2f), the image is real, inverted, and reduced; between one and two focal lengths (f < do < 2f), it's real, inverted, and enlarged; within the focal length (do < f), it becomes virtual, upright, and enlarged (this is the principle of the magnifying glass). Once the image's position is known, the amount by which light actually bends to get there is governed by the same refractive index that determines a lens's focal length in the first place, while our Snell's law calculator lets you determine that bending at a single interface rather than the formation of a complete image.
Example: an object at 30 cm from a lens with a 10 cm focal length
Inputs
Focal length: 10 cm. Object distance: 30 cm.
Calculation
di = (10 × 30) ÷ (30 − 10) = 300 ÷ 20 = 15 cm.
Result
The image forms 15 cm from the lens, on the opposite side from the object (a real image).
Frequently asked questions
What does a negative image distance mean?
With the convention used here, a negative image distance would indicate a virtual image, formed on the same side of the lens as the object (as in a magnifying glass) — this happens when the object is placed closer to the lens than its focal length (do < f). This calculator restricts the focal length and object distance to strictly positive values to stay within the most common case (converging lens, real object), unlike our Snell's law calculator, which instead handles refraction at a single interface rather than the formation of a complete image.
Why is the result empty when the object is exactly at the focal point?
When the object's distance exactly equals the focal length (do = f), the light rays emerge from the lens perfectly parallel to each other: they never converge, so no real image forms at any finite distance — this is the principle used in a collimator or a projector's spotlight.
Does this formula apply to diverging lenses?
The same conjugation equation applies, but a diverging lens has a negative focal length by convention — a case this calculator, deliberately restricted to converging lenses (positive focal length), doesn't cover directly.