ciencia

Thin Lens Equation Calculator (1/f = 1/s + 1/s')

Calculator Free · Private
Reviewed by: (política editorial ) · Last reviewed:
Was this calculator helpful?

The thin lens equation1/f = 1/s + 1/s' — is the core formula of geometric optics. It links three quantities measured from the optical center of a lens: - f = focal length (positive for converging/convex lenses, negative for diverging/concave lenses) - s = object distance (always positive for a real object) - s' = image distance (positive = real image on the far side; negative = virtual image on the same side as the object) Given any two of these, this calculator instantly finds the third. It also converts focal length to diopters (lens power), which is the unit used in eyeglass prescriptions and optometry. Use it for physics homework, optics lab work, camera lens design, telescope layout, or eyeglass analysis.

Last reviewed: June 3, 2026 Verified by Source: HyperPhysics — Thin Lens Equation (Georgia State University), University Physics (OpenStax) — Thin Lenses, Wikipedia — Thin lens 100% private

The thin lens equation is 1/f = 1/s + 1/s', where f is focal length, s is object distance, and s' is image distance (all in the same unit). To find focal length: f = (s × s') / (s + s'). Example: object at s = 30 cm, image at s' = 20 cm → f = (30 × 20) / (30 + 20) = 600 / 50 = 12 cm. Lens power = 1 / 0.12 m ≈ 8.33 diopters.

When to use this calculator

  • Physics lab: place a candle at a known distance from a convex lens, measure the image on a screen, and calculate the lens's focal length.
  • Eyeglass prescription analysis: a –2.50 D lens has f = 1 / –2.50 = –0.40 m = –40 cm — enter f = –40 to find where the corrected image falls.
  • Projector design: a slide is 5.2 cm from a 5 cm lens — the screen must go at s' = 130 cm (25× magnification).
  • Telescope layout: compute the image distance from the objective lens; that becomes the object distance input for the eyepiece.
  • Macro photography: at 1:1 magnification, both s and s' equal 2f — find the required extension for any lens.

Worked Example — Physics Lab

  1. Object distance s = 30 cm (candle in front of convex lens)
  2. Image distance s' = 20 cm (sharp image on screen)
  3. 1/f = 1/30 + 1/20 = 2/60 + 3/60 = 5/60
  4. f = 60/5 = 12 cm
  5. Lens power P = 1 / 0.12 m ≈ 8.33 diopters (converging)
Result: Focal length f = 12 cm (converging lens, real image)

How it works

3 min read

How It Is Calculated

The thin lens equation works for any lens whose thickness is negligible compared to its focal length:

1/f = 1/s + 1/s'

Rearranged to solve for each variable:

UnknownFormula
Focal length ff = (s × s') / (s + s')
Object distance ss = (f × s') / (s' − f)
Image distance s's' = (f × s) / (s − f)

---

Sign Convention

QuantityPositive (+)Negative (−)
fConverging (convex) lensDiverging (concave) lens
sReal object (in front of lens)Virtual object (rare)
s'Real image (behind lens)Virtual image (in front of lens)

---

Reference Table — Common Scenarios

Situations (cm)s' (cm)f (cm)Magnification mImage type
Object at 2f — symmetric404020−1.00Real, inverted, same size
Object beyond 2f302012−0.67Real, inverted, reduced
Object between f and 2f156012−4.00Real, inverted, enlarged
Object exactly at f1212No image (parallel rays)
Object inside f (magnifier)8−2412+3.00Virtual, upright, enlarged
Diverging lens, real object30−10−15+0.33Virtual, upright, reduced
Camera (50 mm lens at infinity)50005.035−0.001Real, inverted, tiny
Projector (5 cm lens, 5.2 cm slide)5.21305−25.0Real, inverted, 25× enlarged

Magnification: m = −s' / s. Negative = inverted (real image). |m| > 1 = enlarged.

---

Focal Length to Diopters Conversion Table

Focal length fLens power P
−40 cm−2.50 D (myopia, –2.50 prescription)
−25 cm−4.00 D
−20 cm−5.00 D
+25 cm+4.00 D (reading glasses)
+12 cm+8.33 D
+10 cm+10.0 D
+5 cm+20.0 D (strong loupe)

Formula: P (diopters) = 1 / f (meters)

---

Worked Examples

Example 1 — Physics Lab (find focal length)


Candle at s = 30 cm, sharp image on screen at s' = 20 cm:

1/f = 1/30 + 1/20 = 5/60  →  f = 12 cm
m = −20/30 = −0.67  (real, inverted, 33 % smaller)

Example 2 — Projector (find screen distance)


Slide is 5.2 cm from a lens with f = 5 cm:

1/s' = 1/5 − 1/5.2 = 0.200 − 0.1923 = 0.00769
s' = 130 cm
m = −130/5.2 = −25  (25× enlarged on screen)

Example 3 — Diverging Lens (eyeglasses for myopia)


Object at s = 40 cm, lens f = −20 cm (diverging):

1/s' = 1/(−20) − 1/40 = −0.050 − 0.025 = −0.075
s' = −13.3 cm  (virtual image, 13.3 cm on same side as object)
m = +0.33  (upright, reduced)

Example 4 — Magnifying Glass


Object at s = 8 cm (inside focal length), f = 12 cm:

1/s' = 1/12 − 1/8 = −1/24
s' = −24 cm  (virtual, behind the object)
m = +3.00  (upright, 3× enlarged)

---

Common Errors

1. Wrong sign for diverging lenses. A concave lens has negative f. Enter f = −20, not +20.
2. Mixed units. If s is in cm and f in mm, results are garbage. Use the same unit throughout (this calculator uses cm).
3. Negative s' is not an error. It means a virtual image — expected for magnifying glasses and diverging lenses.
4. Object at the focal point (s = f). The denominator becomes zero → s' → ∞. No finite image exists.
5. Thick lenses. This equation assumes the lens is thin. Thick lenses, fish-eye lenses, and the human eye require the lensmaker's equation or ray-tracing software.

Frequently asked questions

What is the thin lens equation?

The thin lens equation is 1/f = 1/s + 1/s', where f is focal length, s is object distance, and s' is image distance — all measured from the optical center of the lens in the same unit. It applies to any thin lens (one whose thickness is much smaller than f, s, and s') under the paraxial approximation (small angles). It was derived in the 19th century from Snell's law applied to both surfaces of the lens.

How do I solve the thin lens equation for focal length?

Rearrange 1/f = 1/s + 1/s' to get f = (s × s') / (s + s'). Example: s = 30 cm, s' = 20 cm → f = (30 × 20) / (30 + 20) = 600 / 50 = 12 cm. The lens has a focal length of 12 cm and a power of 1 / 0.12 m ≈ 8.33 diopters.

What does a negative image distance (s') mean?

A negative s' means the image is virtual — it forms on the same side as the incoming light, not on the far side of the lens. Virtual images cannot be projected on a screen but are visible to an observer looking through the lens. This always happens when: (a) a converging lens is used with an object closer than f (magnifying glass mode), or (b) a diverging lens is used with any real object.

What is the difference between a converging and a diverging lens?

A converging (convex) lens focuses parallel rays to a real focal point on the far side → positive f (e.g., f = +10 cm). A diverging (concave) lens spreads rays as if they came from a virtual focal point on the near side → negative f (e.g., f = −15 cm). In the thin lens equation, the sign of f determines whether the image is real or virtual and which side of the lens it forms on.

How do I convert focal length to diopters (eyeglass prescription)?

Lens power P (diopters) = 1 / f where f is in meters. Examples: f = +25 cm = +0.25 m → P = +4.00 D (reading glasses). f = −40 cm = −0.40 m → P = −2.50 D (myopia correction). Optometrists prefer diopters because the powers of two lenses in contact simply add: P_total = P₁ + P₂.

What is lateral magnification and how is it related to the thin lens equation?

Lateral magnification m = −s' / s gives the ratio of image height to object height. A value of m = −3 means the image is 3× taller and inverted (real image). A value of m = +0.5 means the image is half the height and upright (virtual image). The negative sign follows from the standard sign convention and indicates image inversion, not a physically negative size.

Can I use this calculator for curved mirrors?

Yes — the mirror equation 1/f = 1/s + 1/s' is mathematically identical. However, the sign conventions differ: for mirrors a positive s' means a real image in front of the mirror, and a concave (converging) mirror has f = R/2 where R is its radius of curvature. Enter your values with the correct mirror sign convention and the arithmetic is identical.

Why is there no image when the object is placed exactly at the focal length?

When s = f, the formula gives 1/s' = 1/f − 1/f = 0, so s' → ∞. Physically, rays from a point source at the focal point exit the lens as a perfectly parallel beam and never converge. This property is used in collimating optics (laser beam expanders, searchlights, projector lenses) to produce parallel light from a point source.

When does the thin lens equation break down?

The formula breaks down when: (1) the lens is thick relative to f, s, or s' — use the lensmaker's equation instead; (2) rays enter at large angles (> ~5°) — the paraxial approximation fails; (3) dispersion matters — the thin lens treats all wavelengths equally, but real lenses have chromatic aberration. Precision optical design uses ray-tracing software and multi-element lens systems.

Sources and references