Depth of Field is a very important piece of the photography puzzle when you are trying to make compelling images. DOF is basically the distances at which your subject is in focus, relative to the rest of the photo. A wide DOF means that a large range of the photo is in focus and a narrow DOF means that a narrow range is in focus. These distances (and ranges) change based on a few things: sensor size, aperture, the focal length of your lens, and the distance from the subject.
There are mathematical formulas that you can use to figure all this stuff out, but I’m going to lay out some general rules, based on these four factors, so you can use your eye rather than a calculator to control your depth of field.
All digital cameras have a sensor, which is similar to a piece of film from days past. The larger the sensor, the more detail the camera can capture in an image, and the more narrow the DOF. A full frame 24x36mm sensor (Canon 5D Mark II) will have a narrower DOF than a 22x15mm sensor (Canon 60D) at the same aperture and focal length. Medium and large format cameras allow for even narrower depth of field effects based on their bigger sensor sizes.
The smaller your aperture, the narrower your depth of field will be. This seems to be the easiest part to understand. Start cranking that f-stop up (closing down the aperture) and you’ll see more and more of the image in focus. A 100mm lens at f2.8 will have a very narrow depth of field, meaning the range of focus is very small, while when you take the same 100mm lens to f10, much more of the image is in focus. You can see this demonstrated with my macro lens—nothing changed but the aperture.
Shorter focal lengths will have a wider DOF than longer focal lengths. So, if you are photographing a person from 20 feet away with a 35mm lens, more of the image will be in focus than if you are 20 feet away with a 70mm lens, at the same exact aperture. Also, in theory, if you are 20 feet away from the subject with a 70mm lens and then move your camera to 10 feet way with a 35mm lens the DOF should remain same. Which brings us to our final factor…
Distance from subject
If your focal length and aperture are constant, the depth of field will get narrower the closer you get to your subject and wider the further away you go. Take your fastest lens (lets say aperture is f2.8) and photograph something up close. Only a part of your subject will be in focus because of the distance. Keep the same focal length and aperture and take a landscape photo or focus on something in the distance. Much more of the photo will be sharp because that range of focus is greater with greater distances.
If you practice with these four factors eventually controlling your depth of field will be almost second nature. For landscape photography, where you want much of the frame-- if not all-- to be in focus, try using small apertures, short focal lengths, and long distances from your subject. For portraiture, where maybe you are wanting only the person’s eyes to be sharp and the rest of the face to be a little out of focus, try a large aperture, longer focal length and a short distance from your subject. Adjust each of the variables until you get just the look you want.