MODEL NOTES
Know what is in the frame.
A practical guide to entered geometry, defined distance and the limits of an ideal camera model.
Start with the active physical area
Enter the width and height of the sensor rectangle that actually records the image. A pixel count such as 6000 × 4000 describes samples, not millimetres. A sensor-format label may also describe a family rather than an exact active rectangle. Use the physical dimensions for the selected recording mode if you know them.
The focal-length field accepts the nominal focal length in the same displayed unit as the sensor dimensions. Enter 50 mm as 50, not an equivalent focal length quoted for a different format. If a camera records a crop, enter the cropped physical width and height rather than multiplying the entered focal length by an assumed crop factor.
All three required lengths must be positive. The input bounds are software bounds, not a list of sensible camera combinations or an assurance that an entered lens exists. This tool has no camera database, reads no EXIF and cannot establish lens coverage.
Z starts at the model projection centre
The optional distance is axial Z: the separation along the optical axis between the ideal projection centre and a subject plane perpendicular to that axis. It is not the slanted range to an off-axis corner. It is not automatically the distance from the physical lens front, nor the distance from an assumed sensor mark on the camera body.
In the mathematical model, all rays pass through one projection centre. Real lens assemblies have principal planes, entrance-pupil locations, distortion and focus-dependent properties. Mechanical working distance from a lens front need not equal this Z. At short range those distinctions can materially affect the result. Entering a tape-measured working distance here does not calibrate the model.
If you cannot define Z for your use, clear the distance input. The angle results still calculate. Width, height and diagonal then say unavailable, rather than showing a misleading zero-sized frame.
One centred rectilinear projection
Let S be an active sensor dimension and f be the positive focal length, both in the same physical unit. The half-angle triangle gives tan(θ/2) = S/(2f), so the full angle is θ = 2 atan(S/(2f)). Radians are converted to degrees. The horizontal calculation uses sensor width; the vertical calculation uses height. The diagonal calculation uses hypot(width, height).
For a perpendicular plane at axial distance Z, similar triangles give frame width = Z × sensor width / f and frame height = Z × sensor height / f. The projected diagonal is the hypotenuse of that rectangle. This is the same ideal model as the angles, not a second calculator or an independent physical lens test.
These equations have useful consistency checks. Swapping sensor width and height swaps the horizontal and vertical outputs without changing the diagonal. Multiplying sensor width, height and focal length by the same scale leaves all angles and projected dimensions unchanged. Doubling only Z doubles the projected lengths and leaves every angle unchanged.
Work through two entered rectangles
36 × 24 mm, 50 mm, Z = 3 m
The sensor aspect ratio reduces to 3:2. The horizontal full angle is 2 atan(36/(2 × 50)), approximately 39.597752709°. The vertical angle is approximately 26.991466562°. Using the sensor diagonal of approximately 43.266615306 mm gives a diagonal angle of approximately 46.793003344°.
The projected width is 3 × 36 / 50 = 2.16 m; the height is 3 × 24 / 50 = 1.44 m. Their diagonal is approximately 2.595996918 m. Change only Z to 6 m and the frame becomes 4.32 × 2.88 m. The three angles remain exactly the same model results.
20 × 20 mm, 10 mm, Z = 2 m
For either sensor axis, S/(2f) = 1. The half-angle is therefore 45° and the full horizontal and vertical angles are 90°. The diagonal full angle is approximately 109.471220634°. Similar triangles give a 4 × 4 m projected rectangle with diagonal approximately 5.656854249 m.
A wide angle does not mean a real lens with these entered dimensions has been identified. The input may exceed actual coverage, include severe real distortion or require a different model. The tool only evaluates the entered ideal geometry.
Changing units preserves the entered model
The sensor and focal fields use millimetres or inches; distance and projected frame dimensions use metres or feet. One inch is exactly 25.4 mm, and one foot is exactly 0.3048 m. A unit change converts the displayed fields rather than reinterpreting their existing numbers.
The calculator stores entered decimals as reduced rational canonical lengths: millimetres for sensor and focal length, metres for Z. Repeated unit switching retains the same canonical values until you edit a field. Converted field text is rounded to at most 12 decimal places; a later direct edit uses the edited displayed decimal as a new entered value.
Angles, sensor diagonal and projected diagonal use finite numerical approximations. Display values are rounded to six decimal places; very small positive values use scientific notation instead of appearing to be zero. An angle very close to 180° is explicitly labelled less than 180°, so display rounding does not claim a rectilinear full angle equals 180°.
Reports include the exact canonical fractions for the entered model and projected width and height, plus approximate angles with extra numerical precision. A report contains assumptions and is not a calibration certificate. The supported software ranges are 0.000001–1,000,000 mm for each required physical field and 0.000001–1,000,000,000 m for optional Z. Exponents, infinities, commas, signs, more than 12 decimal places and non-decimal notation are rejected.
What the rectangle does not tell you
The nominal entered focal length acts as the projection scale. The model does not adjust focal length for finite focus, focus breathing, close-up magnification or the internal motion of a real lens. Macro, telecentric and fisheye imaging need different treatment. Distortion can change where real scene edges land. Stabilization, aspect-ratio modes and video crops can also change the active recorded area.
The subject plane is perpendicular to the optical axis. A tilted wall or a three-dimensional scene will not share a single rectangle at one Z. This tool does not find focus, depth of field, exposure, resolution, sharpness, minimum focus distance, lens compatibility or a recommended purchase. Measure or calibrate an actual setup when its physical framing matters.
The schematic on the calculator is a labelled side view, not to scale. Its projection centre is part of the model; the drawing does not locate a real entrance pupil or principal plane. The reports make the same ideal assumptions as the screen.
Model sources
The Edmund Optics guide to focal length and field of view explains the angular relationship and the practical distinction between lens geometry and working distance. The official OpenCV camera calibration documentation describes pinhole projection using axial Z and distinguishes real distortion. Viewframer uses an independent small implementation; it does not import OpenCV or copy a manufacturer calculator.
Our examples, interface and guide are original. Calculation sources support the mathematical model, not a promise of accuracy for a particular camera or physical lens. Source access was recorded on 18 October 2026 during preparation.