Lensmaker's Equation Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction

The lensmaker's equation connects the shape of a lens to the way it bends light. If you know the refractive index of the material and the curvature of the two lens surfaces, you can estimate the focal length. If one of those values is unknown, the same relationship can be rearranged to solve for it. That is exactly what this calculator does. Enter any four values, leave one field blank, and the page computes the missing quantity directly in your browser.

This tool is useful for students learning geometric optics, hobbyists experimenting with simple lens designs, and anyone who wants a quick check on a homework or design calculation. It supports both the familiar thin-lens case and the more general thick-lens form by including the center thickness d. When thickness is set to zero, the equation reduces to the thin-lens approximation. When thickness is nonzero, the extra term shows how a real lens can differ from the idealized thin model.

Because optical sign conventions can be confusing, it helps to read the inputs carefully before calculating. The values for R1 and R2 are signed radii of curvature, not just magnitudes. A positive or negative sign changes whether a surface contributes to convergence or divergence. The calculator does not force a particular lens shape, so it can be used for biconvex, plano-convex, meniscus, biconcave, and other forms as long as the sign convention is applied consistently.

How to Use

Start by deciding which quantity you want to find. The calculator expects exactly one blank field. Fill in the other four values, then press the compute button. If more than one field is blank, or if all fields are filled, the script will ask you to leave exactly one field empty. This simple rule keeps the calculation unambiguous.

Here is what each input means in plain language. The refractive index n describes how strongly the lens material bends light relative to the surrounding medium. For a glass lens in air, a common value is around 1.5. The radius R1 is the curvature radius of the first surface encountered by incoming light, and R2 is the radius of the second surface. The thickness d is the distance between the two lens vertices along the optical axis. The focal length f is the distance from the lens to the focal point in the paraxial approximation.

Units matter. This page does not convert units automatically, so all length values should be entered in the same unit system. If you use meters for R1, R2, and d, then the resulting focal length will also be in meters. You could use millimeters instead, but then every length on the form must also be in millimeters. Mixing meters and millimeters in the same calculation will produce incorrect results.

The sign convention used here follows standard introductory optics. A radius is positive when the center of curvature lies to the right of the surface as seen by incoming light, and negative when the center lies to the left. In many common converging lenses, that means R1>0 and R2<0. For a diverging biconcave lens, the signs are often reversed. If you are unsure, sketch the lens and mark the center of curvature for each surface before entering numbers.

After you submit the form, the result message confirms which variable was computed. The script also writes the numerical answer back into the blank input field so you can immediately reuse it in another calculation. That makes it easy to explore how changing one parameter affects the others. For example, you can compute focal length first, then alter the refractive index and compute again to compare the optical power of different materials.

Formula

The general lensmaker relation used on this page is the thick-lens form. In the notation of the calculator, it is written as:

Formula: 1 / f = n - 1 1 / R_1 - 1 / R_2 + (n - 1) / d 1 / R_1

1 f = n - 1 1 R1 - 1 R2 + n - 1 d 1 R1 R2 n

In words, the reciprocal of focal length depends on three things: the refractive index contrast, the curvature of the first surface, and the curvature of the second surface, with an additional correction term when the lens has nonzero thickness. Stronger curvature usually means a shorter focal length in magnitude. A higher refractive index also tends to increase optical power, again shortening the focal length for a converging lens of the same shape.

For thin lenses, where the thickness is negligible, the equation simplifies to the familiar form:

Formula: 1 / f = n - 1 1 / R_1 - 1 / R_2

1 f = n - 1 1 R1 - 1 R2

This simplified expression is often the first version taught in physics classes because it captures the main idea without the extra thickness correction. Still, real lenses are not infinitely thin, so the full equation is more appropriate when the center thickness is not small compared with the radii of curvature.

The calculator can also solve for R1, R2, d, or n when those are the unknowns. Most of those cases are handled by algebraic rearrangement. When refractive index is left blank, the script uses a Newton-Raphson iteration to find a numerical solution. That approach is practical because the thick-lens equation is nonlinear in n.

Worked Example

