Thin Lens Calculator

Calculate focal length, image or object distance using 1/f = 1/dₒ + 1/dᵢ (thin lens equation).

🔭 Optics📐 1/f = 1/do+1/di🔬 Lenses
Focal length (f) cm
Object distance (dₒ) cm
⚠️ Check values — object must be outside focal length for real image.

What Is Thin Lens?

The thin lens equation 1/f = 1/dₒ + 1/dᵢ relates the focal length (f), object distance (dₒ), and image distance (dᵢ) for a thin lens. Converging lenses (convex, like a magnifying glass) have positive f; diverging lenses (concave) have negative f. All distances are positive when measured in the direction light travels (real images, real objects).

Sign convention: real images form on the opposite side of the lens from the object and have positive dᵢ. Virtual images form on the same side as the object and have negative dᵢ (lenses) or positive dᵢ (mirrors — opposite convention). Linear magnification m = −dᵢ/dₒ: negative m means inverted image; |m| > 1 means magnified.

Lens power (diopters) P = 1/f (in meters). A +2 D lens has f = 0.5 m; a −4 D lens (corrective for myopia) has f = −0.25 m. The eye itself has a power of about +60 D. Reading glasses (+1 to +3 D) compensate for reduced near-focusing ability. The total power of combined thin lenses is P_total = P₁ + P₂.

The thin lens equation assumes the lens is thin compared to object and image distances, and all rays make small angles with the optical axis (paraxial approximation). Real camera lenses use multiple thick elements to minimize spherical aberration, chromatic aberration, and field curvature — but the thin lens equation is the starting point for all optical design.

Formula Reference Table

Solve ForFormulaNotes
Image distance1/dᵢ = 1/f − 1/dₒPositive dᵢ = real image
Object distance1/dₒ = 1/f − 1/dᵢPositive dₒ = real object
Focal length1/f = 1/dₒ + 1/dᵢPositive f = converging
Linear magnificationm = −dᵢ/dₒ−ve = inverted; |m| = scale factor
Power (diopters)P = 1/f (meters)Prescription lenses use diopters
At f (focus)dᵢ → ∞Image at infinity; parallel rays emerge

3 Worked Examples

Example 1
Converging Lens — Real Image

Object 30 cm from converging lens, f = 10 cm.

  • 1/dᵢ = 1/10 − 1/30 = 3/30 − 1/30 = 2/30
  • dᵢ = 15 cm (positive → real, inverted image)
  • m = −15/30 = −0.5 (inverted, half size)
✓ dᵢ = 15 cm; m = −0.5 (inverted, smaller)
Example 2
Magnifying Glass — Virtual Image

Object 5 cm from converging lens, f = 8 cm.

  • 1/dᵢ = 1/8 − 1/5 = 5/40 − 8/40 = −3/40
  • dᵢ = −13.3 cm (negative → virtual image, upright)
  • m = −(−13.3)/5 = +2.67 (upright, magnified 2.67×)
✓ dᵢ = −13.3 cm (virtual); m = +2.67 (magnified, upright)
Example 3
Camera Lens — Find Object Distance

Camera lens f = 50 mm. Image forms at dᵢ = 52 mm. How far is the subject?

  • 1/dₒ = 1/f − 1/dᵢ = 1/50 − 1/52
  • 1/dₒ = 52/(50×52) − 50/(50×52) = 2/2600
  • dₒ = 2600/2 = 1,300 mm = 1.3 m from lens
✓ Subject distance = 1.3 m

Real-World Applications

📸
Camera Systems
Camera lenses form real, inverted images on the sensor. 1/f = 1/dₒ + 1/dᵢ governs focus. As dₒ decreases (closer subject), dᵢ increases — the lens must move farther from sensor. Macro lenses allow dᵢ >> f for extreme close-up.
👁️
Corrective Eyewear
Myopia (near-sight): eye focuses short. Prescribed diverging lens (− diopters) moves image backward. Hyperopia: eye focuses long. Converging lens (+) moves image closer. Presbyopia: reduced accommodation → reading glasses (+1 to +3 D).
🔬
Microscopes
Compound microscopes use two converging lenses. Objective (short f ≈ 1–5 mm) forms magnified real image; eyepiece (f ≈ 25 mm) further magnifies as a magnifying glass. Total magnification = m_objective × m_eyepiece ≈ 1,000×.
🔭
Telescopes
Refracting telescopes use a long-f objective and short-f eyepiece. Angular magnification = f_objective/f_eyepiece. The Hubble Space Telescope uses mirrors instead (reflector design), but the thin lens equation principles apply to primary and secondary mirror focal lengths.
🩺
Ophthalmoscopes
Eye doctors use lens systems to focus on the retina through the patient's pupil. Corrective lenses in the ophthalmoscope compensate for patient and examiner refractive errors, applying thin lens optics in real time.

