# How to calculate the FOV in degrees from focal length or distance?

How does one to calculate the field of view (or angle of view) in degrees from the following details:

1. sensor size (for example, 1")
2. distance to target (for example, 7 feet)
3. focal length (for example, 30mm)

I found calculators for this here and here, but how do these work?

• As David pointed out, (2) is not relevant. – Unapiedra Jul 28 '13 at 10:41
• @Unapiedra But, see the calculators -- many provide input fields and can work back from that. – mattdm Jul 28 '13 at 15:38
• @mattdm, picking the given data and working from them is trivial on paper. If you or OP wants to know how to do that on a web page, StackOverflow would be the place to ask. – Unapiedra Jul 28 '13 at 16:31
• In general, two out of the three details from the question are enough. My answer deals with one case but the other cases can be determined just as easily from the model. – Unapiedra Jul 28 '13 at 16:33
• Your answer is good, and I think covers what Victor is looking for, except I think that rather than declaring part "not relevant" it might be nicer to explain how that fits in. And I don't think this is a web programming question, just one about the calculations. – mattdm Jul 28 '13 at 17:06

The calculators you posted are for fairly standard, rectilinear lenses. This means you can use the Pinhole camera model to calculate the information.

This graphic fairly well shows what is going on: On the horizontal axis you see `f`. This is the focal length of the lens. Then, the arrow labeled Y1 is the image plane (where the sensor sits). If the sensor has the half-size of `y1`, then the angle of the green line with the horizontal is half your field of view.

Basic geometry can give you the FOV: `FOV = 2 * arctan(y1 / f)`

Mind two things:

1. Units.
2. `y1` is the half-size of your sensor. If you have a 1" sensor, the half-size would be 8mm (as mattdm pointed out in the comments), and your calculation would give you the FOV along the diagonal of the sensor. If you want it along the horizontal, then you need to calculate the width of the sensor and use that as the value for `y1`.

#2 should not matter except for possible minor adjustment for FOV changing with focusing but the aspect ratio will have an impact. Also may want to specify if you are looking for horizontal FOV or diagonal

If I had the lens I would just go low tech and take a picture with an object of a known size. This will also take into account any other factors that may be in play. For example a lens like a fisheye lens may have a certain FOV on a full frame sensor, but if you have a smaller sensor you may not be able to easily calculate FOV with some simple formula due to distortion in the lens.

• He wants to know how the calculators work, which is clearly not taking a picture of a known object. – Unapiedra Jul 28 '13 at 10:26