DOF Calculator User's Guide

The Lens focal length is always in millimeters.   The F# is the f/stop.   You should be aware that photographic standards employ some bizarre rounding for aperture f/stops.   For example aperture f/5.6 is technically f/5.7, aperture f/11 is technically f/11.3, and so on.   The aperture can also be selected from the f/stop drop down list.   These apertures are precisely calculated based on the f/stop Scale radio button selected.   This is necessary for the other calculations in this utility.   While the values have full precision, the list is mathematically rounded to 1/10 stop.   This may not always match what is shown in your camera or on the lens body, but it is technically correct.   Thus, the DOF calculations are more accurate.

The Subject distance and Object distance are based on the selected distance scaling units.   The subject distance is measured from the image plane.   This is usually marked on the camera body.   The object distance is similar to subject distance except that it is measured from the principal focal plane.   Since the principal focal plane moves as you change focus, it is very difficult to measure accurately.   Enter either and the corresponding other distance will be shown.   Many DoF algorithms are based on the object distance instead of the subject distance.   This utility allows you to enter or review either.   The corresponding Image distance is a display field only.

Note that any given subject distance can represent two object distances.   One at a reproduction ratio less than 1:1 and one at a reproduction ratio greater than 1:1.   Because of this, at distances closer than macro 1:1 the object distance or reproduction ratio input boxes should be used.

The RR text box displays the ratio between the subject size at the subject plane and the image size at the image plane.   This is typically 0 when focused at infinity and 1 when focused at 1:1 macro distance.   This ratio is used in effective aperture, DoF, and diffraction calculations.   By default it is automatically calculated from the subject distance and focal length.   You can also enter a ratio between 0 and 8 and the subject or object distance will be automatically calculated.   This is handy for extreme close up or macro work.   RR is sometimes also called magnification, but it should not be confused with the lateral magnification ratio (M) used in many DoF formulas.   These are based on lateral distance ratios between the image, object, and focal planes, not the ratio between the image size and subject size.   If you enter a number between 1 and 8, you are working at closer than 1:1 macro distances, and the paradigm will change.   From this point on you must enter an object distance or a new RR.   The subject distance will still be shown.   The reason for this restriction is that the same subject distance is achieved at RR = 1:0.5 or RR = 1:2.   Except that the image and object plane distances are swapped.   In other words, the subject distance becomes ambiguous as illustrated below.  

The Pupil text box allows input for lenses that have different exit and entrance pupil diameters.   Many telephoto and wide angle compound lens configurations meet this configuration.   Thus the normal DOF algorithms (for asymmetric or thin lenses) do not match the device.   This is a ratio (exit/entrance) and should be between 0.4 and 1.7 in most cases.   The technical specifications about these pupil sizes are seldom published, so this is for serious technophiles only.

The Image Format drop down list allows the user to select from several popular digital and film formats.   This will set the CoC and size of the image plane based on the selected standard.   It will also set the focal length to the customary default normal lens for portraits.   For objective comparisons between formats, the selected default lens yields around 50 AoV at 6 feet.   Most professionals use longer lenses and distances for portrait work.   You can also input a custom Width and Height for non-standard sensor sizes.

The MP text box accepts a digital megapixel count.   This may be used to calculate an approximate photosite size as follows.

The optional Photosite size of a digital sensor is related to the (aperture dependent) Airy Disk blur.   If the Airy Disk blur spans two photosites, the photosite size becomes a new diffraction limit.   For example, a Nikon D2X is a 12 MP camera with a 1.5x sensor.   Thus each sensor site is only 5.53 micrometers across.   In this case an Airy Disk at f/8 of 0.011 mm spans two photosites.   So we can encounter diffraction blur even before we approach the intended CoC.   The photosite size can be calculated from the image width divided by the horizontal pixel count.   Enter this in micrometers.   Or you can use the MP text box described earlier.   If the Airy Disk might contribute to blur in the photosites, a warning is shown.

The Circle of Confusion (CoC) is defined in millimeters.   It is based on the allowable blur in an 8x10 print enlargement viewed at approximately 25 cm.   In photography, the circle of confusion diameter limit is usually defined as the largest blur circle that will still be perceived by the human eye as a point when viewed at a distance of 25 cm.   For most people, this is the closest comfortable viewing distance.   At this distance, a person with good vision can usually distinguish an image resolution of 5 lp/mm.   This is equivalent to a CoC of 0.2 mm.   Thus the CoC for DOF calculations is based on the film size or digital image sensor size and the implied print magnification requirements.   Naturally, this can also be subjective.   You can select from predefined standards with the Image Size drop down list, or enter a custom value in the text box.   Or the Calculate CoC checkbox can be used to calculate the CoC based on the current image plane size.   This is based on the width, height, or diagonal measurement as selected with the AoV radio buttons.   This is an important, but admittedly subjective core variable in all DOF calculations.

