Depth of Field Explained
Depth of field (DOF) is the range of distances over which a photographic image is said to be "sharp". In actuality, only one plane of the image can actually be in focus, but all points lying within the depth of field are considered to be "acceptably" sharp. A critical concept in depth of field is the diameter of the circle of confusion (CoC). A point in the image which is actually in focus will have a typical diameter in the image plane (diffraction limited spot size) in the 0.005 to 0.01 mm range. Points lying at the limits of the depth of field will image with a diameter equal to the circle of confusion diameter (by definition). For 35mm work this is typically taken to be around 0.03mm (about 1/1000 inch) and this is based on the appearance of a standard sized print at a standard viewing distance. While the "standard" is rarely explicitly defined, it seems to be close to an 8x10 print viewed from about 1 foot.
It's important to note that depth of field isn't an objective lens characteristic like focal length or aperture. It takes into account some subjective factors like the accuity of vision of a typical viewer, the print size and the viewing distance. That's the reason different values for the CoC are used for different formats. Larger formats need to be enlarged less than smaller formats, and so a larger CoC can be used. For example to get an 8x10 print from an 8x10 negative, no enlargement is required, wheras to get the same print from a 35mm negative, an 8x enlargement is needed. So to get the same sharpness in a print, the 35mm negative must be 8x as sharp, or in terms of DOF and CoC, the CoC value used for depth of field calculation must be 8x smaller. From this I think you can see that if you're concerned about an 8x10 print which will be viewed from a distance of 3 ft, rather than 1ft, you could use a different CoC (one 3x as large in fact), wheras if you're concerned about a 24x30 print viewed from a distance of 1ft, the CoC value you need to use is 3x smaller than the "standard" value
Depth of field is at best a "fuzzy" concept, depending on subjective judgement of what appears to be sharp. While claculations may give number to many decimal places, those numbers are based on "fuzzy" assumptions (like how sharp the average person's eyesight is). So when a depth of field calculation tells you the far point in focus is at 17.35567423 feet, what that really means is that stuff that's maybe 16-18ft from the camera shouldn't look too soft. It doesn't mean an object at 17.35567422 ft from the camera will be razor sharp while one that's 17.35567424 ft from the camera will be blurred.
Note that traditional depth of field calculations such as this one are based on simple geometric optics neglecting diffraction effects. Diffraction effects make the smallest possible focused point (diffraction limited spot size) larger than zero. In fact at f32, the diffraction limited spot size is around 0.040 mm. Clearly using a circle of confusion value of 0.030 mmm (smaller than the smallest possible focused spot!) is rather meaningless. The correct way to estimate depth of field would be to use a defocus MTF approach. This isn't too hard but does involve the use of things like Bessel functions which most photographers wouldn't be too comfortable with! The simple approximation is good enough when the diffraction limited spot size is significantly smaller than the circle of confusion. The diffraction limited spot size is approximately [0.00125 x fstop] mm.
Note also that depth of field and background blur aren't the same thing. Depth of field indicates the region in acceptable focus. Background blur deals with a region well outside any region of focus. The mathematics of the two aren't really closely related. For more this see my Background Blur Calculator article on BobAtkins.com.
Finally note that depth of field is really a function of magnification in the macro region. If you're shooting at 1:1 (life size) or 1:2 (1/2 life size) or even 1:10 (1/0 life size), depth of field depends almost totally on magnification, so it doesn't matter whether you're shooting with a 50mm lens, a 100mm lens of a 180mm lens (at the same aperture) , you'll get the same depth of field in each case. You'll get a different background and you'll get a different amount of background blur (see previous paragraph), but you won't get any more of the subject in acceptable focus.
The Hyperfocal Distance (HFD) is closely related to depth of field and is defined as the distance at which infinity will lie just inside the depth of field. When a lens is focused at the hyperfocal distance everything from infinity to 1/2 the hyperfocal distance will lie within the depth of field (i.e. will be "acceptably" sharp") Note that the notion of "acceptably" sharp depends on the viewer, so it is a subjective quality of the image. What's "acceptable" to you may not be "acceptable" to me - and vice versa.
Here's a very simple depth of field calculator. It doesn't check for unreasonable values being entered, but if you input reasonable data you'll get a reasonable result. I'll be posting a more complete calculator later, but for now this one should be useful.