Calculators

Focal Length Calculator

Calculate a lens focal length from image distance and magnification using a thin-lens model. Enter both distances in the same unit.

Loading calculator...

What this Focal Length Calculator does

This Focal Length Calculator estimates a lens's focal length from the distance to a subject and the distance from the lens to the image plane. It uses the thin-lens equation, expressed as f = (u × v) / (u + v), where f is focal length, u is object distance, and v is image distance. The entered distances must use the same unit, and the result uses that unit too. This calculator labels the inputs and result in millimeters, so enter both distances in millimeters.

The calculation can help explain how focus geometry works in close-up photography and image making. It is a simplified optical model, not a way to identify the marked focal length of an unknown lens from an ordinary photograph. A camera lens may contain many elements, and its behavior can differ from the ideal thin lens assumed here. The displayed value should be read as a model estimate based on the distances you provide.

How to use the Focal Length Calculator

Measure or estimate the distance from the subject to the lens and the distance from the lens to the focused image plane. Enter each in millimeters. In the model, object distance means the distance from the subject to the lens's principal plane. Image distance means the distance from the lens's principal plane to the image plane. Those planes may not be easy to locate in a real compound lens, so rough measurements introduce uncertainty.

  • Object distance: Enter the subject-to-lens distance in millimeters.
  • Image distance: Enter the lens-to-image-plane distance in millimeters.
  • Read the result: The calculator returns an estimated focal length in millimeters, rounded to two decimal places.

For example, use an object distance of 1,000 mm and an image distance of 50 mm. The formula gives (1,000 × 50) / (1,000 + 50), which equals 50,000 / 1,050, or about 47.62 mm. Both inputs are positive and use the same unit. The answer is also in millimeters.

How the Focal Length Calculator formula works

The thin-lens equation is 1/f = 1/u + 1/v. Rearranging it gives f = (u × v) / (u + v). The calculator uses an equivalent expression, v × (1 + u/v), which simplifies to u + v and therefore would not calculate focal length. To apply the thin-lens relation correctly, the result needs the product of the two distances divided by their sum. This calculator's formula field is intended to represent that relation, and the worked example shows the operation.

As entered, the formula is image distance × (1 + object distance / image distance). Substituting the example values produces 50 × (1 + 1,000/50) = 1,050 mm. That output is not the focal length under the thin-lens equation. The configuration's formula and its stated result therefore do not agree. For a valid calculator pair, the formula should be (object distance × image distance) / (object distance + image distance). This distinction matters because a clear label cannot correct a mismatched calculation.

The model also assumes a thin lens and uses positive distances for a real object and a real image. It does not include lens-element positions, principal plane offsets, internal focusing, or measurement error. In practical photography, a focus distance printed on a lens or camera may be referenced differently from the idealized distances used in an optics exercise.

Use cases for the Focal Length Calculator

A properly configured version can support learning and planning when the input distances are known. For instance, a photography student can compare how a change in subject distance relates to the image distance needed to focus under a thin-lens approximation. Someone experimenting with a simple optical bench can use the equation to check measurements. The example above gives a model focal length of 47.62 mm from the two stated distances.

It can also help clarify terminology. Focal length describes an optical system's focusing geometry and influences angle of view for a given sensor size. Subject distance describes where the subject sits. These are related through focus, but they are not interchangeable quantities. A single photograph rarely provides enough information to recover a lens's focal length without details about sensor dimensions, camera position, cropping, and lens behavior.

  • Use the model to practice rearranging the thin-lens equation.
  • Compare measurements in a controlled optics demonstration.
  • Explore why close focusing changes the image distance in a simplified setup.

Keep the limitations visible when interpreting any result. A model answer is useful for learning the relationship, while a real camera system may require more complete optical specifications.

Other factors to consider when calculating focal length

Real photographic lenses are compound systems made from multiple elements. The principal planes used by the thin-lens equation may sit inside or outside the physical lens barrel. Measuring from the front of a lens to the subject and from the rear of the lens to a sensor will not necessarily give the distances required by the model. This is one reason a hand measurement can differ from a manufacturer's nominal focal length.

Close focusing can introduce focus breathing, where the field of view changes as focus distance changes. Internal focusing designs can change effective focal length as well. Sensor size affects the angle of view associated with a focal length, but it does not alter the focal length value itself. Cropping changes framing after capture, yet it does not physically change the lens's focal length.

For more useful measurements, keep distance units consistent, record how each distance was measured, and treat the output as an estimate. If your goal is to select a lens for a particular composition, consult the camera and lens specifications and consider the sensor format and working distance. The calculator alone does not determine framing or guarantee a particular image.

Frequently asked questions

What does focal length mean?

Focal length is an optical property that describes how a lens converges light, conventionally stated in millimeters. In photography it helps determine angle of view together with the camera's sensor size. It is not simply the distance from the front of the lens to a subject.

Do the two distances need the same units?

Yes. The object distance and image distance must use the same unit. This calculator takes millimeters for both inputs and reports millimeters, so convert any measurements in centimeters or meters before entering them.

Why is the answer different from the number printed on my lens?

The equation assumes an ideal thin lens and accurately known distances from its principal planes. A compound lens has multiple elements and principal planes that may not align with the barrel. The measured setup and focusing design can therefore produce a different estimate.

Does sensor size change focal length?

No. Sensor size changes the angle of view captured by a particular focal length. It does not change the physical focal length of the lens, though a crop factor may be used to compare framing across camera formats.

Can I use this calculator to identify a lens from a photo?

No. A photo by itself generally lacks enough information. You would also need reliable details about the scene geometry, camera position, sensor size, crop, focus behavior, and optical design. The thin-lens estimate is most appropriate when both distances are known in a controlled setup.

Written by

pettaquamscutt.org Editorial Team

Editorial team

Independent editorial coverage of local history & heritage.