Thick lens focal length calculator
This thick lens focal length calculator applies the lensmaker equation with the center-thickness correction that a thin-lens approximation leaves out.
Run — free
Enter the lens material's refractive index in air, the signed radius of each optical surface, and the center thickness, with every length expressed in meters. The result includes effective focal length, optical power in diopters, and whether the lens is converging or diverging. It is useful when lens thickness is not negligible compared with surface curvature or focal length.
Enter geometry with one consistent sign convention
The calculator assumes light travels from left to right and uses the Cartesian radius convention. A surface radius is positive when that surface's center of curvature lies to its right, and negative when the center lies to its left. A common biconvex lens therefore has a positive first radius and a negative second radius. Enter zero for a plane surface, because a plane has zero curvature. Refractive index is dimensionless, while both radii and center thickness must be entered in meters. Do not mix millimeters and meters: convert a 5 mm center thickness to 0.005 m before calculating. Center thickness cannot be negative. The surrounding medium is assumed to be air, so the refractive index should be the lens material's index relative to air. These conventions make the sign of the result meaningful: positive effective focal length indicates a converging lens, while negative effective focal length indicates a diverging lens. Verify the surface orientation whenever an otherwise ordinary biconvex lens unexpectedly produces negative power.
Understand the thick-lens correction
For a thin lens, the lensmaker equation uses only refractive index and the difference between the two surface curvatures. A real lens separates those refracting surfaces by its center thickness. This calculator adds the corresponding thickness term, which depends on refractive index, thickness, and the product of the two curvatures. It then inverts the resulting optical power to obtain effective focal length. Effective focal length is measured from a principal plane, not directly from either physical vertex of the lens. Consequently, this result should not be mistaken for front focal length or back focal length, which require principal-plane locations or an equivalent ray-transfer calculation. Setting center thickness to zero reduces the computation to the familiar thin-lens lensmaker equation and provides a useful comparison. The thickness correction can be small for a slender weak lens, but it becomes increasingly relevant for strongly curved surfaces, high-index glass, or a center thickness that is appreciable relative to the radii. The returned optical power is the reciprocal of effective focal length in meters and is expressed in diopters.
Interpret and check the computed focal length
Use the effective focal length as a first-order paraxial property of the complete lens. A positive result means parallel paraxial rays converge after passing through the lens; a negative result means they diverge as if they originated from a virtual focus. The calculation assumes spherical surfaces, a homogeneous lens, air on both sides, and rays close enough to the optical axis for paraxial optics to apply. It does not model wavelength-dependent dispersion, aspheric coefficients, gradient-index material, aberrations, coatings, decenter, tilt, or manufacturing tolerances. For design work, compare the result with the zero-thickness case to see whether treating the element as thin is defensible. Also perform a dimensional check: because every entered geometric length is in meters, the focal length is returned in meters and its reciprocal is in inverse meters, or diopters. If the chosen curvatures cancel exactly after the thickness correction, the lens has zero power and no finite effective focal length; the calculator reports that situation as invalid instead of returning an ambiguous infinity. Use optical design software when marginal rays, precise focal-plane location, or aberration performance matters.
What you can do with it
Estimate a singlet during optical design
Calculate the paraxial effective focal length of a spherical singlet before moving to a full ray-tracing model.
Compare thick and thin approximations
Run the physical center thickness and then zero thickness to quantify how much the thin-lens approximation shifts the result.
Check a manufactured lens specification
Use measured radii, glass index, and center thickness to perform an independent first-order check of effective focal length and power.
FAQ
What does the calculation cost?
Each API request costs $0.002; the browser calculator can use the same deterministic calculation locally.
Which units should I use?
Enter radius_1, radius_2, and center_thickness in meters. Effective focal length is returned in meters and optical power in diopters.
What sign should each radius have?
For light traveling left to right, use a positive radius when the center of curvature is to the right of the surface and a negative radius when it is to the left.
Can I represent a plano-convex lens?
Yes. Enter zero for the planar surface radius because its curvature is zero, and enter the signed finite radius for the curved surface.
Is this the back focal length?
No. It is effective focal length measured relative to the lens's principal planes. Back focal length is measured from the rear vertex and generally differs for a thick lens.
Does the formula work when the lens is immersed in liquid?
No. This capability assumes air on both sides. An immersed lens requires the indices of the surrounding media and a more general calculation.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/optics/thick-lens-focal-length \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"refractive_index":1.5,"radius_1":0.1,"radius_2":-0.1,"center_thickness":0.01}'const res = await fetch("https://api.kit.forhosting.com/optics/thick-lens-focal-length", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"refractive_index": 1.5,
"radius_1": 0.1,
"radius_2": -0.1,
"center_thickness": 0.01
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/thick-lens-focal-length",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"refractive_index": 1.5,
"radius_1": 0.1,
"radius_2": -0.1,
"center_thickness": 0.01
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/thick-lens-focal-length", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"refractive_index":1.5,"radius_1":0.1,"radius_2":-0.1,"center_thickness":0.01}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"refractive_index":1.5,"radius_1":0.1,"radius_2":-0.1,"center_thickness":0.01}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/thick-lens-focal-length", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"refractive_index": 1.5,
"radius_1": 0.1,
"radius_2": -0.1,
"center_thickness": 0.01
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.thick_lens_focal_length",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |