Depth of Field, Angle & Field of View, & Equivalent Lens Calculator


For the supported formats it will calculate the hyperfocal distance, near and far depth of field and total available depth of field for the lens specified. As well as the equivalent lens in one of the other supported formats. Where the equivalent lens produces the same depth of field and perspective.

Updates

2011-01-17: I’ve added some features to make computing AF calibration data easier. The first is the AF Test Dist button that sets the focus distance to the minimum recommended AF test distance of 50 times the focal length. The second is the addition of a 1/8th DoF measure to the outputs.

2014-01-12: Added support for metric distance input and output formatting. And support for preset focus distances roughly corresponding to various types of portraits.

2014-01-28: Added angle and field of view calculations. Angle and field of view are show for the selected format (i.e. 35mm or APC-S) and may not reflect the exact angle or field of view for the equivalent lens if the platforms aspect ratio is different.

2014-02-03: Clicking on the format in the equivalent lens chart will update the lens setting to match that format as closely as the calculator allows.

2014-02-05: Added 1/1.7″ CCD used in many compact cameras and the Pentax Q mirrorless cameras.

2014-05-13: Updated script to use the same engine used by tools.pointsinfocus.com/dofcalculator and to store current settings in the URI to allow linking to a specific setup.

2016-04-01: Updated to allow the use of a custom frame size or crop factor. Enter the custom frame size or crop factor in the “Custom frame size box”.

You can enter a frame size in mm as width x height (eg. 24 x 12), decimals are permitted. Don’t specify the “mm”, and spaces around the x are ignored. The crop factor is calculated internally as the diagonal as referenced to the diagonal of a 35mm (36×24) frame.

You can enter a custom crop factor as a decimal number. Numbers >1 (e.g. 1.5) result in a frame that’s smaller than 35mm. Numbers <1 (e.g. 0.5) result in a frame that’s larger than 35mm. In this mode the aspect ratio of the frame is assumed to be 3:2. If you want a different aspect ratio frame, you’ll need to specify the dimensions directly.

Notes

DOF and hyperfocal distances are calculated using the following formulas.

Where:
  • H is the hyperfocal distance
  • f is the focal length
  • s is the focus distance
  • Dn is the near DoF limit
  • Df is the far DoF limit
  • N is the f-number
  • c is the circle of confusion

Equivalent lenses are calculated so that the focal length produces the same approximate angle of view and the f-stop results in an aperture diameter equal to the base lens’s aperture diameter.

Custom Frames

As of April 2016, the calculator now supports custom frame sizes. These can be entered as either a crop factor or as the dimensions, in mm, of the frame to be used.

For crop factors, the reference frame is the 3:2 aspect ratio 135-format (i.e. 36 x  24 mm) film frame. Cropped frames will retain the 3:2 aspect ratio. Crop factors are crop of the reference frame, therefore a value larger than 1 will produce a smaller frame. Entering a value smaller than 1, e.g. 0.5, will generate a frame larger than the reference frame.

The second option is to enter the dimensions of the frame in mm. This should be entered in the format of “width x height”, or “dimension_1 x dimension_2”. Whether the width precedes the height or vice versa will only change the horizontal and vertical values presented in the angle and field of view sections. Spaces between the numbers and the ‘x’ are ignored. Decimal values are accepted.

Comments

tex andrews

Please add Pentax 645D/Z

Jason Franke | admin

@tex andrews,

That’s a reasonable request, I’ve added the format under 645D/IQ250/H5D-50c. You might need to force reload the page (shift+f5 or shift+ctrl+r/shift+command+r) for it to show up.

Gabe

A custom sensor size or multiplication factor would save you from having to add more formats. This is a great calculator, but I came here hoping to find common CCD calculations. 1/3.2″ for iphone S5, 1/4″, 1/6″, 1/8″, 1/10″ CCDs common on lesser cell phones as well as security cameras.
Regardless, thanks for the nice page.

Jason Franke | admin

Gabe,

That’s actually a good idea, I’ll have to look into implementing that.

Nameless Person

Could you add 5×7 as you got 4×5 & 8×10…?

Jason Franke | admin

That’s easy enough, I’ve also added super 8mm and super 16mm film since there seems to be some movement in those formats (Black magic’s pocket cine camera and the new Kodak film camera).

Nameless Person

Nice, thanks. I use this a lot!

Andrew Batson

