If you want to design a lens from scratch, you need to understand exactly how your choice of glass and surface geometry will bend light. If you misjudge either, your focal point will be off. The Lensmaker's Equation Calculator here lets you work out the focal length, radii of curvature, refractive index, or optical power using the textbook thin lens formula. This comes up in a lot of real-world contexts: photonics, machine vision, laser optics, or simply making glasses. Usually, you've got tight tolerances—if the focus isn't right, the system won't function. Below you'll find the working formula, a practical beam expander design example, full theory, and a practical FAQ on aberrations and limits of manufacturing.
What is the Lensmaker's Equation?
The Lensmaker's Equation gives you a way to relate the focal length of a lens directly to the curvature of its two sides and the glass type. In short: it's the bridge between the lens’ geometry, refractive index, and where your light actually comes to a focus.
Simple Explanation
Imagine a lens as glass with two curved faces—think “flattened marble.” The more aggressively you curve the faces, and the higher the refractive index of the glass, the more it bends light. This translates into a shorter focal length. The Lensmaker’s Equation simply brings together those three things: the glass type, the surface curvature, and the focal spot location.
📐 Browse all 1000+ Interactive Calculators
Table of Contents
Lens Geometry Diagram
How to Use This Calculator
- Pick which variable you want to solve for—focal length, either radius, refractive index, optical power, or thin lens combination.
- Enter the refractive index for the outside medium (n₁, usually air = 1.00) and for your lens material (n₂). Put in each curvature as R₁ and R₂ in millimeters—positive values for convex surfaces, negative for concave.
- If you need to solve for a focal length from known inputs, fill that field instead as required.
- Hit Calculate to get your result.
Interactive Lensmaker's Equation Calculator
This calculator is intended for education, concept evaluation, and preliminary design. Results are based on the equations and assumptions described on this page, but cannot account for every real-world load case, tolerance, material property, environmental condition, installation detail, safety factor, code, or regulatory requirement. Verify all inputs, assumptions, units, and results independently before selecting components or using the result in a real application. Safety-critical, structural, medical, lifting, transportation, or regulated applications must be reviewed by a qualified engineer.
Lensmakers Equation Interactive Visualizer
You can see directly how focal length changes as you adjust the curvatures and refractive index. Move the sliders and watch how the rays either come to a point or spread out, depending on your lens geometry and material.
FOCAL LENGTH
20.0 mm
OPTICAL POWER
50.0 D
LENS TYPE
Biconvex
FIRGELLI Automations — Interactive Engineering Calculators
Governing Equations
This is the formula to link focal length with your lens curves and chosen material.
Lensmaker's Equation (Thin Lens Approximation)
1/f = (n2/n1 - 1)(1/R1 - 1/R2)
f = focal length (mm)
n2 = refractive index of lens material (dimensionless)
n1 = refractive index of surrounding medium (dimensionless)
R1 = radius of curvature of first surface (mm, positive if convex toward object)
R2 = radius of curvature of second surface (mm, positive if convex toward object)
Optical Power
P = 1/f = (n2/n1 - 1)(1/R1 - 1/R2)
P = optical power in diopters (D = m-1)
f = focal length in meters (for diopters calculation)
Thin Lens Combination (In Contact)
1/ftotal = 1/f1 + 1/f2
Ptotal = P1 + P2
ftotal = combined focal length
Ptotal = combined optical power (diopters are additive)
Simple Example
If you have a symmetric biconvex lens in air (n₁ = 1.0) made of crown glass (n₂ = 1.5) where R₁ = +20 mm and R₂ = −20 mm:
1/f = (1.5/1.0 − 1) × (1/20 − 1/−20) = 0.5 × (0.05 + 0.05) = 0.5 × 0.1 = 0.05
So f = 1/0.05 = 20 mm—that means it's a converging lens with +50 D optical power.
Theory & Practical Applications
Fundamental Principles of Lens Refraction
The Lensmaker’s Equation comes from applying Snell’s law at both surfaces—one after the other—as light passes through a lens. If the lens is thin (compared to the radii of curvature) and you stick to rays close to the axis (paraxial rays), the equation works fine. If your lens is thick or collecting light at wide angles, the approximation breaks. For anything above about a 10° cone angle, you’ll see spherical aberration and the equation no longer matches reality; at that point, proper ray-tracing with software is needed.
A lot of mistakes come from misreading sign conventions. By default, R₁ is positive if the first lens surface is convex toward the incoming light; negative if concave. For R₂ (the second surface), positive means the center of curvature is to the left of the surface (think from the exit side); negative otherwise. This sign flip often causes confusion. For a biconvex lens, you end up with R₁ positive, R₂ negative, and both equal in size if symmetric.
Material Selection and Refractive Index Engineering
The term (n₂/n₁ - 1) sets how much bending you get for a given shape. With crown glass (n = 1.52) in air, that's moderate. If you use higher-index glass—like dense flint (n = 1.72) or select polymers—you can achieve the same focus with less curvature, which often makes manufacture easier and reduces some forms of aberration. But, the catch: high-index glasses spread different colors more (higher dispersion), so you get more chromatic aberration. Typical doublets (combining crown and flint) can balance those properties by matching focal power but cancelling color shift at key wavelengths.
If you use immersion media (like oil) and n₁ goes above 1, e.g., in microscopy, then you lose refractive contrast—now it takes much stronger curvature (sharper lens surfaces) to hit the same focal length. For a fixed focal length, halving the index difference means you need twice the curvature sum (1/R₁ - 1/R₂). This is a basic trade-off if you’re pushing for high-NA designs in microscopy or lithography.
Multi-Element System Design
Very few real systems use only one lens. Most machine vision, imaging, and camera designs end up with stacks of lenses—sometimes a dozen or more. Each starts right here, with the Lensmaker’s Equation, then gets refined further with software. For two thin lenses separated by a distance d, the total focal length is ftotal = (f₁f₂)/(f₁ + f₂ - d). If the lenses are touching (d = 0), add up the powers directly. This is why diopters are used in eyeglass prescriptions: you just sum the values if stacking.
Telephoto lenses get long focal lengths in a shorter body by combining positive and negative lenses. If you use a +200 mm lens up front and a −100 mm lens at the back, you’ll get an effective system focal length of +200 mm, but the actual physical length, from image plane to rear lens, might only be 50 mm. That’s how you squeeze 300 mm focal lengths into a 150 mm camera barrel.
Worked Engineering Example: Laser Beam Expander Design
If you're building a beam expander for a laser, say to expand from 2 mm to 10 mm diameter (to reduce the intensity at the target), a classic solution is the Galilean beam expander. Using BK7 glass (n = 1.5168 at 632.8 nm) with a 5× magnification:
Step 1: Focal length relationship. For a Galilean telescope, magnification M = -f₂/f₁ (f₁ negative, f₂ positive). For M = 5, use f₁ = -40 mm, f₂ = +200 mm. Input lens diverges; output lens collimates.
Step 2: Design the input negative lens. Go with a plano-concave (flat side toward laser, one curved side). Flat means R₁ = ∞, only R₂ matters:
1/(-40) = (1.5168/1.00 - 1)(1/∞ - 1/R₂)
-0.025 = 0.5168(-1/R₂)
R₂ = 0.5168/0.025 = 20.672 mm
So the required R₂ is +20.67 mm (positive by right-hand convention at exit side). If you think from the laser side, it’s a −20.67 mm concave surface.
Step 3: Output (positive) lens design. For f₂ = 200 mm, symmetric biconvex shape (R₁ = −R₂) minimizes aberration:
1/200 = (1.5168/1.00 - 1)(1/R₁ - 1/R₂)
0.005 = 0.5168(2/R₁) for symmetric lens
R₁ = 2(0.5168)/0.005 = 206.72 mm
So R₁ = +206.72 mm, R₂ = -206.72 mm. These are both long, gentle radii—easy to manufacture but you need space.
Step 4: System check. Lens separation should be d = f₁ + f₂ = -40 + 200 = 160 mm to remain afocal. Quick check with beam divergence: after first lens, θ₁ = beam_diameter/(2f₁) = 2/(2×40) = 0.025 rad; after second, θ₂ = 10/(2×200) = 0.025 rad. So the expansion is correct.
Step 5: Realistic tolerances. To hold λ/10 wavefront error at 633 nm, you’re looking at ±1 mm on R₁ for the big lens, ±0.1 mm for the small-radius negative. Alignment between lenses needs to be held within 50 μm to keep beam steering errors very low. Tolerances like these often drive your lens cost more than the raw material choices. The plano-concave element will usually be the cheaper part; getting those big, gentle curves ground well is pricier.
Industrial Applications Across Sectors
Quality control cameras, for example, use lenses designed with this exact equation to get spot sizes and resolution right at 100–500 mm working distances. A standard 25 mm focal length lens for a 2/3" sensor often has several elements (sometimes 12 surfaces), and each starts the design with these calculations. Telecentric designs (where main rays stay parallel) often require symmetric doublets—curvatures must be chosen precisely to meet those requirements.
In fiber-optics work, you see GRIN lenses or aspheric elements to put light from a diode into a fiber. For 9 μm core fibers, the typical NAs mean focal lengths of 2–4 mm. At these sizes, the thin lens equation is only an estimate—full ray-tracing is needed, but the Lensmaker’s Equation is still the first step to guess starting radii. Aspheres (non-spherical curves) can shrink spot size compared to simple spheres by a noticeable amount.
For corrective eyeglass lenses, a −3.00 D prescription in CR-39 plastic (n = 1.498) with base curve R₁ = -200 mm leads to R₂ being calculated from the equation to give R₂ = -118 mm. Meniscus geometries (both sides slightly concave) help with off-axis image quality versus flat-concave designs and are standard in finished eyewear.
Thermal and Environmental Considerations
Nearly every lens will shift focal length as the glass warms up: the refractive index of most glasses changes by about +1 to +10 × 10⁻⁶ per K. A BK7 lens, for example, gains about 0.2% focal length over an 80°C swing—which can mean a 1 mm shift for a 500 mm telescope. If you don’t want to refocus as your setup goes from cold to hot, you can design with matched positive and negative elements with opposite dn/dT, so the changes cancel. This is routine in optics for aerospace and field equipment.
Frequently Asked Questions
Free Engineering Calculators
Explore our complete library of free engineering and physics calculators.
Browse All Calculators →— - Explore More Free Engineering Calculators
About the Author
Robbie Dickson — Chief Engineer & Founder, FIRGELLI Automations
Robbie Dickson brings over two decades of engineering expertise to FIRGELLI Automations. With a distinguished career at Rolls-Royce, BMW, and Ford, he has deep expertise in mechanical systems, actuator technology, and precision engineering.
Need to implement these calculations?
Explore the precision-engineered motion control solutions used by top engineers.
