Solve 1/f = 1/do + 1/di — enter any two of focal length, object and image distance, get the third plus magnification and a real/virtual verdict, browser-only
- Runs locally
- Category Calculator
- Best for Getting a realistic range before a purchase, plan, workout, or schedule decision.
What this tool does
A thin lens equation calculator that solves 1/f = 1/do + 1/di for whichever value you leave blank. Type any two of focal length, object distance and image distance, and the tool returns the third, the lateral magnification m = -di/do, the image height if you supply an object height, and a plain reading of the image: real or virtual, upright or inverted, enlarged or reduced. It uses the standard real-is-positive convention from intro optics, so a converging convex lens has a positive focal length and a diverging concave lens a negative one, while a negative image distance flags a virtual image you cannot project on a screen. Edge cases are handled honestly: put the object at the focal point and it tells you the image goes to infinity rather than printing a meaningless number. Every result is one click to copy, and the focal length, object and image distances ride in the URL so a worked example shares as a link. Everything runs in your browser with no upload.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Student
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Lens Equation Calculator fits into your work
Use it for fast estimates, comparisons, and planning numbers before you make the final call.
Calculation jobs
- Getting a realistic range before a purchase, plan, workout, or schedule decision.
- Comparing scenarios by changing one input at a time.
- Turning rough assumptions into a number you can discuss.
Calculation checks
- Double-check units, dates, rates, and rounding assumptions.
- Treat health, finance, tax, and legal outputs as planning aids, not professional advice.
- Save the inputs that produced an important result so you can reproduce it later.
Good next steps
These links move the current task into a more complete workflow.
- 1 Scientific Calculator Scientific calculator — sin / cos / log / sqrt / power, with full keyboard input + history, deg/rad mode. Open
- 2 Unit Converter Convert between length, weight, temperature, area, volume, speed, time — instant, browser-only Open
- 3 Depth of Field Calculator Near limit, far limit, total depth of field & hyperfocal distance from your sensor, focal length, aperture and focus distance — browser-only Open
Real-world use cases
Check homework on the thin lens equation
A physics problem gives a converging lens of focal length 10 cm and an object 30 cm away, then asks for the image distance and whether the image is real or inverted. Type f = 10 and do = 30, leave di blank, and read di = 15 cm, m = -0.5, real and inverted and half-size. You confirm your algebra in one step instead of re-deriving the reciprocals by hand, and the labels match the wording the textbook uses to grade the answer.
Set up a projector or camera distance
You know the lens focal length and how far the screen sits, and you want the object distance that brings the image into focus. Enter f and the image distance di, leave do blank, and the tool solves the object distance for you. Because the equation is symmetric, the same trick finds the film to lens spacing in a camera once you fix the subject distance.
Explain magnifying glasses to a class
To show why a magnifier makes things bigger, put the object inside the focal length: f = 10 cm and do = 5 cm. The tool returns di = -10 cm and m = 2, tagged virtual, upright and enlarged. Project the URL on the board and students see the negative image distance is exactly what makes the image virtual, which lands better than a paragraph of prose.
Compare converging and diverging lenses
Hold the object fixed at 20 cm and flip the focal length sign. With f = 10 cm you get a real inverted image; with f = -10 cm the same object gives di near -6.67 cm, a virtual upright reduced image. Putting the two runs side by side makes the role of the sign convention concrete instead of abstract, which is the part students most often get backwards.
Common pitfalls
Forgetting the sign convention. A converging convex lens has a positive focal length and a diverging concave lens a negative one. Entering a concave lens as f = 10 instead of f = -10 flips real to virtual and inverts the orientation, so the whole verdict comes out wrong.
Reading a negative image distance as an error. A negative di is not a bug; it means the image is virtual and on the same side as the object, the normal result for a magnifying glass or any diverging lens. Take the sign as information, not a mistake.
Filling in all three boxes. The tool solves for the one value you leave blank, so if focal length, object distance and image distance are all entered there is nothing left to solve. Clear whichever quantity you want the calculator to find.
Privacy
Every calculation here is plain JavaScript that runs inside your browser tab. The focal length, object and image distances you type are never sent to a server, and nothing is logged. The one thing to know: the shareable link encodes those three numbers in the query string, so a link pasted into chat will record them in the recipient server access log. For routine optics homework that is harmless, but if the values are confidential use the copy button and paste the text rather than sharing the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Chinese Acupoint Locator 200+ meridian acupoints / WHO 2008 standard locations / with contraindications, manipulation, and combinations.
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Anagram Solver Check if two words are anagrams, rearrange a set of letters into every ordering, and read the sorted letter fingerprint, all in your browser
- Angle Converter Degrees, radians, gradians, turns, arcminutes, arcseconds and NATO mils, all from one input, copyable, browser-only