Example 1
x = 0.5 m, y = 0.5 m -> f = 0.25 m.
Enter the object and image distances. The calculator folds them into the thin-lens equation: 1/f = 1/x + 1/y. When both distances are 0.5 m, the focal length is 0.25 m, or 4 diopters. The same x and y on the magnification page give p = 1.
Magnification from the same x and y: p = y/x. A different f, waves: λ = v/f. Photon: E = h·f.
Object distance x (m) and Image distance y (m). The result shows up here.
A thin lens bends rays as if all the work happened in one plane. In the school “real is positive” convention, object distance x and image distance y go into one equation: 1/f = 1/x + 1/y, so f = xy/(x+y). f is the harmonic mean of x and y, not the arithmetic mean. Two 0.5 m stretches give 1/f = 4 m⁻¹, so f = 0.25 m, not 0.5 m.
Worth doing on paper before you click. x = 0.5 m, y = 0.5 m: 1/0.5 + 1/0.5 = 4, f = 0.25 m. A diopter is 1/f with f in meters, so 4 D. That glass is a strong magnifier or a short camera lens. Second frame: subject two meters out, image 52 mm behind the lens. 1/2 + 1/0.052 ≈ 19.73 m⁻¹, f ≈ 0.0507 m. The 50 mm mark on a lens barrel lives in that same range.
Type both distances in meters (or feet if the header is on US). f comes back in the same unit. Beside it sits 1/f in diopters: opticians write lens strength that way; school work often stays in centimeters. A comma and a period are the same, so 0.5 can be 0,5.
x and y have to be positive. Zero means the object or the image sits in the lens plane, and the formula has no finite f. A negative y (virtual image, same side as the object) belongs on paper in another sign convention; this field wants a real image. A diverging lens would have negative f. Here positive x and y give positive f: converging, image on the far side.
The form needs two fields. The calculator example 0.5 and 0.5 gives 0.25 m. The pair 0.3 m and 0.6 m gives f = 0.2 m, because 1/0.3 + 1/0.6 = 5. The chart of f versus y at fixed x is a hyperbola: the farther the image, the closer f sits to x.
Feed the same x and y into the magnification page to get p = y/x. Here you want focal length, there image scale. A telescope or microscope stacks two lenses and uses other formulas. A thick lens measures distances from principal planes, not from the middle of the glass.
1/f = 1/x + 1/y
f = xy / (x + y). x > 0, y > 0. Unit of f: meter (or ft in US).
A thin lens adds reciprocals: 1/f = 1/x + 1/y. Two 0.5 m distances give f = 0.25 m, or 4 diopters, not the 0.5 m average.
x = 0.5 m, y = 0.5 m -> f = 0.25 m.
x = 0.3 m, y = 0.6 m -> f = 0.2 m.
x = 2 m, y = 0.052 m -> f ≈ 0.0507 m.
x = 0.25 m, y = 0.25 m -> f = 0.125 m.
x = 1 m, y = 0.25 m -> f = 0.2 m.
x = 0.1 m, y = 2 m -> f ≈ 0.0952 m.
x = 0.2 m, y = 0.3 m -> f = 0.12 m.
x = 2 m, y = 0.1 m -> f ≈ 0.0952 m.
1/f = 2 + 2 = 4, so f = 0.25 m and 4 diopters. The pair 1 m and 1 m gives f = 0.5 m, or +2 D like reading glasses.
Because 1/f is a sum of reciprocals. Two 0.5 m distances make 4 m⁻¹. f is not the arithmetic midpoint of x and y.
D = 1/f with f in meters. 0.25 m is 4 D. +2 D glasses are f = 0.5 m. The field solves f; diopters sit beside it.
x and y in meters, or feet if the header is on US. Both fields on the same scale. Result f in those same units.
The formula has no finite f: you would divide by zero. An object or image in the lens plane does not give a focal length in this model.
Here y is positive: a real image. Negative y belongs on paper in the sign convention from the problem, not in this field.
Same x and y. Here you want f. There the ratio y/x. At 0.3 m and 0.6 m you have f = 0.2 m and p = 2.
One thin lens. A telescope or microscope stacks an objective with an eyepiece and uses other formulas.
y = 0.052 m. 1/f = 0.5 + 19.23 ≈ 19.73, f ≈ 0.0507 m, about 50.7 mm.
The formula does not know color. In glass, f shifts a little with λ (dispersion). Here one f, as in a problem without a prism.
The formula is the school one. Units follow SI; NIST SP 330 and BIPM define the measures, not your result.
Page updated in 2026.