This page has been replicated by kind permission of Nicholas Sushkin and is presented in its original form with no alterations. I have written a java script Depth of Field calculator which can be run by clicking the calculator icon at the bottom of the page. Click the camera icon to go to Nicholas's on-line depth of field plotter. Watch this space for a future article on using depth of field.


Depth of Field Calculation

by Nicholas V. Sushkin

June 23, 1995

In our calculation a typical SLR camera is represented by an optical system containing two elements, a lens and an image screen. The lens creates image of an object in the plane of the image screen (see figure below).

Lens Optic Diagram

The lens has a focal length f (which corresponds to the focal length of your real camera lens), the diameter a (which equals to the focal length f divided by the f-stop number A). The image screen is located at the distance d from the lens and the object is at the distance s from the lens, on the other side from the image screen.

Suppose the object image is in focus, then the distance between the lens and the image plane depends on the focal length and the distance to the subject. This dependence is known as the thin-lens equation.


   1     1      1  
  --- + ---  = ---  
   s     d      f  

If the object is extended in the direction parallel to the optical axis of the system, parts of the object can be out of focus. If some point of the object is closer or farther away from the lens then the ideal distance s, the lens will image this point as a circle (see the diagram).

Let us call the largest circle that we can tolerate, the circle of confusion, c. If an image of a point is a circle that is larger than the circle of confusion, we will see the image as being out of focus and blurry. If the image of the point is smaller than the circle of confusion, we see the image as being in focus and sharp. For our numerical calculations we will use c = 0.033 mm, based on a typical eyesight. Any point in front of the object which is located closer to the object than Df will produce an image smaller than c. This is also true for any point behind the object which are closer to the object than Dr. Df and Dr are the front and the rear limits of the "depth of field".

With help of some geometry we can write the lens equation for Df and Dr, namely


      1                 1               1 
  --------  +  -------------------  =  ---  
   s - Df       d ( 1 + c/(a-c) )       f 

and


      1                 1               1 
  --------  +  -------------------  =  ---  
   s + Dr       d ( 1 - c/(a+c) )       f 

By substituting eq. 1 for d in eqs. (2) and (3) we obtain


        s c (s - f)
  Df = ---------------   
       f a + c (s - f)

and


        s c (s - f)
  Dr = --------------- 
       f a - c (s - f)

Using definition of the f-stop number A, a = f/A we obtain the final form of the depth of field formulae


            c A s (s - f)
  Df  =  ------------------  
           2
          f  + c A (s - f)

and


            c A s (s - f)
  Dr  =  ------------------  
           2
          f  - c A (s - f)

Depth of Field Calculator Nicholas Sushkin's On-Line Depth of Field Plotter