How to measure pedal axle/spindle size?
They're standardized between different types of cranksets. 

One piece cranksets use 1/2" x 20 tpi. Three piece cranksets (most bikes) use 9/16" x 20 tpi. Old French things use something else, but these are rare (and instead of being marked with R and L for which pedal is which on the spindle, it will be D and G).

If you want, you can measure it like any other bolt. Or, take the pedals to a bike shop and compare them to another pedal. 

You find one piece cranksets on some BSO's (i.e. bikes you get from places like Walmart), children's bikes and very old American bikes. Otherwise, you should have a 3 piece crankset and use a 9/16".