Another way to get a more accurate pitch measurement is to measure from one edge of the pin/hole to the same edge of the next pin/hole. Lining up to edges is easier than trying to eyeball a center position. A lot of connector pitches are going to be either a nice round metric measurement (0.5, 0.7, 1, 1.5, 2, 2.5, etc) or a multiple or half-multiple of 100mil/2.54mm, although there are some popular oddball sizes like 3.96mm.