Thin Lens Formula Calculator
Use the thin lens equation: 1/f = 1/do + 1/di. Enter values in centimeters and choose which variable to solve for.
How this lens calculator works
This calculator solves the classic thin lens equation used in optics, photography, and physics labs. You provide any two of the three main quantities (focal length, object distance, image distance), and it computes the third.
- f: focal length of the lens
- do: distance from object to lens
- di: distance from lens to image
After solving, the tool also reports magnification, image orientation, lens power in diopters, and whether the image is real or virtual.
Sign convention (important)
To get physically meaningful results, use a consistent sign convention:
- Positive focal length (f > 0): converging lens (convex)
- Negative focal length (f < 0): diverging lens (concave)
- Positive image distance (di > 0): real image (opposite side of lens)
- Negative image distance (di < 0): virtual image (same side as object)
Quick examples
Example 1: Solve for image distance
If f = 10 cm and do = 30 cm, the calculator returns di = 15 cm. Magnification is m = -0.5, so the image is inverted and half the object size.
Example 2: Solve for focal length
If do = 50 cm and di = 25 cm, then f = 16.67 cm. Lens power is approximately 6.00 D.
Common mistakes to avoid
- Mixing units (e.g., cm and m in the same calculation)
- Using zero for any distance (not valid in the equation)
- Ignoring sign convention for virtual images and diverging lenses
- Trying combinations that make the denominator zero (mathematically undefined)
Why lens calculations matter
Lens math appears in camera design, eyeglasses, microscopes, telescopes, phone optics, and machine vision systems. If you can compute image distance and magnification quickly, you can predict framing, focus behavior, and optical performance before building anything.
FAQ
Is this tool for thick lenses?
No. This is a thin lens approximation, which is excellent for many practical setups but not for high-precision thick-lens modeling.
Can I use negative values?
Yes. Negative values are valid when they follow optical sign conventions.
What is lens power?
Power in diopters is P = 1/f(m). If focal length is in centimeters, P = 100/f(cm).