Common Mistakes to Avoid

⚠️
Forgetting sign conventions

dᵢ > 0 = real image (light converges); dᵢ < 0 = virtual image. f > 0 = converging lens; f < 0 = diverging. Mixing conventions gives wrong image types.

⚠️
Object inside focal length

If dₒ < f for a converging lens, dᵢ becomes negative — a virtual, magnified, upright image. Don't expect a real image on a screen; the image is on the same side as the object.

⚠️
Using inconsistent distance units

All distances (f, dₒ, dᵢ) must be in the same units. Mix of mm and cm gives nonsense. Use cm or mm throughout.

⚠️
Confusing magnification sign with size

m = −dᵢ/dₒ: the sign (−) means inverted, not smaller. |m| determines size: |m| = 2 means 2× larger; |m| = 0.5 means half size.

⚠️
Applying thin lens to thick multi-element lenses

Compound camera lenses are not thin lenses. The equation gives a useful approximation, but real multi-element lenses have principal planes that define effective object/image distances — 'back focal distance' differs from f.

Frequently Asked Questions

What is the difference between converging and diverging lenses?
Converging (convex, positive f): bends light inward, can form real and virtual images. Diverging (concave, negative f): bends light outward, forms only virtual, upright, smaller images. Glasses for farsightedness use converging; nearsightedness use diverging.
What makes an image real vs. virtual?
Real image: light actually converges at the image location; can be projected on a screen; dᵢ > 0. Virtual image: light appears to diverge from the image point; cannot be projected; dᵢ < 0. Cameras, projectors, and eyes form real images; magnifying glasses and rear-view mirrors form virtual images.
What is a diopter?
Diopter (D) = 1/focal length in meters = lens power. A +2 D lens has f = 0.5 m; a −4 D lens has f = −0.25 m. Eye prescriptions in diopters make addition trivial: adjacent thin lenses combine as P_total = P₁ + P₂. Normal eye has ≈+60 D total power (from cornea + crystalline lens).
How does a compound microscope achieve 1000× magnification?
Objective (f ≈ 2 mm, dₒ ≈ 2.5 mm): m_obj = −dᵢ/dₒ ≈ −100. Eyepiece as magnifying glass: m_eye ≈ 25 cm/f_eye = 25/25mm = 10. Total = 100 × 10 = 1,000. Electron microscopes bypass the light diffraction limit (λ≈500 nm), achieving 0.1 nm resolution using electron beams.
What is spherical aberration?
Rays far from the optical axis focus at different distances than paraxial (near-axis) rays, causing blurring. Real lenses use aspheric surfaces, aperture stops, and multi-element designs to minimize this. Telescope mirrors can also be aspherized — the Hubble Space Telescope's mirror initially had spherical aberration corrected by COSTAR corrective optics.
What happens when the object is at the focal point?
1/dᵢ = 1/f − 1/f = 0 → dᵢ = ∞. Parallel rays exit the lens — used in collimators, spotlights, and lighthouses (bright source at focal point produces a nearly parallel beam). For a camera imaging the sun (infinity), dᵢ = f exactly.
What is the lensmaker's equation?
1/f = (n−1)(1/R₁ − 1/R₂) relates focal length to the refractive index n and the two surface radii R₁ and R₂. This lets lens designers choose surface curvatures for a desired focal length and material. It reduces to 1/f = 1/dₒ + 1/dᵢ when combined with ray tracing.
How do zoom lenses work?
Zoom lenses move internal element groups relative to each other, changing the combined effective focal length while keeping the image in focus. The relationship between f₁, f₂, and separation d: 1/f_combo = 1/f₁ + 1/f₂ − d/(f₁f₂). Varying d continuously changes f_combo — the zoom.

Related Physics Calculators

Formula Explorer connections

Interpretation: This relationship connects light propagation, geometry, wavelength, refraction, interference or image formation. Assumption: Use a consistent sign convention and units. Paraxial rays, thin elements, coherent light, vacuum wavelength or ideal optical components may be assumed.

Young's Double Slit Experiment Calculator →Brewster Angle Calculator →Critical Angle Calculator →Physics Formula Explorer →