Lens Calculator
Find the focal length needed to fit your object in frame using sensor size, object dimensions, and working distance.
Machine vision workflowStep 1 of 6
Next workflow step
Continue to Camera FOV Calculator — 25 mm lens · 400 mm WD · 2448x2048 preset
Related tools
Learn about this tool
What it is, when to use it, formulas, and common questions
What is this?
A machine vision lens calculator. It finds the focal length needed to fit a part in frame from sensor size, object size, and working distance — the first step before checking camera FOV and mm/px.
When do engineers use it?
Use early in industrial camera selection when you know the part size and mount height but have not picked a lens yet. It is aimed at inspection cells (C-mount, sensor format, working distance), not photography or CCTV coverage estimates.
Formula
f ≈ (sensor width × WD) ÷ object width
Example
To fit a 200 mm wide conveyor at 500 mm WD on a 2/3" sensor, you typically need ~16–25 mm focal length.
FAQ
- Should I size from width or height?
- Compute both, then use the shorter focal length so neither axis is cropped. A longer lens increases magnification but narrows FOV and will clip the other dimension.
- Does this match the lens datasheet FOV?
- It uses a thin-lens model. Real C-mount lenses have distortion and slightly different effective FOV. Shortlist a focal length here, then confirm against the manufacturer table for your sensor format.
- What working distance should I enter?
- Enter the planned mount-to-object distance, not the catalog minimum WD. If the bracket height is not fixed yet, try a few WD values and see how focal length trades off.
- What should I do after I get a focal length?
- Open Camera FOV Calculator to confirm mm/px, then Depth of Field if part height varies, then Camera Placement Planner for the physical mount.