Here's a guide from one of the online glasses sellers:
http://www.zennioptical.com/measuring-pd-infographic
They sent me a free PD ruler (it has a slit in the middle so you can see your pupils and a notch in the middle to center it on your nose) with my glasses, but I just used a standard ruler the first time I measured, and got the same measurement when my glasses arrived and I used their ruler. I was off by 1 mm in one eye when I compared to my eye doctor's measurements. For my prescription, that's not very significant, but it might be for a stronger prescription.
You can buy a PD ruler for a dollar or two from eBay if you don't want to use a standard ruler.