Every lens has an aperture where it is sharpest, and it is never the smallest one. Stop down past a certain point and the image starts getting softer no matter how good the glass is, because light is a wave and squeezing it through a small hole makes it spread. That point is the diffraction limit, and where it falls depends on your sensor as much as your lens.
Two effects, pulling opposite ways
Wide open, a lens is limited by its aberrations — spherical aberration, coma, field curvature, all worst at the edges of a large opening. Stopping down cuts off the outer rays where those aberrations live, so the image improves rapidly for the first two or three stops.
At the same time, the shrinking opening increases diffraction, which spreads each point of light into a small disc. That effect gets steadily worse as you stop down. Total sharpness is the sum of the two curves, which is why every lens has a peak: the point where the aberrations have mostly been cleaned up but diffraction has not yet taken over.
The Airy disc
A perfect lens focusing a point source produces not a point but a bright central disc surrounded by faint rings, called the Airy pattern. The diameter of the central disc is:
d = 2.44 × λ × N
where λ is the wavelength of light and N is the f-number. For green light at 550 nanometres this simplifies to a handy approximation: the Airy disc is about 1.34 × N microns across. At f/8 that is 10.7 microns; at f/16, 21.4 microns.
When it starts to matter
Diffraction is always present. It becomes visible when the Airy disc grows larger than the detail your sensor can record — roughly, when it exceeds the pixel pitch.
| Sensor | Pixel pitch | Airy disc matches pitch at |
|---|---|---|
| 24MP full frame | 5.9 µm | about f/4.4 |
| 45MP full frame | 4.4 µm | about f/3.3 |
| 61MP full frame | 3.8 µm | about f/2.8 |
| 26MP APS-C | 3.9 µm | about f/2.9 |
| 20MP Micro Four Thirds | 3.3 µm | about f/2.5 |
Those numbers look alarming, and they are widely misread. Reaching the point where the Airy disc equals one pixel does not mean the image falls apart at f/5.6. It means that beyond that aperture you stop gaining resolution from the sensor — the lens is now the limiting factor. Visible softening arrives one to two stops later, and even then it is gradual.
More megapixels do not make diffraction worse
This is the most common misunderstanding in the topic. The Airy disc at f/16 is 21 microns wide regardless of what is behind the lens. A 61MP sensor does not suffer more diffraction than a 24MP one — it simply resolves the diffraction, so you can see it at 100 per cent zoom.
Printed at the same size, the high-resolution file at f/16 is still at least as sharp as the low-resolution one. You have not lost anything by having more pixels; you have just gained the ability to see the limit you were always up against.
Where the peak actually falls
For most modern full-frame lenses the practical sweet spot is f/4 to f/5.6, and for smaller formats it is a stop or so wider. A useful field rule: the peak sits about two to three stops down from wide open, and for a lens that starts at f/2.8, that means f/5.6 to f/8.
Zooms generally peak a little further stopped down than primes, and every lens is softer in the corners than the centre wide open, so a landscape shot needing corner-to-corner sharpness will often want a stop past the centre-optimal setting.
What to do when you need depth of field anyway
- Focus stack. Two or three frames at f/5.6 will beat one frame at f/22 comprehensively. This is the correct answer for anything static.
- Use hyperfocal placement properly. Focusing at the hyperfocal distance rather than at infinity gets you depth of field without extra stopping down.
- Tilt, if you have it. A tilt-shift lens rotates the plane of focus to lie along the subject, which buys depth of field for free.
- Accept it. If the shot needs f/16, shoot f/16. A slightly soft image with the right things in focus beats a razor-sharp one where half the frame is a blur.
Sharpening helps, up to a point
Diffraction is a well-characterised, predictable blur, which makes it a good candidate for deconvolution sharpening. Recovering a stop or so of apparent detail from an f/16 file is realistic. Recovering an f/32 file is not — once the information is gone below the noise floor, no amount of processing invents it back.
And the viewing distance caveat
All of this assumes pixel-level scrutiny. If the output is a web image, or a print viewed from a normal distance, the diffraction limit sits far further down the aperture scale than the pixel arithmetic suggests. Work out what your output actually demands before you let a number on a chart dictate your aperture.
Run the numbers
Find the aperture where diffraction starts costing you detail on your specific sensor and resolution.
Related reading
The aperture scale itself is covered in Aperture and F-Stops Explained, and the depth-of-field trade-off in Depth of Field and Hyperfocal Distance & Circle of Confusion. Pixel pitch comes from Sensor Size Explained, and the print-resolution side from PPI and Resolution for Monitors.