Aperture & Depth of Field
S
etting the aperture on the lens not only affects the exposure, but also the depth of field — how much depth of the subject matter will be in focus. Though a small aperture creates a deeper field in focus, very small apertures diffract the rays of light, softening the overall image. Understanding these phenomena will allow you to take sharper photographs.
Aperture
The aperture of a lens is the opening, typically adjustable, that lets light pass through to the sensor. The size of the aperture is adjusted by a set of blades — visible in the following image.
Lens aperture
The setting of the aperture is part of the overall exposure setting. The size of the aperture setting is measured in ƒ‐stops, sometimes referred to as just stops. ƒ‐stops are expressed as fractions, such as ƒ/2. The number represents the ratio of the lens’ focal length to the diameter of the aperture.
ƒ-stop   =    lens focal length
aperture diameter
For example, a setting of ƒ/4 on a 100mm lens would mean that the aperture is open to 25mm.

You don’t really need to remember the definition of ƒ‐stop. The important fact is that the larger the ƒ‐stop, the smaller the aperture, and therefore the darker the exposure. One full ƒ‐stop is a doubling (or halving) of the area of the aperture, and therefore a doubling (or halving) of the exposure. Since the circular area of the aperture doubles when the diameter is multiplied by √2 (which is ≈1.4), each full ƒ‐stop is a factor of 1.4 larger or smaller. ƒ/5.6 is a full stop smaller than ƒ/4 (5.6 = 4 × 1.4), and lets in half the light. In this composite image a steel ruler was photographed with different ƒ‐stops while all other settings were the same. Though in this case ƒ/8 gave a good exposure, that was entirely dependent on the lighting and other camera settings.

Steel ruler photographed with different ƒ‐stops

A typical lens might offer ƒ‐stops from about ƒ/4 to ƒ/22 — a range of five stops. Most modern lenses allow finer adjustments than full stops, for example allowing settings in 1/2 or 1/3 stop increments.

You might hear a lens referred to as being fast. That means the aperture can be opened very wide, such as ƒ/1.8, or even wider. The wide aperture lets in more light, allowing a faster shutter speed. This feature can be useful in situations with limited light. However, aside from fast lenses costing more, wide aperture settings aren't always useful for scientific applications. I'll explain this in the next section.

Depth of field
Since a wide aperture allows a faster shutter speed, and therefore lets you take photos in dimmer light, why not always use a wide aperture setting? The problem is, a wide aperture causes the depth of field to be shallow. The depth of field is the thickness of the slice of the scene that is in focus. In a shallow depth of field, little of the scene, front to back, is in focus. In a deep depth of field, more of the scene, front to back, is in focus.

The following images are close‐ups of the face of Abraham Lincoln on a $5 bill that is not lying flat. Click on the image to switch between the two versions — one at ƒ/2.8, and the other at ƒ/10. You can see that the eye on the left is out of the depth of field at ƒ/2.8.

ƒ/2.8
ƒ/10
Depth of field at ƒ/2.8 and ƒ/10
When hand holding a camera you'll need to balance the advantage of a deep depth of field against a fast shutter speed. However, if the camera is mounted on a tripod or a camera stand, you can use a slow shutter speed which permits you to use a narrow aperture, and thus have a deep depth of field.

For scientific purposes, a deep depth of field is typically a priority. However, in other fields of photography, a shallower depth of field is sometimes used to blur the background so that it will not distract from the main subject of the photograph. For example, in portraiture, it’s not unusual to use a very wide aperture for a very shallow depth of field, so only the plane of the face is in focus. In this close‐up portrait, the aperture was set to ƒ/2.8 to direct the viewer’s attention to the near eye and the jewelry.

Photo: David Garnick
Diffraction
To maximize sharpness, you might be tempted to leave the aperture set at the highest ƒ‐stop for the maximum depth of field. However, due to diffraction, high ƒ‐stops don’t produce the sharpest images. Diffraction is the bending of waves as they pass through a narrow opening; as the aperture gets smaller, the light rays bend and interfere with each other, blurring the image. You can see in the following close ups of Abe’s eye that, at ƒ/32, the image is softer than the version taken at ƒ/10.
ƒ/10
ƒ/32
Diffraction softens the image at high ƒ-stops
For many lenses, ƒ‐stops in the range of about 5.6 to 8 tend to give the sharpest image. You should use wider apertures when dim light requires it, and narrower apertures when you need the depth of field.
Takeaway
The trade-offs between wide and narrow apertures are summarized in this table. Note that the exposure is determined by a combination of aperture setting, shutter speed, and ISO setting. In a future post I’ll discuss choosing combinations for your purposes.
wide aperture
(small ƒ number)
narrow aperture
(large ƒ number)
brighter exposure darker exposure
allows faster shutter (and/or lower ISO) requires slower shutter (and/or higher ISO)
shallower depth of field deeper depth of field
no diffraction softening diffraction softening
(noticeable above ƒ/16)
Depth of field calculator
Here’s a calculator for depth of field. Provide the basic information about your camera, lens, and subject distance, and it will calculate how far in front and behind the focus point will be acceptably sharp (disclaimer below). The depth of field on the near side of the subject focus point is shallower than the depth of field on the far side of the focus point.

Though you won't be looking up this information in anticipation of each shot, it’s worth spending a few minutes acquainting yourself with results for your most common photographing situations so you’ll have a feel for good settings.

Disclaimer: The calculator makes many assumptions; note how I slipped in “acceptably sharp” about the calculated result. The camera and lens designs affect the depth of field, as does the size of the displayed image, the viewing distance from the monitor or the print, and the visual acuity of the viewer. I’ve tested online depth of field calculators on various sites, and they sometimes give very different results depending on the assumptions they make.