Thin Lens Equation Calculator (1/f = 1/s + 1/s')
Solve the thin lens equation for focal length (f), object distance (s), or image distance (s'). Enter any two values and get the third instantly — plus diopters, magnification, and a worked example.
- Data verified · June 2026
- Edited by Martín Rodríguez
- Formula verified by automated tests
- Private — runs on your device
See step-by-step calculation
See this calculation step by step
See period-by-period detail
How to use this calculator
Follow this tool’s steps, then review its formula, assumptions, and limits below.
1/f = 1/s + 1/s' — is the core formula of geometric optics. It links three quantities measured from the optical center of a lens: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.
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.
Sign Convention for the Thin Lens Equation (1/f = 1/s + 1/s')
| Quantity | Symbol | Positive (+) | Negative (−) | Unit |
|---|---|---|---|---|
| Focal length | f | Converging (convex) lens | Diverging (concave) lens | cm (or m) |
| Object distance | s | Real object (in front of lens) | Virtual object (rare) | cm (or m) |
| Image distance | s′ | Real image (behind lens) | Virtual image (same side as object) | cm (or m) |
| Magnification | m = −s′/s | |m| > 1 enlarged, image inverted (real) | |m| < 1 reduced, image upright (virtual) | dimensionless |
| Lens power | P = 1/f(m) | Converging lens (positive prescription) | Diverging lens (myopia prescription) | diopters (D) |
Fuente: HyperPhysics – Thin Lens Equation (Georgia State University); OpenStax University Physics Vol. 3, §2.3
How it works
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:
| Unknown | Formula |
|---|---|
| Focal length f | f = (s × s') / (s + s') |
| Object distance s | s = (f × s') / (s' − f) |
| Image distance s' | s' = (f × s) / (s − f) |
---
Sign Convention
| Quantity | Positive (+) | Negative (−) |
|---|---|---|
| f | Converging (convex) lens | Diverging (concave) lens |
| s | Real object (in front of lens) | Virtual object (rare) |
| s' | Real image (behind lens) | Virtual image (in front of lens) |
---
Reference Table — Common Scenarios
| Situation | s (cm) | s' (cm) | f (cm) | Magnification m | Image type |
|---|---|---|---|---|---|
| Object at 2f — symmetric | 40 | 40 | 20 | −1.00 | Real, inverted, same size |
| Object beyond 2f | 30 | 20 | 12 | −0.67 | Real, inverted, reduced |
| Object between f and 2f | 15 | 60 | 12 | −4.00 | Real, inverted, enlarged |
| Object exactly at f | 12 | ∞ | 12 | — | No image (parallel rays) |
| Object inside f (magnifier) | 8 | −24 | 12 | +3.00 | Virtual, upright, enlarged |
| Diverging lens, real object | 30 | −10 | −15 | +0.33 | Virtual, upright, reduced |
| Camera (50 mm lens at infinity) | 5000 | 5.03 | 5 | −0.001 | Real, inverted, tiny |
| Projector (5 cm lens, 5.2 cm slide) | 5.2 | 130 | 5 | −25.0 | Real, inverted, 25× enlarged |
Magnification: m = −s' / s. Negative = inverted (real image). |m| > 1 = enlarged.
---
Focal Length to Diopters Conversion Table
| Focal length f | Lens 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.
Worked Example — Physics Lab
Frequently asked questions
What is the thin lens equation?
How do I solve the thin lens equation for focal length?
What does a negative image distance (s') mean?
What is the difference between a converging and a diverging lens?
How do I convert focal length to diopters (eyeglass prescription)?
What is lateral magnification and how is it related to the thin lens equation?
Can I use this calculator for curved mirrors?
Why is there no image when the object is placed exactly at the focal length?
When does the thin lens equation break down?
Sources & references
Methodology & trust
ciencia calculator with its formula verified automatically against HyperPhysics — Thin Lens Equation (Georgia State University), per our editorial policy and methodology.
Updated: June 2026. Parameters are verified periodically against the cited sources.
Calculations run 100% in your browser. We do not store or transmit your data.
Indicative results. For critical decisions, consult a professional.
📌 How to cite this calculator
Rodríguez, M. (2026). Thin Lens Equation Calculator (1/f = 1/s + 1/s'). Hacé Cuentas. https://hacecuentas.com/en/thin-lens-equation-calculator
@misc{hacecuentas_thin_lens_equation_calculator_2026,
author = {Rodríguez, Martín},
title = {{Thin Lens Equation Calculator (1/f = 1/s + 1/s')}},
year = {2026},
howpublished = {\url{https://hacecuentas.com/en/thin-lens-equation-calculator}},
note = {Hacé Cuentas}
} Content licensed under CC-BY 4.0 — reuse it citing the source with a link to Hacé Cuentas.