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

Metric socket button head diameter