There is a Field of View Calculator here, but this page is about the math.
There are approximations in calculations. The math is precise, but the data is less so. The required Focal length and Sensor Size are rounded specifications, losing a bit of precision. This little difference at the small sensor gets magnified in the field and scene. However, the results certainly are close enough to be very useful in any practical case. My experience is that the field is fairly accurate (at distances of at least a meter or so), assuming you actually know your parameters. Some problems are:
The Marked focal length of any lens is a rounded nominal number, like 50 or 60 mm. The actual can be a few percent different. Furthermore, the Marked focal length is only applicable to focus at infinity. Focal length normally increases when lens is extended forward to focus closer. Lens specs normally indicate this internal extension at closest focus distance. But internal focusing lenses can do internal tricks with focal length (some zooms and macro lenses can be shorter when up close, instead of longer). But generally speaking, focal length becomes a little longer at very close distances (2x longer at 1:1), so field of view could be a little smaller, but should be insignificant as long as magnification is greater than 0.1x, which in regular lenses is normally near their Minimum focus distance. But this calculation does not include macro distances. We are only seeking a ballpark FOV number anyway, we adjust small differences with our subject framing or cropping, but vague guesses about your distance and sensor size or focal length don't help FOV accuracy.
And a fisheye lens is a different animal, wider view than this formula predicts. A regular lens is rectilinear, meaning it shows straight lines as straight lines, not curved. A fisheye is rather unconcerned about this distortion, and can show a wider view, poorly purists might say, but very wide, and very possibly interesting.
Focal Length varies with zoom, and the Exif data with the image should report focal length (in coarse zoom steps, as best it can). Actual focal length could be determined by the Magnification (Wikipedia) and distance. The distance from the front nodal point to the object in the subject plane (s1), and the distance from the rear nodal point to the image plane (s2) (when focused) are related by this Thin Lens equation (Wikipedia), which the diagram and formulas below simplify. If OK with a little geometry and algebra, you can see the derivation of this classic Thin Lens Equation at the Khan Academy.
In this equation, we can see that if the subject at s1 is at infinity, then 1/s1 is zero, so then s2 = f. This is the marked focal length that applies when focused at infinity. What camera lenses call the focused distance is s = s1 + s2, from subject to the sensor plane.
Also if at 1:1 magnification (equal image size on both sides of lens), then s1 = s2, saying that the working macro distance in front of the lens node (extended at 1:1) is equal to the distance to the sensor image plane (both sides at 2x focal length). This makes f/stop number be 2x, which is 2 EV light loss. Those are basics. Internal focusing macro lenses can slightly reduce this light loss, but it is still near 2 EV.
This diagram is the basis of Field of View and Depth of Field calculations. The half angles form geometry's Similar Triangles from the equal angles on each side of the lens. The /2 cancels out on both sides. This equation simply says that the equal angles have the same trigonometry tangent (opposite / adjacent) on each side of lens (but the /2 must be included then). The lens is simply an enlargement device (actually a size reduction) proportionally to the ratio of focal length / field distance.
But be aware that focal length lengthens with closer focus distance (and is generally unknown then (focal length is 2x at 1:1 magnification, but lens internal focusing can make changes). Focusing and zooms and especially internal focusing change focal length internally. The focal length marked on the lens is at infinity focus. Focal length is generally near close enough at the closest focus of a regular lens, but calculations will be more accurate if focus is out a bit further. But macro work uses Magnification instead of subject distance.
This Thin Lens Model simplifies, as if it were a simple one glass element (like a handheld magnifying lens) with only the one central node point. Multi-element “Thick” camera lenses have two nodes for each side of lens (see the fstop page). But camera lenses normally have several (to many) glass lens elements (a thick lens), designed to correct optical aberrations and distortions, and also to zoom. The Thin Lens Model does still work well for practical computing purposes, at least at distances of at least maybe a meter or two, making a few mm dimension to the node be less important (a bit more description below).
The focal length is measured from the sensor plane to the lens node H' (often inside the lens, but not always). Technically, the focal length Marked on the lens applies when focused at infinity, but it will be a bit longer when focused closer. Lens equations use distance d in front of the field node, however note that specifications of lens focus-distance (like minimum closest focus) specify s to the sensor, the sum of d and f.
The standard camera magnification geometry uses the standard ratios of the similar triangles shown above. The field dimension angle in front of this lens node is the same angle (opposite angles) as the sensor dimension angle behind the lens. The ratio of distances on each side of the lens are the same as the ratio of the size dimensions on each side of the lens. These ratios (as shown first below) are simply the trigonometry tangents of the same angle on each side of the lens (tangent is opposite side over adjacent side). In this equation, rearrangement will compute any one term from the other three. But one mm of error in focal length or sensor size is magnified in the field, so input accuracy is critical. The math is simple, but the difficult part of computing this will be to first accurately determine the correct sensor dimensions, and/or the zoom lens focal length (small errors get magnified at the larger distant field).
Trigonometry does also work for this, but we don't need trig except to compute the actual angles of Field of View. Because Field of View dimensions are just similar triangles (shown gray above). The three field or sensor dimensions are Height, Width, or Diagonal, each are computed individually. Using the (opposite dimension / 2) to create right angles for trig, these ratios are the trig tangent of the half angles, which is the same opposite angle on both sides of lens (the two formula ratios are necessarily equal). The /2 cancels out on both sides, and any unit conversions to feet or meters on the right side cancel out. It becomes a very simple equation. Do be consistent with units, but then there is no conversion of units needed (same ratio on both sides).
* feet or meters (but both same units)
These ratios above are just the trig tangent (opposite over adjacent), necessarily equal for the equal angles, but using the ratios is simpler math for the field dimensions.
But computing the angle of view requires trigonometry, for dimensions of Width, Height, or Diagonal angles of view. The 2's do NOT cancel out for this trig tangent.
Field angle of view = 2 x arctan ((sensor dimension (mm) / 2) / focal length (mm))
Trig functions in software programming languages (including Excel, Javascript, C, Python, etc.) use radians instead of degrees. Calculators normally offer the choice of using degrees. To convert radians to degrees, multiply radians by 180/Pi, which is 57.2958 degrees per radian. Or for degrees to radians, multiply degrees by Pi/180.
Field size and focal length are linear in field of view (half of sensor dimension or twice the focal length both produce half the field dimension). But the angle is a tangent function, which is Not straight-line linear (the angle is approximately linear if angle is not more than about 10 degrees (called the Small-Angle Approximation).
Substituting size of an Object in the field, instead of overall Field size. Using these two steps may be convenient:
Rearrange this ratio to compute desired unknown value. Examples:
* feet or meters (but both same units)
There are Other possible arrangements. But this next one must use Field dimension and Height converted to mm (304.8 mm per foot), because each ratio must be a dimensionless number.
This is magnification on the sensor or film. The image must still be enlarged for viewing.
1:1 macro reproduction at 1× is when these two top and bottom values are equal.
Distant object size is reduced greatly, like perhaps maybe magnification of 0.001x or less.
Back to the general ideas, of all above:
This Distance to Field doesn't necessarily mean to subject or to focus point. Here it means the distance to the point where you want field size calculated (perhaps the background, computing what will show in the picture). As noted, use either meters or feet (the units all cancel out). And/or substitute width for height if appropriate. Just be consistent, and solve for the unknown. FWIW, cameras report focus distance as s, measured to the sensor surface. Lens calculations however compute with distance d, in front of the lens node (which except for telephoto lenses, is normally inside the lens body).
The Thin Lens Equations use the distance d in front of the lens node, but the lens specifications are "focused distance" (marked s in the diagram) which is to the sensor plane.
The Thin Lens Model simplifies, and is practical and adequate for most computing, even if this model has one glass element and one central node point. Camera lenses have multiple glass elements, and are "thick lenses", much more complex, and have two node points, often called H for the field view side node, and H' for the sensor view side node. These two nodes might be designed a few inches apart, but they necessarily still see the same angle. The actual node position normally only matters to us for close macro distances, or perhaps in efforts to correct panoramic parallax.
This front node is often a point inside the lens, perhaps crudely assumed about the middle of the lens (but it does move with zoom), but it is small and can often be ignored. Lens specifications normally instead measure field focus distance from the sensor, so you could subtract a few inches from your subject distance (to be at that node) to compute Field of View, but normally this is not significant except at extremely close focus and macro distances. It is more significant for macro distances. Example, the Nikon 105mm f/2.8 VR macro lens has specification "Minimum focus distance: 31.4 cm (1.03 feet), which is measured to the sensor plane at rear of the camera top. There's a small measuring symbol on top of the camera there, an O with a line through it (shown on this Nikon DSLR, or is often on the side of the pentaprism dome) to mark the sensor focal plane location. But at 1:1, a reliable chart of macro lens working distances says that 105 mm lens has a Working Distance (in front of lens) at 1:1, which is significantly less, 14.8 cm (5.8 inches), which differs by 16.6 mm due to the length of the lens and thickness of the camera body.
SO NOTE: the terms Focal Length and lens focus distance are measured to the sensor plane, to that mark just mentioned. But Field of View and Depth of Field are computed to a node inside or near the lens.
However, the Field of View calculator and the Depth of Field calculators instead are designed around the Thin Lens Model, and are measured to a node point inside a "Normal" lens, perhaps near its middle. So calculated distances are measured to the designed focal nodes. We are rarely told where the nodes are designed, often both are inside the lens body somewhere, but some are outside. For telephoto lenses, the rear node H' (focal length from sensor plane) is instead designed just outside the front lens element, and its field H node is the focal length dimension approximately in front of the front lens surface (see an example). The designer's term "telephoto" is about this reposition of the nodal point so that the physical lens is NOT longer than its focal length. And in wide angle lenses for DSLR, the rear node H' is generally designed behind the rear lens surface, at least for SLR (lens is moved well forward to provide room to allow the larger SLR mirror to rise... 12 mm lens but 24 mm mirror, etc). This difference is only a few inches, but it affects where the focused distance is measured to the sensor. And it shifts a bit as the lens is focused much closer. Repeating, the focal length marked on the lens is specified for when focus at infinity, and focal length is longer when focused closer.
But the "Subject Distance" (S in diagram) is measured to the sensor focal plane (it is the "focus distance"), where we see a small line symbol like ϴ marked on the top of the camera (often near top LCD on right side, but some are on left side of camera). The line across the circle indicates the location of the film or sensor plane (for focus measurements). However, the Thin Lens Equation uses the working distance d in front of the lens. This is why we often see in equations: (S - f) used for d.
Again, three points.
For Macro, computing Field size from magnification is more convenient than from focal length, since we don't really know focal length at macro extension. The math above WILL BE INACCURATE at macro distances, because the Focal Length has changed there.
Focal length and subject distance determine Magnification, which is the ratio of size of image to size of actual subject. Or the ratio of size of sensor to the size of the remote field. We could compute for magnification here, but we likely don't know new focal length at that close magnification. Just using magnification has more significance up closer (easier for macro), which is where our knowledge of the actual focal length is weakest. We could measure the field to compute the actual magnification. However Magnification is simply:
m = s2/s1. Or m = f/d. Or m = f/(S-f).
Other macro ideas:
Actual focal length = Sensor dimension × Working distance / Field dimension
Those are all in the same units. Note that working dimension is to the lenses internal node, and NOT just to the front of the lens. Which is probably only an inch or two difference, but it becomes very significant at macro distances.
Field dimension = Sensor dimension / Magnification
Let's say it this way:
1:1 macro, the focal length f is same as the distance d in front of lens (each with its own node).
1:1 macro (magnification 1), the field of view is exactly the same size as the sensor.
1:2 macro (magnification 0.5), the field of view is twice the size of the sensor.
1:4 macro (magnification 0.25), the field of view is four times the size of the sensor.
This is true of any focal length for any lens (or method) that can achieve the magnification. Focal length and subject distance are obviously the factors determining magnification (it is still about them), but magnification ratio is simply easier work for macro.
The easiest method to determine field of view for macro is to simply put a mm ruler in the field. If a 24 mm sensor width sees 32 mm of ruler, then that is the field of view, and the magnification is 24/32 = 0.75 (this scale of magnification is 1 at 1:1, and is 0 at infinity).
The definition of macro 1:1 magnification is that the focal length and subject distance are equal (distances in front of and behind the lens nodes are necessarily equal, creating 1:1 magnification). In this Thin Lens Equation, if s1 and s2 are equal, the formula is then 2/s1 = 1/f, or 2f = s1. So lens extension to 2f gives 1:1. And since f/stop number = f / diameter, then if 2f, then f/stop number is 2x too, which a double f/stop number is 2 stops change, which is the aperture loss at 1:1. We know those things, this is just why.
But the point here, if f is actually 2f at 1:1 macro, the field of view changes with it. None of the FOV calculators are for macro situations (too close, magnification is instead the rule there). Field of View calculators expect subject distance to be at least a meter or so, reducing the focal length error to be insignificant.