Autofocus is one of the quiet revolutions of modern photography. Half-press the shutter on a contemporary mirrorless camera and it can find a face, lock onto an eye, and track a moving subject in a fraction of a second — fast enough that manual focusing feels almost nostalgic. The engine behind most of that speed is phase detection autofocus, or PDAF.

PDAF is the same family of technology at work in DSLRs, mirrorless bodies, and the smartphone in your pocket. It is faster than older focusing methods because it does not hunt for a sharp picture — it measures where the light is falling and works out the correct focus in a single step. Here is how that trick actually works.
The contrast-detection problem
To appreciate phase detection, it helps to understand what it replaced. Early digital cameras relied on contrast detection autofocus (CDAF). The camera reads the image straight off the sensor and measures the difference in brightness between adjacent pixels — contrast. A sharp, in-focus image has high contrast at its edges; an out-of-focus one looks soft and flat.
CDAF moves the lens and repeatedly re-checks the contrast, nudging back and forth until it finds the peak. The method is accurate and inexpensive, but it has a fundamental weakness: it cannot tell in advance which direction to move, or how far. It must search. That “hunting” is slow, and it is especially awkward for moving subjects and for video, where you can see the image wobble as the camera re-focuses.
How phase detection measures focus
Phase detection takes a completely different approach. Instead of judging how sharp the image looks, it splits the incoming light into two separate beams and compares where they land. This is the same principle as a classic optical rangefinder, and it is similar to the split-prism focusing aids found in old film SLRs.
When the subject is in focus, light rays coming through opposite sides of the lens converge on the same point, and the two split images line up. When the subject is out of focus, the rays arrive at slightly different positions, and the two images are offset from each other. The camera measures that offset — the “phase difference” — and, crucially, the direction and size of the offset tell it exactly which way to move the lens and by how much. One measurement replaces an entire hunting sequence, which is why PDAF is dramatically faster.
From DSLR mirrors to on-sensor pixels
In a DSLR, phase detection happens in a dedicated module. Light travels to the optical viewfinder, and a small sub-mirror diverts some of it down to an autofocus sensor lined with pairs of photodiodes. This design dates back to the early autofocus SLRs — the Minolta Maxxum 7000 of 1985 is widely credited as the first. For decades, that separate AF sensor was how most serious cameras focused.
Mirrorless cameras and phones have no mirror to divert light, so phase detection had to move onto the imaging sensor itself. Manufacturers do this in two main ways. One is to reserve certain pixels purely for phase detection, masking part of their light. The other, more elegant approach splits each pixel into two. Canon’s Dual Pixel CMOS AF, introduced with the EOS 70D in 2013, divides every pixel into two photodiodes under a single microlens, giving phase detection across essentially the whole frame. Sony takes a related route, embedding dedicated phase-detection points directly on its Exmor sensors.

Most modern cameras then run a hybrid system: PDAF for fast, decisive movement, with a final contrast-detection pass to fine-tune accuracy.
Where PDAF shines — and where it stumbles
Phase detection’s biggest advantage is continuous focus on moving subjects. Because it knows direction and distance, a camera can track a runner, a bird in flight, or a face moving through the frame and keep it sharp — which is also why modern video autofocus has become so dependable.
It is not magic, though. PDAF needs something to measure, so it can struggle on flat, featureless scenes — a blank wall or an empty sky — where there is no edge from which to detect a phase shift. Dual-pixel systems that split pixels horizontally are more sensitive to vertical edges than to horizontal ones. And at small apertures, diffraction softens the light enough that phase information weakens, which is one reason cameras fall back to contrast detection in dim conditions or at f/11 and beyond.
Conclusion
Phase detection autofocus turns focusing from a guessing game into a measurement. By splitting light and comparing the two resulting images, a camera can compute focus in a single step — and that is the difference between a lens that hunts and a lens that locks on instantly. The next time your camera snaps onto a subject before you even finish pressing the shutter, you will know the optics making it happen.
FAQ
What is the difference between phase detection and contrast detection autofocus?
Contrast detection moves the lens and looks for maximum contrast, which requires searching. Phase detection splits the light and measures an offset between two images, giving focus direction and distance in one step — so it is much faster.
Do smartphone cameras use phase detection?
Yes. Most modern phones use on-sensor phase detection, often combined with contrast detection and computational techniques, to focus quickly. Many flagships also use dual-pixel or similar split-pixel designs.
Why does my camera still hunt for focus in low light?
In dim conditions there is less light for the phase-detection sensor to work with, and on flat or featureless subjects there is little edge detail to measure. Cameras then fall back to contrast detection or slower strategies, which can cause hunting.
Is phase detection better than contrast detection?
For speed and for tracking moving subjects, yes. Contrast detection remains useful for accuracy and for still scenes, which is why many cameras use a hybrid of both.