Thin Lens Focal Length Calculator
Compute the focal length of a thin lens from object and image distances, or find where an image forms for a known lens. Essential for optics lab work, camera design, and eyeglass prescription analysis.
About this calculator
The thin lens equation relates three quantities: 1/f = 1/d_o + 1/d_i, where f is the focal length, d_o is the object distance from the lens, and d_i is the image distance on the other side. Rearranged to solve for focal length: f = 1 / (1/d_o + 1/d_i). A positive focal length indicates a converging (convex) lens; a negative value indicates a diverging (concave) lens. The equation assumes the lens is thin enough that its thickness can be ignored and that paraxial rays (close to the optical axis) are used. Image distance is positive when the image forms on the opposite side of the lens from the object (real image) and negative for virtual images. Magnification m = −d_i / d_o follows directly once both distances are known.
How to use
Suppose an object is placed 30 cm from a lens and the image forms 60 cm on the other side. Step 1 — compute 1/d_o = 1/30 ≈ 0.03333 cm⁻¹. Step 2 — compute 1/d_i = 1/60 ≈ 0.01667 cm⁻¹. Step 3 — sum: 0.03333 + 0.01667 = 0.05 cm⁻¹. Step 4 — focal length: f = 1 / 0.05 = 20 cm. The lens is converging with a 20 cm focal length. Magnification = −60/30 = −2, meaning the image is twice as large and inverted.
Frequently asked questions
What does a negative focal length mean in the thin lens equation?
A negative focal length indicates a diverging lens — one that causes parallel incoming rays to spread outward rather than converge to a focus. Physically, these are concave lenses, thinner at the center than at the edges. The virtual focus is located on the same side as the incoming light. Diverging lenses are used in eyeglasses for myopia (nearsightedness), in beam expanders, and combined with converging lenses to correct aberrations in camera and telescope systems.
How accurate is the thin lens equation for real camera lenses?
The thin lens equation is an idealization that assumes negligible lens thickness, perfect paraxial rays, and a single refracting surface. Real camera lenses are thick, multi-element assemblies designed to correct chromatic and spherical aberrations, so the thin lens formula gives only an approximation. For quick estimates of image position and magnification it works well, but precise optical design requires ray-tracing software using the lensmaker's equation applied to each surface. For simple single-element lenses in lab settings, the thin lens formula is accurate to within a few percent when objects are not extremely close to the lens.
When does the thin lens equation predict an image at infinity and what does that mean practically?
When the object is placed exactly at the focal point (d_o = f), the formula gives 1/d_i = 0, meaning d_i = ∞ — the image forms at infinity and the emerging rays are perfectly parallel. This is exploited in collimating optics, where a point light source placed at the focal point of a lens produces a parallel beam. It is also the principle behind a simple magnifying glass used to view distant objects, and it explains why a flashlight reflector places the bulb at the focal point of a parabolic mirror to project a tight beam.