Lens & Optics Calculator - Focal Length, Image Distance, Magnification
How to Use This CalculatorSelect the lens type (converging or diverging), then enter any two of the three values - focal length, object distance, or image distance - and choose units. The third is calculated instantly, along with magnification, image height (if object height is supplied), lens power in diopters, and a full description of the image type. The ray diagram updates automatically. Use the × button to clear a field. Quick examples to try: f = 10 cm, do = 30 cm (real inverted image beyond 2F) — f = 10 cm, do = 5 cm (magnifying glass, virtual upright) — f = −15 cm, do = 25 cm (diverging lens, always virtual). Focal Length
f
Object Distance
do
Image Distance
di
← enables image height output
Enter any two values above to solve for the third.
Thin Lens Equations1/f = 1/do + 1/di (thin lens equation)m = −di / do (lateral magnification) hi = m × ho (image height) P = 1/f (lens power in diopters, f in metres) Sign Convention (Real-is-Positive)f > 0 - converging (convex) lens f < 0 - diverging (concave) lensdo > 0 - object on incoming side (normal) do < 0 - virtual object di > 0 - real image (opposite side from object) di < 0 - virtual image (same side as object) m > 0 - upright image m < 0 - inverted image |m| > 1 - enlarged |m| < 1 - reduced About Lenses & the Thin Lens EquationA lens works by refracting light at each of its two curved surfaces, exploiting the fact that light changes speed when it crosses from one medium into another - a relationship quantified by the index of refraction. The thin lens approximation treats the lens as having negligible thickness, reducing all the geometry of refraction to one elegant equation: 1/f = 1/do + 1/di. The history of this equation reflects centuries of optical discovery. Ibn al-Haytham (965–1040) laid the groundwork with the first systematic study of refraction and the camera obscura in his Book of Optics. Johannes Kepler explained how the eye forms an image on the retina (1604), and Willebrord Snell derived the law of refraction that bears his name around 1621. The thin lens equation in its modern form was developed through the work of René Descartes and refined through the 17th and 18th centuries. It remains the cornerstone of geometrical optics today. A converging (convex) lens has a positive focal length and brings parallel rays to a real focus on the far side. It can produce real inverted images (when the object is beyond the focal point) or virtual upright magnified images (when the object is inside the focal point - as in a magnifying glass). A diverging (concave) lens has a negative focal length and always produces virtual, upright, reduced images. Lens power is measured in diopters (D = 1/f in metres) - your eyeglass prescription is written in diopters.
Explore Optics Hands-On:
Browse Optics, Lenses & Laser Pointers at xUmp.com — lenses, mirrors, diffraction gratings, fiber optic kits, and laser pointers to bring these equations to life in the lab or classroom. Curated by a physicist. Related Reference Pages |