The Airy Disk calculation is based on the currently selected aperture and light at 550 nanometers wavelength (green).   It is an indication of the amount of blur introduced as light passes through an aperture.   Technically it is not a factor in DOF calculations, but it is a limiting factor in image sharpness.   This is known as the diffraction limit.   If this blur number is greater than the currently selected CoC some image resolution is lost even at the point of sharpest focus regardless of the DOF numbers.   Note that since wavelength is a factor, reds are affected first or most and blues are affected last or least.   This blur is based on the focal plane distances as well as the actual aperture diameter, so it will change with focus distance.

Below this several miscellaneous calculations are shown.   The effective aperture (EF) is shown based on the current real aperture size and the distance between the image and focal planes.   At close up subject distances this becomes a factor in exposure settings and diffraction.   It is also a factor in the DOF formulas.   With some camera systems (Nikon) the effective aperture shows in the viewfinder, with others, only the real aperture setting is shown.   The optical lateral magnification (M), or the image/object distance ratio is shown next.   Following this, the calculated angle of view and field of view based on the current image plane size are show.   The AoV is based on the lens, focus distance, and image format.   In some other technical references, the AoV is only based on infinity focus.   The FoV is based on size of the object plane at the current subject distance.   It is not shown when focus is at infinity.   The AoV and FoV calculations are based on width, height, or diagonal measurements as selected with the AoV radio buttons.   Finally, there may be warning messages if macro distances or diffraction limits have been exceeded.

The Airy Disk, Hyperfocal, and DOF text boxes are for calculated output only.   They are displayed as text boxes only to accommodate cut and paste operations.   If the subject distance (focus point) is infinity, only the near focus information is provided.

The calculations are very precise but it should be pointed out that the accuracy of the answers can be reasonably debated.   Most important, everything is based on a subjective constant, the CoC.   There are other factors that can affect the accuracy of these calculations.   The formulas are based on what is known as a thin (single element) lens.   But some compound lens assemblies have different entrance and exit pupil sizes.   This is true for some long telephoto lenses or short wide angle lenses.   In addition, some lenses use internal (floating) elements in the focus mechanisms.   These can change the focal length during focus operations, even in a prime lens.   In other words, some internal lens specifications that might be needed for accurate DOF calculations under extreme photography conditions are not always readily available.

In addition, any of these limits can be very close to the resolving limits of your lens.   Even a very good lens loses resolution at the edges of the frame and at the large or small aperture design limits of that lens.   A cheap lens can trump all your detailed calculations or negate your investment in the SLR body.

Film photographers also recognize the film grain can affect resolution, thus DOF.   Smaller grain size may seem better, but it may be trumped by Airy disk diffraction at small aperture sizes.   Larger film grain results in noise that trumps resolution and DOF.   The same is true with digital ISO. On the other hand, in the digital world we have excellent sharpening tools that (within limits) can yield an appearance of improved DOF.

One final point needs to be addressed.   Many folks have observed (rightfully so) that with the same subject they get more DOF with a DX sensor size than with a 35mm (FF) sensor size.   The DOF calculations indicate the reverse.   Both observations are correct, but only because in order to get the same perspective (angle of view) a shorter focal length lens is needed.   Or, to get the same field of view we need to move further back from the subject.   Either change (lens or subject distance) has much more impact on DOF than the sensor sizes.   A similar observation has been made comparing portraits taken with 35mm and medium format cameras.   Medium format allows the portrait photographer to blur the background more effectively.   Again, this is because the focal length and/or subject distance have changed.

On the other hand, I do a lot of soccer photography with a 500mm lens.   Sometimes I use a Nikon D200 (DX) and sometimes I use a Nikon D3 (FF).   Always using the same lens and at the same subject distances.   I always get more DOF with the Nikon D3, just as the calculations predict.   The answer is to know your equipment and know your objectives.

This calculator is intended primarily for educational enlightenment.   It also clearly demonstrates the DOF challenges typically encountered in close-up or macro photography and long range sports photography.   I have tried to provide a number of common formats from a point and shoot that fits in your shirt pocket to 8x10 inch large format film.   And to show how diffraction limits will vary with these formats.   The biggest challenge was to be able to calculate the image and object distances knowing only the focal length and subject distance.   Since there are two unknown variables, this is not addressed in any text book.   Using the optical focus proof formulas and some computer magic I finally met the challenge.   This made it usable with typical photographic measurements and the more accurate DoF formulas that depend on object distances.

If you have any comments, or suggestions, I would welcome your input.   Please send me an  Email

Rags Gardner
Rags Int., Inc.
204 Trailwood Drive
Euless, TX 76039
(817) 267-2554
Send Email
November 1, 2008

This page last updated on: Saturday November 01 2008
You are visitor number 8,884 since 11/01/08