About Lens Calculator
The thin-lens equation connects where an object sits, where its image forms and the lens's focal length: 1/f = 1/dₒ + 1/dᵢ. The magnification m = −dᵢ/dₒ tells you whether that image is enlarged or reduced, while the signs reveal whether it is real or virtual and inverted or upright.
This calculator solves for whichever quantity you are missing, in centimeters or meters, and explains the result in plain language. It also states the sign convention explicitly, because a negative image distance or magnification is information rather than an error, and warns when no real image can form.
What this tool does
Solve all three lens quantities
Calculate focal length from the two distances, object distance from focal length and image distance, or image distance from focal length and object distance.
Magnification and orientation
The magnification m = −dᵢ/dₒ is reported with inverted or upright and enlarged or reduced labels.
Real or virtual image
The image type and the side it forms on are explained, with a note that virtual images cannot be projected on a screen.
Sign convention stated
Converging and diverging focal lengths and real and virtual image distances are defined on the page.
No-real-image warnings
Objects inside the focal point and diverging lenses are flagged, because no real image forms in those cases.
Formula and substitution
The thin-lens equation and magnification are printed with the values in meters, so the result can be checked.
How to use Lens Calculator
- 01
Choose what to calculate
Select focal length, object distance or image distance depending on the missing value.
- 02
Enter the two known distances
Type the values and choose centimeters or meters; the same unit applies to every length field.
- 03
Watch the signs
Use a positive focal length for a converging lens, and a negative image distance when the image is virtual.
- 04
Read the image description
The headline gives the solved distance, and the explanation gives magnification, orientation and whether the image is real or virtual.
- 05
Check the working and warnings
The formula panel shows the substitution in meters, and a warning appears when the arrangement cannot form a real image.
How this tool works
- Works with
- lens → f, dᵢ, m
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Requirements
- Chrome, Edge, Firefox or Safari · JavaScript enabled
Limitations worth knowing
- Uses the thin-lens and paraxial approximations; thick lenses, wide angles and aberrations are outside the model.
- Applies to a single thin lens only; multi-element systems need ray tracing or lens-design software.
- Assumes the same medium on both sides of the lens; a lens between different media needs a modified form of the equation.
Privacy and file handling
Distances and focal lengths are processed entirely in your browser. Nothing is uploaded, stored or logged, and no network request is made while you calculate.
Read the full privacy policy