Calculate the horizontal and vertical field of view (FOV) for your camera setup.
Understanding the Camera Field of View Calculator
The Field of View (FOV) is a fundamental concept in photography and videography. It refers to the extent of the scene that is captured by the camera's sensor. A wider FOV captures a larger area, making it suitable for landscapes or group shots. A narrower FOV, often achieved with telephoto lenses, focuses on a smaller, more distant subject, ideal for wildlife or sports photography.
The Math Behind FOV Calculation
This calculator uses trigonometry to determine the horizontal and vertical fields of view based on your camera's sensor dimensions, lens focal length, and the distance to your subject.
The core principle relies on similar triangles. Imagine a triangle formed by the lens's optical center and the edges of the sensor. Another, larger triangle is formed by the lens's optical center and the edges of the scene visible at a certain distance. The angle at the lens's optical center in both triangles is the same. We use the tangent function (tan) in trigonometry:
tan(θ/2) = (dimension/2) / focal_length
Where:
θ is the total angle of the field of view (either horizontal or vertical).
dimension is the corresponding sensor dimension (width or height).
focal_length is the focal length of the lens.
Rearranging this formula to solve for the angle:
θ/2 = atan(dimension / (2 * focal_length))
θ = 2 * atan(dimension / (2 * focal_length))
This gives us the angle in radians. We convert this angle to degrees for easier understanding.
To calculate the actual width or height of the scene visible at a specific distance, we again use trigonometry:
scene_dimension = 2 * distance * tan(θ/2)
Where:
scene_dimension is the width or height of the visible scene at the given distance.
distance is the distance from the lens to the subject plane.
θ/2 is half of the calculated angle (in radians).
Therefore, the calculator computes:
Horizontal FOV (Degrees): Calculated using the sensor width.
Vertical FOV (Degrees): Calculated using the sensor height.
Horizontal Scene Width (m): Calculated using the horizontal FOV angle and subject distance.
Vertical Scene Height (m): Calculated using the vertical FOV angle and subject distance.
When to Use This Calculator
Photography Planning: Determine how much of a scene a specific lens will capture at a certain distance. Essential for landscape, architectural, and event photography.
Videography & Filmmaking: Plan shots and ensure subjects or environments fit within the frame.
Surveillance System Design: Calculate the coverage area of security cameras.
Virtual Reality (VR) & Augmented Reality (AR): Understand the visual field simulated by cameras or displays.
Astronomy: Estimate the portion of the sky a telescope or camera will view.
Input your camera's sensor dimensions (often found in the camera's specifications), the focal length of the lens you are using, and the distance to your subject to get precise FOV information.
function calculateFOV() {
var sensorWidth = parseFloat(document.getElementById("sensorWidth").value);
var sensorHeight = parseFloat(document.getElementById("sensorHeight").value);
var focalLength = parseFloat(document.getElementById("focalLength").value);
var distance = parseFloat(document.getElementById("distance").value);
var resultDiv = document.getElementById("result");
resultDiv.innerHTML = ""; // Clear previous results
// Input validation
if (isNaN(sensorWidth) || sensorWidth <= 0 ||
isNaN(sensorHeight) || sensorHeight <= 0 ||
isNaN(focalLength) || focalLength <= 0 ||
isNaN(distance) || distance <= 0) {
resultDiv.innerHTML = "Please enter valid positive numbers for all fields.";
return;
}
// Calculations
// Calculate half angles in radians
var halfHorizontalAngleRad = Math.atan(sensorWidth / (2 * focalLength));
var halfVerticalAngleRad = Math.atan(sensorHeight / (2 * focalLength));
// Convert angles to degrees
var horizontalFOVDeg = 2 * halfHorizontalAngleRad * (180 / Math.PI);
var verticalFOVDeg = 2 * halfVerticalAngleRad * (180 / Math.PI);
// Calculate scene dimensions at the given distance
var horizontalSceneWidth = 2 * distance * Math.tan(halfHorizontalAngleRad);
var verticalSceneHeight = 2 * distance * Math.tan(halfVerticalAngleRad);
// Display results
resultDiv.innerHTML = `
Field of View Results:
Horizontal FOV: ${horizontalFOVDeg.toFixed(2)}°Vertical FOV: ${verticalFOVDeg.toFixed(2)}°Scene Width at ${distance}m: ${horizontalSceneWidth.toFixed(2)} mScene Height at ${distance}m: ${verticalSceneHeight.toFixed(2)} m
`;
}