This calculator finds the ideal wire size to do three-wire measurement of thread pitch.
The formula is G = .57725/n where G is the ideal wire diameter and n is the number of thread per inch.
Geometry of a 60-Degree Thread: The best wire size is based on the pitch diameter of the thread and the geometry of the thread profile. The constant 0.57735 comes from tan(30°) = 1/√3, which relates to the thread’s flank angles.
Threads Per Inch: TPI
Best Wire Size: inches