Skip to content
Toolcroft

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

Real imageInverted

How to use this tool

  1. Select which value to solve for (focal length, object distance, or image distance).
  2. Enter the two known distances in metres.
  3. View the result, magnification, and image properties.

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

ApplicationConditionResult
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.

Frequently asked questions

What is the sign convention?

Distances are positive when measured in the direction light travels. A positive image distance means a real image on the far side of the lens; negative means a virtual image on the same side as the object.

What is magnification?

m = −di/do. A negative magnification means an inverted image. |m| > 1 means the image is larger than the object.

Browse all science & engineering