Lens Diffraction Calculator
Find the diffraction-limited aperture for your sensor to maintain optimal sharpness. Enter values for instant results with step-by-step formulas.
Calculator
Adjust values & calculateResolution by Aperture
Formula
The Airy disk diameter determines the smallest detail a lens can resolve at a given aperture. When the Airy disk exceeds twice the pixel pitch (Nyquist limit), the sensor cannot fully resolve the diffraction pattern, and effective resolution begins to decrease. The diffraction-limited f-number is the aperture at which this threshold is reached.
Last reviewed: December 2025
Worked Examples
Example 1: 24MP Full Frame at f/11
Example 2: 45MP Full Frame Landscape Aperture
Background & Theory
The Lens Diffraction Calculator applies the following established principles and formulas. Computers represent all information using binary, a base-2 number system consisting solely of the digits 0 and 1, each called a bit. Because long binary strings are unwieldy, programmers routinely use octal (base 8) and hexadecimal (base 16) as compact shorthand. Converting between bases follows a consistent algorithm: divide the source number repeatedly by the target base, collecting remainders in reverse order. Hexadecimal digits A through F represent the values 10 through 15, allowing a single character to encode four binary bits, making it the preferred notation for memory addresses, color codes, and bytecode. Bitwise operations manipulate individual bits within integers. AND produces a 1 only when both input bits are 1, making it useful for masking. OR produces a 1 when either bit is 1 and is used for combining flags. XOR flips bits that differ, enabling simple toggle logic and efficient swap algorithms. NOT inverts every bit (one's complement), while left and right shifts multiply or divide by powers of two in constant time. Data storage units ascend in binary multiples of 1024: 8 bits form one byte, 1024 bytes form one kibibyte (KiB), 1024 KiB form one mebibyte (MiB), and so forth. Hard-drive manufacturers historically use decimal prefixes (1 KB = 1000 bytes), creating the persistent confusion between binary and decimal interpretations of the same label. The IEC standardized the binary prefixes KiB, MiB, GiB, and TiB in 1998 to resolve this ambiguity. Network bandwidth is measured in bits per second (bps), most commonly megabits per second (Mbps) or gigabits per second (Gbps). A 100 Mbps connection transfers 100 million bits every second, equating to roughly 12.5 megabytes per second. IP subnet masks define network boundaries; CIDR notation appends a prefix length (e.g., /24) to an address, indicating how many leading bits are fixed. A /24 subnet contains 256 addresses with 254 usable hosts. Algorithm efficiency is described using Big-O notation, which characterises the worst-case growth of time or space relative to input size. O(1) is constant, O(log n) is logarithmic (binary search), O(n) is linear, and O(nยฒ) is quadratic. Cryptographic hash functions like SHA-256 produce a fixed 256-bit (32-byte) digest regardless of input length. File compression algorithms exploit statistical redundancy to reduce storage footprint, and compression ratio equals the original file size divided by the compressed size.
History
The history behind the Lens Diffraction Calculator traces back through the following developments. The conceptual foundation of modern computing traces back to Charles Babbage, whose Analytical Engine design of 1837 introduced the idea of a general-purpose mechanical computer with separate storage and processing units, including what he called the Store and the Mill. Ada Lovelace wrote what many consider the first algorithm intended for machine execution while annotating a translation of Luigi Menabrea's account of Babbage's work, also recognising the machine's potential to manipulate symbols beyond mere numbers. George Boole published "The Laws of Thought" in 1854, formalising a two-valued algebra of logic that would later map perfectly to electrical circuits. It remained largely a mathematical curiosity until Claude Shannon's landmark 1937 master's thesis demonstrated that Boolean algebra could describe switching circuits, laying the theoretical groundwork for all digital electronics. Shannon's 1948 paper "A Mathematical Theory of Communication" defined the bit as the fundamental unit of information and established information theory as a rigorous discipline. The same year, the transistor was invented at Bell Labs by Bardeen, Brattain, and Shockley, eventually replacing vacuum tubes and enabling miniaturisation at scale. ENIAC, completed in 1945, was one of the first general-purpose electronic computers, occupying 1800 square feet and consuming 150 kilowatts of power while performing roughly 5000 additions per second. The ASCII standard was ratified in 1963, assigning 7-bit codes to 128 characters and enabling interoperability between computers from different manufacturers. Through the 1970s, the microprocessor consolidated an entire CPU onto a single chip; Intel's 4004 in 1971 marked the beginning of this trend. The Apple II launched in 1977 and the IBM PC in 1981 brought computing to homes and offices, triggering a mass-market software industry. Tim Berners-Lee proposed the World Wide Web in 1989 and launched the first website in 1991 at CERN, transforming the internet from an academic and military network into a global information infrastructure. Mobile computing accelerated through the 2000s with smartphones integrating powerful processors, wireless networking, and GPS into pocket-sized devices, extending computation into every facet of daily life and cementing TCP/IP as the universal communications fabric.
Frequently Asked Questions
Formula
Airy Disk = 2.44 x Wavelength x f-number | Diffraction Limit = 2 x Pixel Pitch / (2.44 x Wavelength)
The Airy disk diameter determines the smallest detail a lens can resolve at a given aperture. When the Airy disk exceeds twice the pixel pitch (Nyquist limit), the sensor cannot fully resolve the diffraction pattern, and effective resolution begins to decrease. The diffraction-limited f-number is the aperture at which this threshold is reached.
Worked Examples
Example 1: 24MP Full Frame at f/11
Problem: A photographer with a 24-megapixel full-frame camera (36x24mm sensor) wants to know if shooting at f/11 causes diffraction softening.
Solution: Pixel pitch = 36mm / sqrt(24M x 1.5) = 36mm / 6000 = 6.0 micrometers\nAiry disk at f/11 = 2.44 x 0.00055mm x 11 = 0.01477mm = 14.77 micrometers\nDiffraction limit = 2 x pixel pitch / (2.44 x wavelength) = 12 / (2.44 x 0.00055) = f/8.9\nAt f/11, Airy disk (14.77um) > 2x pixel pitch (12um)\nResolution loss: approximately 15-20%\nEffective resolution drops from 24MP to approximately 16MP
Result: Diffraction limited at f/11 | Limit: f/8.9 | Effective MP: ~16MP
Example 2: 45MP Full Frame Landscape Aperture
Problem: A landscape photographer with a 45-megapixel full-frame camera needs to determine the sharpest aperture for maximum resolution.
Solution: Pixel pitch = 36mm / sqrt(45M x 1.5) = 36mm / 8216 = 4.38 micrometers\nDiffraction limit = 2 x 4.38 / (2.44 x 0.55) = 8.76 / 1.342 = f/6.5\nOptimal range: f/4 to f/6.5 for maximum resolution\nAt f/8: Airy disk = 10.7um vs 8.76um limit = ~17% resolution loss\nAt f/11: Airy disk = 14.7um = ~40% resolution loss\nAt f/16: Airy disk = 21.5um = ~68% resolution loss
Result: Diffraction limit: f/6.5 | Optimal: f/4-f/6.5 | f/8 loses ~17%
Frequently Asked Questions
What is lens diffraction and how does it affect image sharpness?
Lens diffraction is a physical phenomenon where light waves bend as they pass through a small aperture opening, causing the light to spread rather than focus to a sharp point. Every lens produces a small diffraction pattern called an Airy disk at each point in the image. At wider apertures like f/2.8 or f/4, the Airy disk is smaller than the pixel size on your sensor, so diffraction has no visible effect. As you stop down to smaller apertures like f/16 or f/22, the Airy disk grows larger and eventually exceeds the pixel pitch, causing light from one point to bleed into neighboring pixels. This results in a softening of the image that cannot be corrected in post-processing because the fine detail information has been physically lost. Understanding diffraction helps you choose the optimal aperture for maximum sharpness.
At what aperture does diffraction start affecting my camera?
The diffraction-limited aperture depends primarily on your sensor pixel pitch. For common cameras: a 12MP full-frame camera becomes diffraction limited around f/14 to f/16, a 24MP full-frame around f/10 to f/11, a 45MP full-frame around f/7 to f/8, a 24MP APS-C around f/7 to f/8, and a 20MP Micro Four Thirds around f/6 to f/7. These values assume green light at 550nm wavelength. Shorter wavelengths like blue produce smaller Airy disks, while longer wavelengths like red produce larger ones. The practical impact varies because diffraction onset is gradual. At one stop past the diffraction limit, resolution loss is typically 10 to 15 percent, which may be acceptable for many applications. At two stops past, the loss reaches 30 to 40 percent and becomes quite visible even in moderate-sized prints.
Should I always avoid apertures past the diffraction limit?
No, the diffraction limit should inform your choices but not dictate them absolutely. There are many valid reasons to shoot past the diffraction-limited aperture. Landscape photography often requires f/16 or f/22 for sufficient depth of field, and the sharpness gained from having the entire scene in focus outweighs the resolution lost to diffraction. Macro photography frequently requires f/16 to f/22 because depth of field at close focusing distances is extremely shallow. Architectural photography benefits from small apertures for front-to-back sharpness. The key is understanding the tradeoff: you are sacrificing some resolution for greater depth of field. For images that will be viewed at normal sizes on screens or in moderate prints, the diffraction softening at f/16 is rarely noticeable. For large prints or heavy cropping, staying near the diffraction limit becomes more important.
How does sensor size affect diffraction sensitivity?
Sensor size affects diffraction sensitivity indirectly through its relationship with pixel pitch. A smaller sensor with the same megapixel count has smaller pixels and therefore becomes diffraction limited at wider apertures. A 24MP Micro Four Thirds sensor has roughly 3.3-micrometer pixels and hits the diffraction limit around f/5.6, while a 24MP full-frame sensor has 6-micrometer pixels and reaches the limit around f/11. However, when comparing images at the same final output size, smaller sensors require less magnification per pixel, partially offsetting the diffraction penalty. The net effect is that smaller sensors are still more practically limited by diffraction but not as severely as raw pixel-level analysis suggests. Medium format sensors with large pixel pitches enjoy the most headroom, with some 50MP medium format cameras staying diffraction-free up to f/14 or beyond.
Can I correct diffraction softening in post-processing?
Diffraction softening cannot be fully corrected in post-processing because the fine detail information is physically lost when the Airy disk spreads light across multiple pixels. However, moderate sharpening and deconvolution algorithms can partially compensate for mild diffraction effects. Software like Topaz Sharpen AI, DxO PhotoLab, and Adobe Camera Raw can recover some apparent sharpness from diffraction-softened images. These tools work best when the diffraction is mild, up to about one stop past the limit. Beyond that, sharpening creates artifacts rather than recovering genuine detail. Some cameras apply in-camera diffraction correction for JPEG output, using the known lens aperture to apply appropriate deconvolution. For optimal results, capture the sharpest possible image in camera and use software corrections only as a supplement, not a replacement for proper aperture selection.
How does wavelength of light affect diffraction calculations?
The wavelength of light directly affects the size of the Airy disk according to the formula: diameter = 2.44 times wavelength times f-number. Green light at 550nm is typically used for calculations because human vision is most sensitive to green and most camera sensors have the highest green pixel count in their Bayer pattern. Blue light at 450nm produces a smaller Airy disk (approximately 18% smaller than green), meaning blue channels in your image remain sharp at slightly smaller apertures. Red light at 650nm produces a larger Airy disk (approximately 18% larger than green), making the red channel more susceptible to diffraction. In practice, this means images with predominantly blue subjects like sky and water retain sharpness slightly better at small apertures than images with predominantly red subjects. Infrared photography at 800nm or beyond is especially affected by diffraction.
References
Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy