The best way to figure out your pupillary distance (PD) is to visit an optician who can measure it precisely.
The second best way is to wear the eyeglass frames that you want to have fitted with your prescription. Wear them so they're positioned comfortably. (Don't sit them too far up or too far down on your nose). Have a friend stand an arms length away, and as you look at your friend, have them mark the lens where your pupils are. A Sharpie or Chinese marker work best. You can even use a dark color crayon. Remove the glasses, and use a ruler to measure the distance between the pupils. Better yet, send the marked up frames to us and your eyeglasses can be made according to those markers.
If you want to buy the frames without trying them first, you can determine your pd with a ruler and a friend, or a ruler and a mirror.
Line up the end of a ruler to one pupil, and measure the distance in millimeters to the other pupil.