Question. I have a 60D with an APS-C (1.62x) sensor. So I choose that in the drop down above. On the 60D you can either attach a lens that is EF (full frame – used commonly with a 5D), in which the 1.62 crop is inherently applied to the focal length. OR you can attach an EF-S lens (same mount but opening tailored for the smaller sensor) which holds the focal length true for the APS-C sensor.
When inputing the focal length above for a EF Full frame lens attached to the APS-C sensor, I have do the 1.62x calculation first, correct? i.e. an EF 30mm would be effectively a 48.6mm on the APS-C sensor. I should input 48.6mm in the focal length section above? Correct?

Jason Franke | admin

Hi Andrew,

Thanks for the question.

The short answer is that you always enter the actual focal length that’s printed on the lens.

The long answer is a bit more detailed but it’s worth going over at least quickly.

Focal length is a measure of how strongly a lens bends or focuses light. A lens’ focal length doesn’t care about the sensor behind it at all, it’s a property of the lens and only the lens. The same focal length will have different angles of view if you put a different sensor or frame size behind it, but the lens focuses/bends light the same way (it’s a bit more complicated than this in reality, but that gets into a lot more optical engineering than I want to go into here).

For example, a 50mm lens on your APS-C camera has a an angle of view that would commonly be described as being “short telephoto”. A lens with the same focal length on a full frame camera, would be described as having a “normal” field of view. And finally a 50mm lens on a medium format camera would best be described as having a “wide angle” view. All of these lenses fundamentally “bend light” the same way, but because the frame gets bigger the angle of view increases too (the edges are further and further away so the same amount of bend results in light coming form wider and wider angle to match).

Photographers complicate the matter because they often say focal length when what they’re really talking about is angle of view (and given that it’s much easier to say 35mm than 74 degrees 10 minutes it’s no wonder why). This is what is being talked about when you do the “equivalent focal length” dance where you multiply or divide by the crop factor.

However, the focal length, being a property solely of the lens does not change when you change the size of the sensor; the angle of view does, but not the focal length.

This calculator uses the actual focal length of the lens, not the “equivalent angle of view focal length” that photographers talk about when comparing things. So there’s no need to do anything to focal length, just use the number that you had the lens set to.

Also, to clarify a point. EF-S lenses do not “hold the focal length true” for APS-C cameras. The focal lengths of those lenses (as printed on them) are the real focal lengths of the lens, and would be the same as the focal length as on an EF lens. That’s why they have different focal lengths than full frame counter parts for the same approximate angles of view.

