Lens Maker Calculator
Work out a thin lens focal length and power from refractive index and the radii of both surfaces, in air or another medium.
What it does
The lens maker equation connects the shape of a lens to its focusing power. OpenStax gives it as 1/f = (n2/n1 - 1)(1/R1 - 1/R2), where n2 is the lens index and n1 is the index of the medium around it. In air n1 is close to 1, which reduces the equation to 1/f = (n - 1)(1/R1 - 1/R2).
Nothing in the equation depends on where an object sits. The two radii and the two indices describe the lens alone, so the result is a property of the glass and its grinding. Once you know the focal length, the thin lens equation can handle any object distance.
Signs are the part that needs care. Take light to travel from left to right and measure each radius from its surface to the centre of curvature. A radius is positive when that centre lies to the right of the surface and negative when it lies to the left. A biconvex lens has R1 positive and R2 negative, while a biconcave lens has R1 negative and R2 positive.
The factor (n2/n1 - 1) says how strongly the material bends light relative to its surroundings. Glass in air has a factor near 0.5. The same glass in water has a much smaller factor, so the lens becomes weaker and its focal length grows. If the two indices match, there is no refraction at all.
This page returns the thin lens focal length, the power in diopters, whether the lens converges or diverges, and the curvature term 1/R1 minus 1/R2. It assumes a thin lens in a uniform medium. Thickness, chromatic dispersion and aberrations are left out.
How to use
- Enter the refractive index of the lens material at the wavelength you care about.
- Enter the radius of the first surface, the one the light meets first. Make it positive for a convex front surface and negative for a concave one.
- Enter the radius of the second surface with the same rule. A biconvex lens has a negative R2.
- Enter the index of the surrounding medium. Use 1.00 for air and about 1.33 for water.
- Read the focal length first. A positive value means the lens converges light and a negative value means it diverges light.
- Read the optical power and curvature term next. Power is the reciprocal of focal length in metres.
Formula
- f
- Focal length of the thin lens in cm, positive for converging and negative for diverging.
- n_lens
- Refractive index of the lens material.
- n_medium
- Refractive index of the surrounding medium, about 1.00 in air.
- R1
- Radius of curvature of the surface facing the incoming light, in cm, signed.
- R2
- Radius of curvature of the far surface, in cm, signed.
- P
- Optical power in diopters, the reciprocal of focal length in metres.
Measure both radii from each surface to its centre of curvature, with distances to the right counted positive. A surface bulging toward the incoming light has a positive radius, so a biconvex lens uses R1 > 0 and R2 < 0, and a biconcave lens uses R1 < 0 and R2 > 0. A flat surface has an infinite radius and contributes zero to the curvature term, which you can enter as a very large number. The thin lens form ignores the thickness term added by the full lens maker equation. If the two radii are equal, the curvature term is zero and there is no finite focal length.
Worked example
Example: a symmetric biconvex glass lens in air
Defaults: lens index 1.50, R1 = +20 cm, R2 = -20 cm, surrounding index 1.00.
- Relative index factor: 1.50 / 1.00 - 1 = 0.50.
- Curvature term: 1/20 - 1/(-20) = 0.05 + 0.05 = 0.10 per cm.
- Reciprocal focal length: 0.50 x 0.10 = 0.05 per cm.
- Focal length: f = 1 / 0.05 = 20.00 cm, positive so the lens converges.
- Power: P = 100 / 20 = 5.00 D.
- The tool shows 20.00 cm, 5.00 D, Converging and 0.10000 1/cm.
Reference table
| Lens and medium | R1, R2 in cm | Focal length | Power |
|---|---|---|---|
| Glass 1.50 in air | +20, -20 | 20.00 cm | 5.00 D |
| Glass 1.60 in air | +20, -20 | 16.67 cm | 6.00 D |
| Glass 1.50 in water 1.33 | +20, -20 | 78.24 cm | 1.28 D |
| Biconcave 1.50 in air | -20, +20 | -20.00 cm | -5.00 D |
| Plano-convex 1.50 in air, flat back | +20, +1000000 | 40.00 cm | 2.50 D |
Limits
- The thin lens form drops the thickness term, so it is accurate only when the lens is much thinner than its radii and focal length.
- A single refractive index is used, so dispersion and chromatic aberration are not modelled.
- Both surfaces are treated as spherical and centred on one axis, with no astigmatism or decentration.
- A lens whose two radii match has zero curvature term and therefore no finite focal length in this model.
Common mistakes
- Using a positive R2 for a biconvex lens, which cancels the curvature instead of doubling it.
- Forgetting to divide by the medium index when the lens is under water or oil.
- Mixing millimetres and centimetres between the two radii.
- Treating a flat surface as radius zero instead of a very large radius, which makes the equation blow up.
- Reading a negative focal length as an error when it simply marks a diverging lens.
Try it yourself
Quick checks. Answers sit tucked under each question.
A symmetric biconvex lens has n = 1.60 and 30 cm radii in air. Find its focal length and power.
N = 0.60 and the curvature term is 1/30 + 1/30 = 0.066667 per cm. Then 1/f = 0.04 per cm, so f = 25.00 cm and P = 4.00 D. The tool shows 25.00 cm, 4.00 D, Converging and 0.06667 1/cm.
The same 1.50, 20 cm biconvex lens is put in water of index 1.33. What changes?
N becomes 1.50/1.33 - 1, about 0.12782. The curvature term stays 0.10 per cm, so 1/f is about 0.012782 per cm and f is about 78.24 cm, with power about 1.28 D. The lens is weaker but still converging.
A biconcave lens has n = 1.50 with R1 = -20 cm and R2 = +20 cm in air. What does the tool give?
N = 0.50 and the curvature term is -0.10 per cm, so f = -20.00 cm and P = -5.00 D. The type reads Diverging.
Questions
What does the lens maker equation calculate?
It gives the focal length of a thin lens from its refractive index and the radii of its two surfaces, plus the index of the surrounding medium.
Why is R2 negative for a biconvex lens?
Because the centre of curvature of the back surface lies to the left of that surface, toward the incoming light. With distances to the right counted positive, R2 is negative and the term 1/R1 minus 1/R2 adds the two curvatures.
Does a thicker lens have a different focal length?
Yes. The full equation includes a thickness term. This page uses the thin lens version, which is a good approximation when the lens is much thinner than its radii.
What happens when the lens is in water?
The factor n_lens/n_medium - 1 becomes smaller, so the focal length grows and the power drops. Enter 1.33 as the medium index.
How do I enter a flat surface?
A plane has an infinite radius, so it adds nothing to 1/R1 minus 1/R2. Enter a very large number such as 1000000 cm, which gives the same answer to the displayed precision.
Can the focal length be negative?
Yes. A negative result means a diverging lens, as with a biconcave shape or a lens whose index is lower than the medium around it.
Sources
- OpenStax University Physics Volume 3, 2.4 Thin Lenses
- Georgia State University HyperPhysics, Lens-Maker's Formula
- MIT OpenCourseWare 6.161/6.637, Geometric Optics class notes