Focal Length Calculator
What is the focal length of your lens setup?
Enter your object distance and image distance to calculate the focal length of a lens. Perfect for optics experiments, camera lens analysis, and physics coursework.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
The focal length calculator uses the fundamental thin lens equation from optics: 1/f = 1/d₀ + 1/dᵢ, where f is focal length, d₀ is object distance, and dᵢ is image distance.
When light from an object passes through a converging lens, it bends to form an image at a specific distance. The focal length represents the lens's ability to bend light - shorter focal lengths bend light more sharply, creating wider fields of view, while longer focal lengths provide greater magnification of distant objects.
This relationship holds for all thin lenses, from camera lenses to eyeglasses to telescope objectives. By measuring where an object is placed and where its sharp image forms, you can determine the lens's focal length regardless of its physical markings or specifications.
The calculation assumes a thin lens (thickness negligible compared to focal length) and paraxial rays (light rays close to the optical axis). For thick lenses or wide-angle applications, more complex formulas account for lens geometry and aberrations.
When To Use This
Right tool, right situation
Use this calculator when designing optical systems, testing unknown lenses, or conducting physics experiments. It's essential for determining if a lens meets specifications without relying on manufacturer markings.
Photographers use focal length calculations to understand lens behavior at different focusing distances, especially for macro work where specifications become less reliable. The calculator helps predict image size and working distance for specific magnifications.
In educational settings, measuring focal length demonstrates fundamental optics principles. Students can verify theoretical predictions against experimental results, reinforcing the connection between mathematics and physical phenomena.
Optical technicians use these calculations for quality control, ensuring manufactured lenses meet design specifications. Any deviation between calculated and specified focal length indicates manufacturing defects or measurement errors requiring investigation.
Common Mistakes
Why results sometimes look wrong
The most common error is measuring distances from the wrong reference point. Always measure from the optical center of the lens, not from the lens surface or mount. Many beginners measure from the front or back of the lens assembly, leading to significant errors.
Another frequent mistake is using different units for object and image distances. If you measure object distance in centimeters, image distance must also be in centimeters. Mixed units produce meaningless results.
Failing to achieve sharp focus when measuring image distance leads to inaccurate focal length calculations. The image must be crisp and clear at the measurement point. Blurry images indicate incorrect distance measurement.
Assuming the calculated focal length equals the lens specification is wrong for close-up work. Lens specifications assume infinite object distance, while your measurements use finite distances, creating apparent discrepancies.
The Math
Worked examples and deeper derivation
The thin lens equation 1/f = 1/d₀ + 1/dᵢ derives from Snell's law and geometric optics principles. Each term represents the optical power of different parts of the system.
Rearranging the equation gives f = (d₀ × dᵢ)/(d₀ + dᵢ), which shows that focal length is the harmonic mean of object and image distances. This explains why focal length is always smaller than either distance individually.
When object distance approaches infinity (d₀ → ∞), the equation simplifies to f = dᵢ, meaning the image forms exactly at the focal point. This is how lens manufacturers specify focal length - the distance where parallel light rays converge.
For diverging lenses, image distance becomes negative (virtual image), resulting in negative focal length. The mathematics remain valid, but the physical interpretation changes to describe light divergence rather than convergence.
Expert Unlock
The thing most explanations skip
The thin lens equation assumes the lens thickness is negligible compared to focal length, but real lenses have finite thickness. For thick lenses, principal planes shift from the geometric center, requiring corrections to the basic formula. High-quality camera lenses often specify principal plane locations separately from focal length.
Why do some lenses have multiple focal lengths listed?
Need something this doesn't cover?
Suggest a tool — we'll build it →