Understanding Fly Vision — A Practical Breakdown
Flies have two large compound eyes that make up most of their head. Each compound eye contains between 500 and 10,000 individual optical units called ommatidia, depending on the species. That is the short answer to how many eyes does a fly have in terms of the main visual organs people are asking about. On top of those two compound eyes, many flies also have three small simple eyes called ocelli arranged in a triangle between the compound eyes. So technically you could say a fly has five eyes total, though the ocelli contribute very little to image formation. They are mostly light sensors for detecting changes in brightness and helping with flight stability. The compound eyes do the real work. I spent a while trying to film fruit flies at high speed back when I was setting up a lab for a thesis project. I kept getting frustrated because my macro lens couldn't resolve individual ommatidia no matter what I did. The issue turned out to be working distance and depth of field, not magnification. With a 100mm macro lens at f/16, I could see the individual facets clearly, but only if the fly was restrained properly. A freely walking fly moves too fast and its eye is curved, so you lose focus across most of the surface. I ended up using a tiny drop of CO2 to slow them down for a few seconds, which is standard practice and doesn't harm the insect if you are careful.
What the Ommatidia Actually Do
Each ommatidium is essentially a separate photoreceptor unit with its own corneal lens and a cluster of receptor cells underneath. The brain stitches all those individual inputs together into a mosaic image. Flies see the world as a low-resolution grid, but they process motion incredibly fast. Their compound eyes can detect changes in the order of milliseconds, which is why it is nearly impossible to swat one. Humans operate at around 60 frames per second visually, while houseflies can process something closer to 250 frames per second. That temporal resolution is more important than the spatial resolution when you are thinking about how they navigate. The number of ommatidia varies significantly across species. A horse fly might have 30,000 ommatidia per eye, while a smaller housefly sits closer to 4,000. Males of some species have larger eyes with more ommatidia because they need better vision to spot females in flight. That sexual dimorphism is worth noting if you are doing comparative work and not just looking for a single number.
Limitations of Fly Vision
Compound eyes have real constraints. They struggle with detail at close range because each ommatidium samples a fixed angular region. There is no central fovea like in human vision where you can shift focus and get high resolution. The color range is also different, generally extending further into the ultraviolet spectrum. What looks like a plain yellow flower to us can have dark ultraviolet patterns that are obvious to a fly. This matters when you are studying pollinator behavior or designing traps, because UV-reflective materials attract flies more effectively than materials that only look bright to human eyes. One thing people often miss is that the ocelli are not fully blind. They do form crude images, but only from the very center of their visual field and with very low resolution. If you are trying to use ocelli activity as a proxy for something in a neuroscience experiment, you need to account for the fact that they respond primarily to overall light intensity rather than pattern or motion. I learned that the hard way after I confused ocellar responses with optic lobe responses in a dissection and my data made no sense for about two weeks.
Get the Full Details

When the Numbers Get Messy
If you are counting eyes for a biology assignment, two compound eyes plus three ocelli is the standard answer for most common flies. But some species deviate. Male crane flies have eyes that barely touch at the top of the head, while females of the same species have eyes that meet in the middle. In those cases, the total eye count is still two compound eyes, but the geometry is different enough that it matters for species identification. There are also parasitic flies and some early-instar larvae where the eyes are reduced or absent entirely. The takeaway is that "how many eyes does a fly have" has a straightforward answer for everyday purposes, but the details get complicated fast if you actually need to work with the biology rather than just quoting a number.