Socket cap diameter is measured on the outside of the threads.

Socket cap diameter

Diameter and Thread count