EF-S lenses specifically do 3 things:

  • They provide angle of view ranges that match traditionally defined and useful ranges (i.e. wide to short-telephoto, or ultra-wide to wide angle), by using different focal lengths as required by the smaller sensor. (This can be generalized to all crop lenses, like Nikon’s DX or 3rd party crop lenses.
  • They have a shorter back focus distance, which allows the rear element to be placed closer to the sensor; the practical implication of this is that they can’t be mounted on a full frame camera (3rd party, e.g. Sigma, crop lenses are not EF-S, they use EF mounts), but this offers Canon benefits in designing the lenses (they don’t have to be as strongly of a retro-focal design).
  • They have a smaller image circle that won’t fully cover, or do so with good quality in the corners, a full frame sensor (again this is an engineering trade off as it allows some aspects of the lens to be made smaller.

Also the equivalence dance applies the same to them as it does to EF lenses. An EF-S 17-85mm zoom is the crop body equivalent to the EF 28-135mm zoom for full frame cameras. If you were going to jump to full frame, you’d want to multiply all your lenses’ focal lengths by the crop factor to figure out what focal lengths you want for full frame lenses to give you the same coverage.

I know that’s probably a lot more than you were bargaining for, but I hope that answers your question and clears up some possible misconceptions.

Frank

Thank you for posting this valuable tool – I have one question:
How do you calculate the distances for the different test situations (Headshot, Head & Shoulders, etc.) – I naively assumed that here the corresponding distance is based on an equal Field of View (e.g. Diagonal), however, I find different values for Field of View with different focal lengths (equal sensor size). Where is my mistake?
Best regards, Frank

Jason Franke | admin

@Frank,

Nope, that’s not your error at all. I was improperly simplifying the trig that handled calculating the distances on the assumption that the error wouldn’t matter that much for the intended use. I’ve corrected that to use the proper formulas.

For the record, I use the horizontal (long axis) of the for the distance approximations, since that’s how I expect those kinds of images would be shot (i.e. as portraits). The AF test distance is just 50 times the focal length which is what was recommended by Canon and Nikon in their literature in the past. Other than the AF test distance preset, the intent of the distance buttons is to create an approximate distance number, not to be an exact standard.

Thanks for taking the time to check things.

Frank

Dear Jason,
thank you for the very rapid answer and the correction. However, I am still somewhat puzzled:

E.g., in the tool the “Head&Shoulder” preset for Canon APS-C gives out a horizontal FOV of 30 cm @ 20 cm distance for 15 mm FL, but 68 cm HFOV @ 307 cm distance for 100 mm FL. Is that big variation in HFOV (30 cm to 68 cm) intended ?

If you would calculate the WD (working distance in mm) from the angle of FOV (AFOV(°)) as

WD (mm) = HFOV (mm) / (2x tan(AFOV(°)/2))

and AFOV(°) from the height (h) of the sensor in mm and the focal length (fl) in mm as

AFOV(°) = 2 x arctan (h/2fl)

you could preset HFOV as e.g. 500 mm (for head&shoulders) and would receive the following combinations:

34 cm distance @ 15 mm FL
227 cm distance @ 100 mm FL

Is that correct?

Best regards, Frank

Jason Franke | admin

@Frank,

The distance presets should be working correctly now. More buggy code on my end. When I updated the script to support a custom frame size, I changed everything but the distance preset function to use that code, so it wasn’t properly determining the frame size it should have been using (in addition to the goof on the trig).

Again, thanks for spotting the bug.

sfc

Hi Jason,

I’ve been scouring the internet and speaking with people, but I’ve not found anyone who knows the answer to my problem. I am working with old (1960) aerial photography and in the software I’m using, I am asked for the 35mm focal Equivalent. I know this typically applies to digital photography, but does it also refer to analog film too? If it does, then how do I calculate it? I am not a photographer, so I’m not certain of all of the terms involved with the camera and film. The camera used was a Fairchild with a Bouche & Lomb lens. The calibrated focal length is ~153mm and the film size is 9×9 inches. The aperture (is that also the ‘f/stop’?) is possibly f/8. The altitude is 20,000 feet. In your calculator above, you list the “Sensor size”? Will that be the same size as the film or something else entirely because this is information that I do not currently have (and trying to find a camera manual hasn’t been the easiest).

I would very much appreciate any time an consideration you have to address this.

Regards,
S

Jason Franke | admin

Hi sfc,

Thanks for the questions, I hope these answers help.

in the software I’m using, I am asked for the 35mm focal Equivalent. I know this typically applies to digital photography, but does it also refer to analog film too?

Yes, the “35mm focal equivalent” applies as a conversion to any size frame that’s not a 24 x 36 mm (“35mm” or full frame digital).

If it does, then how do I calculate it?

You need to determine the ratio between the frame you’re working with and the 35mm frame, then divide the focal length by that ratio. Normally this would be the diagonal of one divided by the diagonal of the other.

However, you may want to use the short edge of the frame (24mm) instead since aspect ratio is different between your square frame and the 3:2-aspect ratio film frame.

My calculator here uses the diagonal of the frame to compute the equivalent focal lengths.

The calibrated focal length is ~153mm and the film size is 9×9 inches.

Since your frame is larger than a 35mm frame, you should expect the 35mm equivelent focal length to be much shorter than the 153 mm specified.

In your calculator above, you list the “Sensor size”? Will that be the same size as the film or something else entirely because this is information that I do not currently have (and trying to find a camera manual hasn’t been the easiest).

Yes, sensor size is the same as film size. More precisely I should probably call it “frame” size as the size as that’s what is really being sought.

Chris

Hi Andrew, I have a question about FOV calculations.

Thank you for this post, it’s been very helpful! I’m writing some code to automate this process, taking sensor size, focal length and object distance as the inputs.

I’ve got to the point where I can calculate the horizontal angle of view from:
2*atan(sensor width/(2*focal length)), that works fine.

I can’t work out how you’re getting from angle of view to the metric field of view (although I know your calculations are correct!)

I’ve been using:

2*object distance*tan(angle/2), but this doesn’t work for some reason.

I might be doing something dumb, but wanted to check first what equation you’re using, if you don’t mind.

Again, thanks for this post!
Best wishes,

Chris

Jason Franke | admin

Hi Chris,

I’m not Andrew, not sure who you’re addressing there, but since this is my site and my code, I’ll be answering your question today. :-)

The equation I use is 2 * object distance * tan(angle of view/2) for the appropriate angle of view (horizontal, vertical, or diagonal).

If you’re not getting the correct results from that, make sure that you’re using the right units for the angle. The trig functions for most, if not all, languages use radians not degrees. Internally my script does all calculations in mm and radians and only converts to degrees and meters or inches to display the value.

Hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *


Comments are moderated. Abusive, inflamatory, and/or "troll" posts will not be poasted. If your comment doesn't show up, it may have been blocked by the spam filters, sorry.

Follow me on twitter for updates on when new comments and articles are posted.