Lens Equation Calculator
One equation, every lens: 1/f = 1/do + 1/di places the image and m = −di/do flips or shrinks it — with real and virtual named, and the do = f boundary honest instead of infinite.
Lens Equation Calculator
Results recalculate instantly on every keystroke. Nothing you type is transmitted.
What this result does not account for
- Thin-lens paraxial model — no aberrations
- One refractive element, no compound systems
In short: A 0.1 m lens with the object at 0.15 m: di = 1/(1/f − 1/do) = 0.300000 m — a REAL image, screen-projectable, floating 0.300000 m past the lens. The magnification m = −di/do = −2.000000: inverted and twice life-size, which is the projector zone (f < do < 2f) speaking. Slide the object to 2f and the image lands at 2f life-size (the transit); slide it inside f and the equation goes negative — virtual, upright, enlarged: your magnifying glass.
Formula
1/f = 1/do + 1/di · di = 1/(1/f − 1/do) · m = −di/do · di > 0 real, di < 0 virtual
The thin-lens equation is bookkeeping for ray bending: the reciprocal of the focal length splits into the two reciprocal distances. The SIGNS carry the physics — f positive converging, f negative diverging; di positive means light really converges there (a screen can catch it), di negative means the rays only APPEAR to come from there (a virtual image your eye tolerates but a screen cannot show). The magnification inherits its sign from di, so one number carries both the size ratio and the flip.
Worked Example
- Enter the focal length — negative for a diverging lens.
- Enter the object distance and read where the image lands.
- Read the zone card: camera, transit, projector, collimator or magnifier.
- Drive do through f with the chips and watch the image jump from projector to magnifier.
Defaults: di = 0.300000 m real; m = −2.000000 (inverted, enlarged). At do = 0.05 m: virtual, upright, +2. With f = −0.1: always virtual, upright, reduced.
Strengths & Limits Of This Model
Where this engine is strong
- Zone named from YOUR numbers
- do = f boundary honest, not infinite
Where it stops
- No lensmaker thickness terms
- No aperture or depth-of-field
Practical Use Cases
Photography
which side of 2f the subject sits on
Optics bench work
predict before you cut the rail
Teaching
zones without memorising
Methodology & Editorial Standards
Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.
This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.
Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.
Lens Equation Calculator — 8 Expert FAQs
8 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.
Why does the equation go infinite at do = f?
Substitute: 1/di = 1/f − 1/do is zero when do = f, and di = 1/0 has no finite answer. Physically the refracted rays leave PARALLEL — no image anywhere. That honesty is a feature: the collimator (and every searchlight) lives exactly on this boundary. The page prints the boundary card instead of pretending.
What makes an image real versus virtual?
Whether light actually converges there. Real images (di > 0) form on the far side and burn a spot on paper; virtual images (di < 0) are where the rays WOULD have met if traced backwards — your eye intersects the diverging rays and obligingly reconstructs the picture. A projector makes real light; a magnifying glass makes virtual comfort.
Why is the magnification negative when the image inverts?
m = −di/do folds the flip into one sign: negative m means inverted (real images from converging lenses), positive m means upright (virtual ones). The magnitude is the size ratio. One number, two facts — the page keeps the sign rather than taking an absolute value and losing the orientation.
Why is a diverging lens always virtual-upright-reduced?
With f < 0 the term 1/f − 1/do is MORE negative than −1/do alone, so di always lands negative and smaller in magnitude than do. It cannot converge anything to a real focus; it can only make the world look smaller, upright and farther — the peep-hole, the viewfinder, the door spectacle.
What does the lens do at exactly 2f?
Perfect symmetry: the image forms at 2f with m = −1 — life-size, inverted, real. It is the boundary between the camera zone (beyond 2f, reduced) and the projector zone (inside 2f, enlarged), and the one place the image and object trade sizes exactly. The page names it the transit.
How close can this get to a real camera lens?
The equation is PARAXIAL — thin lens, small angles, one glass. Real camera lenses are thick, compound and corrected for dispersion and aberrations; photography adds aperture and depth of field that this equation never sees. It predicts WHERE; it does not predict how sharp.
Does the same equation work for mirrors?
Yes — the mirror equation has the identical form 1/f = 1/do + 1/di with its own sign conventions (concave positive, convex negative). The zones carry over too: a shaving mirror is the magnifier zone in silver. This page states the lens convention; mirror workers translate sign-by-sign.
How does refraction set the focal length at all?
Each surface bends light by Snell's law, and the lensmaker's equation turns the two surface curvatures and the glass index into f. The Snell's law page prices the bend per surface; this page assumes the factory already folded all that into one number — the focal length you type.