Free Online Tool

CCTV Lens Calculator: Focal Length from Width, Distance or DORI

Pick a mode, describe the scene by width, detail level or angle, and get the focal length and the standard lens to buy. Results update instantly.

tune

Scene

Describe what the camera must cover

Calculator mode

Cover a width. Know how wide the scene is? Find the lens that covers it.

Sensor & Resolution
m
m

Options

Lens type
Units

Required focal length

15.5 mm

Fixed lens

12 mm

covers full width

Varifocal

5–50 mm

Set to 15.5 mm to cover the width exactly

What the 12 mm lens covers at this distance

H. FOV

24.4°

V. FOV

18.4°

Coverage width

12.9 m

Coverage height

9.7 m

Pixel density

208 px/m

DORI class

Recognise

208 px/m

Top view

Scaled to your scene
12 mm lens, 24.4° wide
10.0 m at 30.0 m

How to use the CCTV lens calculator

Choose what you know about the scene: Cover a width when you know how wide the view must be, Reach a DORI level when faces or plates must be readable, or Angle to focal length when a datasheet or a plan gives you the field-of-view angle. Then pick the camera's sensor format and resolution and describe the scene.

The big number is the focal length the scene needs. Lenses come in standard steps, so the cards below it show the fixed lens and the varifocal range to buy, and the stats show what that real lens covers at your distance: the angles, the width and height, the pixel density and the DORI class. Copy the link to share the exact scene.

Choosing a focal length for a distance

Say a camera must cover a 10 m wide scene at 20 m with a 4MP 1/2.8" sensor. The focal length is the sensor width times the distance, divided by the scene width: f = sensor width × distance ÷ scene width. Here that is 10.4 mm.

No lens is made at exactly 10.4 mm, so the calculator picks the longest standard fixed lens at or below it, which never shows less than you asked for: the 8 mm lens covers 12.9 m at 20 m, at 208 px/m. A 2.8–12 mm varifocal set to 10.4 mm covers the 10 m exactly. These are the numbers the calculator shows when it opens.

Try this scene in the calculator

Fixed or varifocal lens?

Fixed lenses come in standard steps; the calculator uses 2, 2.8, 3.6, 4, 6, 8, 12, 16, 25 mm. To cover a width it picks the longest fixed lens at or below the focal length you need, so the view is never narrower than the scene. To reach a DORI level it picks the shortest fixed lens at or above it, so the pixel density never drops below the level.

A varifocal lens zooms over a range, here 2.8–12, 2.7–13.5, 5–50 mm, and is set on site to the exact focal length. It costs more, but it suits a scene you have not measured yet or a focal length that falls between two fixed lenses. Use the lens type option to show only fixed or only varifocal lenses.

Lenses for face identification and licence plates

DORI levels set how many pixels land on each metre of the scene. To identify a person you need the Identify level, 250 px/m; Recognise needs 125 px/m. At 10 m a 4MP 1/2.8" camera needs 4.8 mm for Identify, so the 6 mm fixed lens, which gives 311 px/m. A sharper 8MP camera reaches the same level with 3.4 mm, so the 3.6 mm lens.

Reading a number plate by eye starts from the same Identify level. Dedicated ANPR and LPR cameras set their own pixel and shutter requirements, so check the camera maker's guidance before you choose a lens for plate recognition.

Try this scene in the calculator

Converting a FOV angle to a focal length

If a datasheet or a design gives you the horizontal field-of-view angle, Angle mode turns it into a focal length: the sensor width divided by twice the tangent of half the angle. On a 1/2.8" sensor, a 60° view needs 4.5 mm.

The calculator then shows the nearest standard lens on each side: the 4 mm lens gives 65.8°, a little wider than asked, and the 6 mm lens gives 46.7°, a little narrower. Above 110° the image bends noticeably, and the calculator warns you.

Try this scene in the calculator

Lens calculator FAQ

What lens do I need to see 30 m?

For a 10 m wide view at 30 m on a 4MP 1/2.8" camera you need about 15.5 mm, so a 12 mm fixed lens (it covers 12.9 m) or a 5–50 mm varifocal. It depends on the width: change the width and the answer changes, so enter your own scene in the calculator.

Try this scene in the calculator

2.8 mm or 4 mm: which lens should I choose?

At 20 m on a 4MP 1/2.8" camera, a 2.8 mm lens sees 37.0 m wide (85.5°) at 73 px/m, and a 4 mm lens sees 25.9 m (65.8°) at 104 px/m. Choose 2.8 mm to cover the most area and 4 mm for more detail on the same spot; which one is right depends on the width you need to cover.

What lens do I need to identify faces at 10 m?

Identifying a face needs the DORI Identify level, 250 px/m. At 10 m a 4MP 1/2.8" camera needs about 4.8 mm, so the 6 mm fixed lens; a sharper 8MP camera needs 3.4 mm, so the 3.6 mm lens. It depends on the resolution and the distance, so check your own scene.

Try this scene in the calculator

Why does the datasheet angle differ from the calculator?

The calculator gives the horizontal angle from the sensor width and the focal length: a 2.8 mm lens on a 1/2.8" sensor gives 85.5°. Datasheets often quote the diagonal angle, measure the real active area of the sensor, round the focal length, or include the barrel distortion of a wide lens, so their figure is often wider. To match a datasheet, enter its horizontal angle in Angle mode.

Ready to build your security plan?

Take these calculations further — design your full camera layout, route cables, and generate a professional PDF proposal.