The answer lies in a basic physics equation – one we would all have learned at school – and in the fact that the anatomy of a fly is rather springy.

Fly Anatomy

Flies have a stiff, tough outer skeleton of chitin in a protein-rich matrix. The chitin between the body segments and joints of the appendages allows the shock of impact to translate to movement of appendages about the joints. The fly is its own shock absorber.

It’s in the Physics Baby

So as we’ve seen the anatomy of flies is rather springy, but the main reasons they survive are matters of scale. Although flies fly at huge speeds relative to their size, their actual air speed seldom attains 3 metres per second, and is usually nearer 1 metre per second.

Now to the physics :

Given that kinetic energy is : 0.5 multiplied by mass multiplied by velocity-squared
OR more familiarlyE = \frac{1}{2} mv^2

…the amount of energy per milligram of fly is tiny. In hitting a glass pane, it will barely bend its own bouncy bristles.

The Power of Splat!

However hitting a moving sheet of glass is a different matter.

At modest motorway speeds, a car windscreen travels more than 30 times faster than a dawdling fly. The resulting squared velocity inserted into the equation above means that the imparted energy is perhaps 1000 times as great. The fly is of negligible mass relative to the car, so essentially it absorbs all that energy ending in the windscreen bearing a red streak where the fly once was. If you suck a fly into a vacuum cleaner you may find a similar souvenir inside.