Suppose you have a biconvex glass lens with refractive index n=1.52. Let the first radius be R1=0.1 m and the second radius be R2=-0.1 m. If the lens is thin enough that d=0, then the thin-lens form gives a focal length of about f0.096 m. That means parallel incoming rays would come to focus roughly 9.6 cm from the lens under paraxial conditions.

Now compare that with a slightly thicker version of the same lens. If the center thickness is 5 mm, or 0.005 m, the focal length becomes a little shorter. The difference is not dramatic in this example, but it is real. In precision optical systems, even a small shift in focal length can matter. This is why the thickness field is worth including instead of assuming every lens is thin.

You can also use the calculator in reverse. Imagine you know the desired focal length and the material, but one surface radius has not been chosen yet. Leave that radius blank, enter the other values, and compute. The result gives you a starting curvature for design work. In practice, optical engineers often begin with this kind of first-pass estimate and then refine the lens using more advanced software that accounts for aberrations and manufacturing constraints.

As another quick interpretation example, a negative focal length means the lens is diverging rather than converging. If your inputs produce a negative result, that does not necessarily mean the calculator failed. It usually means the chosen curvatures and refractive index correspond to a lens that spreads parallel rays apart. That is expected for many concave lens shapes.

Assumptions and Limitations

The lensmaker's equation is powerful, but it is not a complete model of every optical behavior. It is based on paraxial optics, which assumes rays stay close to the optical axis and make only small angles with it. Under that approximation, trigonometric relationships simplify and the lens can be described with a compact formula. Once rays move far from the axis or strike the lens at large angles, real image formation can depart noticeably from the prediction.

Another limitation is that the equation describes focal length, not image quality. A lens can have the correct focal length and still produce blurry or distorted images because of spherical aberration, coma, astigmatism, field curvature, distortion, or chromatic aberration. Those effects depend on more than just the paraxial focal power. They often require ray tracing or multi-element lens design to analyze properly.

The refractive index entered here should be interpreted relative to the surrounding medium. If the lens is in air, the usual glass index values apply directly. If the lens is submerged in water or another fluid, the effective relative index changes. For example, a glass lens with absolute index 1.5 in water with index 1.33 behaves more like a lens with relative index 1.51.331.13. Entering the relative value gives a more realistic result for underwater use.

Numerical edge cases can also occur. If a radius is zero, the equation becomes undefined because curvature would be infinite. If the chosen values imply an impossible or unstable configuration, the computed result may be extremely large, extremely small, or not physically meaningful. Likewise, when solving for refractive index numerically, some unusual combinations may converge slowly or lead to a value that is mathematically valid but unrealistic for ordinary optical materials.

Even with those limitations, the calculator remains a very useful first-order design and learning tool. It helps build intuition about how curvature, thickness, and material properties interact. Make one surface steeper and the lens usually becomes stronger. Increase the refractive index and the same shape bends light more. Increase thickness and the thick-lens correction begins to matter. Those trends are central to understanding optical design, and this page lets you explore them quickly without leaving the browser.

Interpreting the Result

When the calculator returns a focal length, the sign tells you whether the lens is converging or diverging in the chosen sign convention. Positive focal length generally indicates a converging lens, while negative focal length indicates a diverging lens. When the calculator returns a radius, the sign tells you which side of the surface the center of curvature lies on. When it returns refractive index, compare the value with known materials to judge whether the result is plausible. Typical crown glasses are around 1.5, while higher-index optical glasses can be significantly larger.

If you are checking a classroom problem, it is a good habit to estimate the answer before pressing compute. A strongly curved glass lens should not produce an extremely long focal length unless the curvatures nearly cancel. A lens in water should usually be weaker than the same lens in air. A very thick lens may differ noticeably from the thin-lens estimate. These rough expectations help you catch sign mistakes and unit mismatches before relying on the numerical output.

Sample values showing how curvature and thickness affect focal length for a lens with refractive index 1.5
Rโ‚ (m) Rโ‚‚ (m) Thickness d (m) Focal Length f (m)
0.1 -0.1 0 0.100
0.05 -0.05 0 0.050
0.05 -0.05 0.01 0.048
0.1 0.1 0 -0.100

Calculator Inputs

Enter any four values and leave exactly one field blank to compute the missing quantity.

Provide any four values to compute the fifth.