Lens Equation Calculator
Enter any two of focal length, object distance, and image distance to solve for the third.
Sign convention: converging lens f > 0, diverging lens f < 0. Leave one field blank to solve for it.
Free Lens Equation Calculator
This lens equation calculator solves the thin lens formula 1/f = 1/dₒ + 1/dᵢ for whichever variable — focal length, object distance, or image distance — you leave blank. It also computes magnification (m = −dᵢ/dₒ) and tells you whether the resulting image is real or virtual, and upright or inverted.
Using the standard sign convention: a converging (convex) lens has positive focal length, a diverging (concave) lens has negative focal length, positive image distance means a real image on the opposite side, and negative image distance means a virtual image on the same side as the object.
Useful for optics coursework covering lenses, cameras, and the eye. Free, runs entirely in your browser, no sign-up required.
About the Lens Equation Calculator
How It Works & Methodology
This calculator solves 1/f = 1/dₒ + 1/dᵢ for focal length, object distance, or image distance — whichever you leave blank — and also reports magnification, whether the image is real or virtual, and whether it's upright or inverted.
Features
Solve for any variable
Leave f, dₒ, or dᵢ blank and the calculator finds it.
Magnification
See the image size ratio and orientation.
Image type
Real or virtual, upright or inverted, determined automatically.
Instant, private
Runs entirely in your browser. No data is sent anywhere.
Related Calculators & Tools
Calculate range, maximum height, flight time, and impact velocity, and watch the trajectory animate on a live canvas.
Solve for any two unknowns using the five kinematic equations, with step-by-step working.
Solve for voltage, current, resistance or power from any two known values, with unit conversion and a formula triangle.
Apply Newton's second law to solve for force, mass, or acceleration, with unit conversion and an optional net-force mode.
Authoritative Sources & Standards
- CODATA Internationally Recommended Values of the Fundamental Physical Constants — National Institute of Standards and Technology (NIST)
- ISO 80000-4: Quantities and Units — Mechanics, Thermodynamics, and Electromagnetism — International Organization for Standardization (ISO)
Frequently Asked Questions
What is the thin lens equation?
1/f = 1/dₒ + 1/dᵢ, where f is focal length, dₒ is object distance, and dᵢ is image distance, all measured from the lens.
What sign convention does this calculator use?
A converging (convex) lens has a positive focal length; a diverging (concave) lens has a negative focal length. A positive image distance means a real image on the far side of the lens; negative means a virtual image on the same side as the object.
What does magnification tell you?
Magnification m = −dᵢ/dₒ gives the ratio of image size to object size. A magnitude greater than 1 means the image is larger than the object; a negative sign means the image is inverted.
What's the difference between a real and virtual image?
A real image forms where light rays actually converge and can be projected onto a screen; a virtual image only appears to come from a location where rays don't actually meet, like a magnifying glass image.
What does 'upright' vs 'inverted' mean?
An upright image has the same orientation as the object; an inverted image is flipped upside down. This is determined by the sign of the magnification.
Can I solve for focal length instead of image distance?
Yes — leave any one of the three fields (f, dₒ, or dᵢ) blank, and the calculator solves for that one using the other two.
What happens with a diverging lens?
Enter a negative focal length. Diverging lenses always produce virtual, upright, reduced images regardless of object distance.
Why can't any value be zero?
The lens equation involves dividing by f, dₒ, and dᵢ, so a value of zero would make the equation undefined.
Does this work for mirrors too?
The mirror equation has the same mathematical form (1/f = 1/dₒ + 1/dᵢ), so the numbers work the same way, though the physical sign conventions for mirrors differ slightly from lenses.