Cameras, Racks and Power · #78
Online Lens Focal Length Calculator
Calculates which mm lens shows a given width at a distance, or how much a lens sees.
- Data is processed in your browser and not sent to a server
Tool
What does this tool do?
A 2.8 mm lens shows a wide area but makes distant people small; a 12 mm lens is narrow but detailed. The right lens follows from sensor width, target distance and required scene width. Use the result together with the pixel density tool.
How to use it
- Choose the sensor size; if the datasheet gives the active width, choose 'custom' and enter it in mm.
- Enter the target distance and either the required scene width or the focal length of an existing lens.
- Press Run.
Fields
- Sensor size
- Nominal; enter the active width for precision.
- Sensor width
- Only for 'custom'.
- Distance
- From camera to target.
- Required scene width
- To find the focal length.
- Lens focal length
- To find the scene width.
Worked example
| Input | Value |
|---|---|
| Sensor size | 1/3" (4.8 mm) |
| Distance | 20 |
| Required scene width | 8 |
Expected result: 1/3" sensor, 8 m width at 20 m needs a 12 mm lens; horizontal field of view 22.6°.
A 12 mm fixed lens or a varifocal such as 5–50 mm fits. At this width a 1920 px camera gives 240 px/m: enough to recognise, just below identify.
Second scenario
| Input | Value |
|---|---|
| Sensor size | 1/2.8" (5.12 mm) |
| Distance | 15 |
| Lens focal length | 4 |
Expected result: A 1/2.8" sensor with a 4 mm lens sees about 19.2 m width at 15 m and 65.2° horizontally.
Method and assumptions
Thin lens approximation: focal = sensor width × distance / scene width; scene width = sensor width × distance / focal; horizontal angle = 2 × atan(sensor width / (2 × focal)).
Using the result and troubleshooting
Choose the nearest standard lens or a varifocal range; then check the DORI level with the Pixel Density tool.
Limits and common mistakes
- Nominal sensor sizes vary by vendor; distortion of wide lenses (fisheye effect) and image cropping by the camera change the result.
Frequently asked questions
Why does the datasheet field of view differ?
Vendors use the active pixel area and lens distortion; the nominal sensor size is approximate. If the datasheet gives HFOV, use it directly.
Related tools and service
- Camera Pixel Density CalculatorShows with pixel density whether a camera will detect or recognise a person at a given distance.
Related service: IP Camera System Project Planning