Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Required Focal Length
31.18
millimeters (mm)
Sensor dimension 36 mm
Field of view 60°

What Is the Focal Length Calculator?

This calculator finds the lens focal length (in millimeters) needed to capture a specific field of view (FOV, also called angle of view) on a given camera sensor. It is a pure geometry tool that works for any imaging system — full-frame, APS-C, micro four-thirds, machine-vision, or smartphone sensors — so no jurisdiction or brand assumptions apply.

How to Use It

Enter the relevant sensor dimension in millimeters. Use the sensor width for the horizontal FOV, the height for the vertical FOV, or the diagonal for the diagonal FOV — just be consistent. Then enter the angle of view you want in degrees and read off the focal length.

The Formula Explained

The sensor, lens, and scene form two right triangles meeting at the lens. The half-sensor dimension is the opposite side and the focal length is the adjacent side of the half-FOV angle, giving:

$$f = \frac{\text{Sensor (mm)}}{2 \cdot \tan\left(\dfrac{\text{FOV}}{2} \cdot \dfrac{\pi}{180}\right)}$$

Here d is the sensor dimension and FOV is the angle of view. The angle is halved and converted from degrees to radians before the tangent is taken.

Diagram showing focal length f, sensor dimension d, and field of view angle theta in a lens
The geometry relating focal length, sensor size, and field of view.

Worked Example

For a full-frame sensor 36 mm wide and a desired horizontal field of view of 60°: half the FOV is 30°, and \(\tan(30°) \approx 0.5774\). So $$f = \frac{36}{2 \times 0.5774} \approx 31.18 \text{ mm}$$ — close to a classic "normal" wide lens.

FAQ

Which sensor dimension should I use? Match it to the FOV you care about: width for horizontal, height for vertical, diagonal for diagonal angle of view.

Does this account for lens distortion? No. It uses the ideal rectilinear (pinhole) model, which is accurate for standard lenses but not extreme fisheyes.

Can I go above 180° FOV? No — the tangent function diverges at 180°, so this rectilinear formula only works below it.

Last updated: