# Focal Length Calculator (from Subject Size and Distance)

URL: https://speedycalculator.com/calculators/other/focal-length/
Last updated: 2026-10-30

> The focal length calculator finds the lens focal length you need to fill the frame with a subject of known size at a known distance, or from the magnification or the angle of view you want, and gives the magnification, angle of view and full-frame equivalent.

## Inputs

- I know
- Sensor size — Choose your camera's sensor format – crop factors are relative to full frame.
- Sensor width (mm, in, cm)
- Sensor height (mm, in, cm)
- Fill which sensor dimension?
- Subject size (along that dimension) (m, cm, mm, ft, in, km, yd, mi)
- Magnification (image ÷ subject)
- Angle of view wanted (°)
- Distance from the lens to the subject (m, cm, mm, ft, in, km, yd, mi) — Optional when you enter an angle.

## Results

- Focal length needed
- Magnification
- Reproduction ratio
- Angle of view along that dimension
- Full-frame equivalent focal length
- Lens-to-sensor distance when focused
- Subject area covered along that dimension
- Sensor dimension used

## Formula

```
m = image size ÷ object size · f = d · m ÷ (1 + m) (thin-lens equation with d = object distance) · Angle of view = 2 · arctan(image size ÷ (2f)) · from an angle: f = image size ÷ (2 · tan(angle ÷ 2))
```

## Explanation

Focal length is the distance from a lens's rear principal point to the sensor when the lens is focused at infinity. It sets the magnification: the longer the focal length, the larger a subject appears on the sensor from the same spot. If you know how big your subject is, how far away you can stand and how much of the frame it should fill, you can work out the focal length you need before buying or renting a lens.

The link is the thin-lens equation. The magnification m is the size of the image on the sensor divided by the size of the subject; combined with the object distance it gives f = d·m/(1 + m). For distant subjects m is tiny and the result is almost exactly f = d × image size ÷ object size. Close up, as in macro work, the full formula matters.

The calculator also accepts the angle of view you want – handy for security cameras, machine vision and planning a wide room shot – and works with any sensor size, including phone and 1/3-inch sensors.

### How to use the Focal Length Calculator

- **I know**
- **Sensor size** — Choose your camera's sensor format – crop factors are relative to full frame.
- **Sensor width**
- **Sensor height**
- **Fill which sensor dimension?**
- **Subject size (along that dimension)**
- **Magnification (image ÷ subject)**
- **Angle of view wanted**
- **Distance from the lens to the subject** — Optional when you enter an angle.

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Choose what you know. With subject size and distance, the magnification is the chosen sensor dimension divided by the subject size; the thin-lens equation then gives the focal length. With an angle, the focal length is half the sensor dimension divided by the tangent of half the angle.

### Worked example

You want a 1.8 m tall person to fill the 24 mm short side of a full-frame sensor from 5 m away.

Magnification m = 24 ÷ 1800 = 0.01333. Focal length f = 5000 × 0.01333 ÷ 1.01333 ≈ 65.8 mm, so a 65–70 mm setting on a 24–70 mm zoom does the job. The vertical angle of view is 2 × arctan(24 ÷ 131.6) = 20.7°.

### Rule of thumb for distant subjects

When the subject is much farther away than the focal length, f ≈ distance × sensor size ÷ subject size. A 2 m deer at 50 m on an APS-C sensor (15.6 mm tall) needs about 50,000 × 15.6 ÷ 2000 = 390 mm.

## Worked example

Inputs — I know: Subject size and distance; Sensor size: Full frame (35 mm) – 36 × 24 mm (crop 1.00×); Fill which sensor dimension?: Height (short side); Subject size (along that dimension): 1.8 m; Distance from the lens to the subject: 5 m.

Results — **Focal length needed = 65.79**; Magnification = 0.01333 ×; Reproduction ratio = 1 : 75; Angle of view along that dimension = 20.67 °; Full-frame equivalent focal length = 65.8; Lens-to-sensor distance when focused = 66.67.

## Key terms

- **Focal length**: Distance from the lens's rear principal point to the sensor when focused at infinity.
- **Magnification**: Size of the image on the sensor divided by the size of the subject.
- **Reproduction ratio**: Magnification written as 1 : x (1:1 is life size).
- **Thin-lens equation**: 1/f = 1/d_o + 1/d_i, linking focal length with object and image distances.

## FAQ

**What focal length do I need to fill the frame with a person?**
For a 1.8 m standing person filling the short side of a full-frame sensor (24 mm) from 5 m, about 66 mm. From 10 m you would need about 132 mm.

**What does magnification 1:1 mean?**
The subject is projected at life size on the sensor – the definition of a true macro lens.

**Why is the magnification so small for distant subjects?**
Through a 500 mm lens, a 2 m animal 150 m away is projected at under 7 mm on a 24 mm-tall sensor, so m is around 0.003. Magnification is not the same as zoom.

**Is the focal length marked on the lens the real one?**
Yes. Phone makers usually quote 35 mm equivalents instead; this calculator gives both.

**Why does my lens frame less than predicted when focused close?**
Many lenses "breathe": their effective focal length shrinks at close focus, so they show more than the nominal value suggests.

**How do I find the focal length for a security camera?**
Choose "Angle of view I want", select the camera's sensor (often 1/3 or 1/2.8 inch) and enter the horizontal angle you need.


## Sources

- [Wikipedia – Focal length](https://en.wikipedia.org/wiki/Focal_length)
- [Wikipedia – Magnification](https://en.wikipedia.org/wiki/Magnification)
- [OpenStax University Physics Vol. 3 – Thin lenses](https://openstax.org/books/university-physics-volume-3/pages/2-4-thin-lenses)
