Lens / Field of View

Solve for focal length, angle of view, scene width, or distance given the other three. The diagram updates as you type.

Planning estimates only. This calculator is not a substitute for engineered design or manufacturer specifications. Verify the final design against OEM documentation and the codes your authority having jurisdiction enforces.

The formula

Exactly what the calculator computes, in the order it computes it. Highlighted terms are your inputs.

// The two relationships everything else comes from
HFoV  = 2 × arctan( sensorWidth ÷ (2 × focalLength) )
width = distance × sensorWidth ÷ focalLength

// Rearranged for each unknown
focalLength = sensorWidth × distance ÷ width
distance    = focalLength × width ÷ sensorWidth
width       = 2 × distance × tan(HFoV ÷ 2)

// Vertical and diagonal follow from the sensor dimensions
sensorHeight = sensorWidth × aspectRatio
VFoV = 2 × arctan( sensorHeight ÷ (2 × focalLength) )
DFoV = 2 × arctan( √(sensorWidth² + sensorHeight²) ÷ (2 × focalLength) )

What it assumes

Each of these is a way the number can be wrong for your job. Read them before you buy hardware.

  1. Rectilinear lens. The straight-line geometry above assumes a rectilinear projection. Fisheye and panomorph lenses use a different projection entirely and these results do not apply to them.
  2. Thin-lens approximation. Accurate when distance greatly exceeds focal length. Fine for any surveillance geometry.
  3. Distance is measured along the optical axis, not along the ground. On a downward-tilted camera the slant range is longer than the horizontal distance, and the covered area becomes a trapezoid rather than a rectangle.
  4. Sensor aspect ratio is taken from your selection, not from the sensor. If the camera crops the sensor to reach a resolution mode, the real angles differ.
  5. Nominal focal length. Varifocal lenses vary from their marked range, and a lens marked 2.8–12 mm will not be exactly 12 mm at the stop. Field-verify on commissioning.
  6. The diagram is schematic. The distance and width axes are scaled independently so the wedge always fits the frame. Do not scale measurements off it.

Questions people ask

What focal length do I need to cover a 30-foot wide scene?
It depends on the sensor size and the distance to the scene. Enter both and the calculator solves the focal length; the relationship is focal length = sensor width × distance ÷ scene width.