Home / Optics & Photonics / Geometric Optics / Thin Lens Equation

Formula & Calculator

Thin Lens Equation

This equation links three things for a thin lens: the focal length (how strongly the lens bends light), the object distance (how far the object is from the lens), and the image distance (where the image forms). It works for both converging (convex) and diverging (concave) lenses, with the right sign conventions. For example, if you know the focal length and where the object is, you can predict exactly where the image will be. It is the basic tool for designing cameras, glasses, and microscopes.

Optics Geometric Optics Lenses

Thin Lens Equation Calculator 1/f = 1/dₒ + 1/dᵢ

1/f = 1/dₒ + 1/dᵢ
f = focal length  ·  dₒ = object distance  ·  dᵢ = image distance
⟹ Solve ⟷ f, dₒ, dᵢ
cm
cm
cm
Please fix the errors above.
Solve for:
Presets:
Focal Length —
—
f: — dₒ: — dᵢ: —
✓ Copied!
Lens Power (1/f) —
Weak (< 0.05) Medium (0.05–0.15) Strong (> 0.15)
1/f = 1/dₒ + 1/dᵢ  ·  All distances are positive for real objects and images.

Variables

Symbol Quantity Unit
f Focal length m
d_o Object distance m
d_i Image distance m

What it means

The thin lens equation is the fundamental formula for locating images formed by thin lenses. It uses the sign convention: positive for real objects and images. It applies to converging and diverging lenses. This equation is used in designing cameras, projectors, microscopes, telescopes, and eyeglasses. It also helps understand the optics of the human eye. The magnification is related: m = −d_i/d_o. Understanding this equation is crucial for optical engineers and anyone working with imaging systems. It is derived from geometry and Fermat’s principle. The equation is also used in ray tracing and in optical design software.

Worked example

Thin Lens Equation – Two Detailed Examples

Real‑World
Scenario: A photographer uses a lens of focal length 12 cm to focus on a subject placed 20 cm in front of the lens. They need to find the image distance d_i to adjust the camera sensor position. Using the thin lens equation 1/f = 1/d_o + 1/d_i, they calculate 1/12 = 1/20 + 1/d_i, so d_i = 30 cm. The image forms 30 cm behind the lens, which corresponds to the sensor plane. This ensures a sharp image.
ParameterValue
do (cm)20
f (cm)12
11/d_i = 1/f − 1/d_o = 1/12 − 1/20 = (5−3)/60 = 2/60 = 1/30
2d_i = 30 cm
Result 30 cm ✓ Image distance
Scenario: A magnifying glass with a focal length of 8 cm is used to view a small object placed 10 cm from the lens. The user wants to know where the virtual image will appear. Applying the thin lens equation, they get d_i = −40 cm (negative indicates a virtual image on the same side as the object). This tells them the image appears at 40 cm behind the lens, providing the magnified view needed for reading fine details.
ParameterValue
do10
f8
11/d_i = 1/8 − 1/10 = (5−4)/40 = 1/40
2d_i = 40 cm, but virtual → d_i = −40 cm
Result −40 cm (virtual) ✓ Virtual image
Insight: The thin lens equation relates object distance, image distance, and focal length. Positive d_i indicates a real image (formed on the opposite side); negative indicates a virtual image (formed on the same side).

Common mistakes

  • Thin lens equation: 1/f = 1/d_o + 1/d_i – sign convention matters.
  • Sign convention: For real objects, d_o is positive. For real images, d_i is positive. For virtual images, d_i is negative.
  • Focal length f: Positive for converging (convex) lenses, negative for diverging (concave).
  • Units: All distances must be in the same units (e.g., cm, m).
  • Lens thickness: The equation assumes a thin lens (thickness ≪ radii of curvature) – for thick lenses, use the lensmaker’s equation with principal planes.

Applications

The thin lens equation, 1/f = 1/d_o + 1/d_i, relates the focal length (f) of a thin lens to the object distance (d_o) and image distance (d_i). This is the central formula in geometrical optics for determining image formation. Engineers, opticians, and photographers use it to design camera lenses, eyeglasses, microscopes, and telescopes. By solving for the required focal length, they can achieve the desired magnification or focus. It is also used in machine vision systems to set up proper focus and field of view. The equation assumes thin lenses, but is a good approximation for many practical systems. Understanding this formula is essential for anyone designing or using optical imaging devices.

  • Design and selection of camera lenses and projectors
  • Prescribing corrective lenses in optometry
  • Design of microscopes, telescopes, and magnifiers
  • Setting up machine vision and inspection systems
  • Educational demonstration of image formation