Socket flat head diameter is measured on the outside of the threads.

Socket flat head diameter

Diameter and Thread count