Lens Calculator - Thin Lens Equation 1/f = 1/do + 1/di
Science & Engineering
Solve the thin lens equation for focal length, object distance, or image distance. Computes magnification and tells you whether the image is real or virtual, upright or inverted.
Focal length f (m)
0.1000
Object dist do (m)
0.3000
Image dist di (m)
0.1500
Magnification
-0.5000
Thin Lens Equation
1/f = 1/do + 1/di - relates the focal length of a thin lens to the object and image distances. Converging (convex) lenses have a positive focal length; diverging (concave) lenses have a negative focal length.
Sign convention
The standard sign convention for thin lenses (real-is-positive or Cartesian):
- do > 0: object is on the incoming-light side of the lens (real object - the usual case).
- di > 0: image forms on the outgoing-light side - a real image where light rays actually converge (can be projected onto a screen).
- di < 0: image appears on the same side as the object - a virtual image where rays only appear to diverge from a point (cannot be projected). A magnifying glass always produces a virtual image.
Magnification formula
m = −di / do
- m < 0 (negative): image is inverted - typical of real images formed by converging lenses (cameras, projectors).
- m > 0 (positive): image is upright - typical of virtual images (magnifying glass, eyepiece lenses).
- |m| > 1: image is enlarged; |m| < 1: image is reduced.
Common applications
| Application | Condition | Result |
|---|---|---|
| Camera lens | do ≫ f | di ≈ f - small, inverted real image on sensor |
| Magnifying glass | do < f | Virtual, upright, enlarged image |
| Projector | do slightly > f | Large, inverted real image on screen (di ≫ do) |
| Telescope objective | do = ∞ (distant star) | Real image at focal point (di = f) |
Lensmaker's equation
For a lens made of material with refractive index n and radii of curvature R1 and R2:
1/f = (n − 1)(1/R1 − 1/R2)
R1 is the radius of the surface facing the incoming light; R2 is the radius of the exit surface. By convention, a surface curving toward the incoming light has a positive radius. This equation explains why a biconvex lens (R1 > 0, R2 < 0) always has a positive focal length.
Related calculators
- Length ConverterConvert focal, object, and image distances into consistent units.
- Snell's LawStudy the refraction relationship that underlies lens behavior.
- Angle ConverterTranslate field-of-view or ray angles used alongside the thin-lens model.
- Physics ConstantsReference optical constants when extending the calculation beyond a thin lens.