THE VERY EPIC PING CALCULATOR
by PKFreeZZy
50km/31mi = ~1.4ms
Ping (ms) = flying distance ÷ 50 or 31 * 1.4
e.g. The distance between your and your opponent's ISP is 823km/511mi
823km ÷ 50km * 1.4 = 16.46 * 1.4 = 23.044ms
511mi ÷ 31mi * 1.4 = 16.48 * 1.4 = 23.077ms
Result: http://www.speedtest.net/my-result/5872632585
Sites used: http://distancecalculator.net and http://speedtest.net
Assuming you have good internet this is pretty accurate.
Elements that affect ping: seas, ISP-to-ISP connection, Wi-Fi, internet quality
Note: If you're playing someone overseas you are probably connected by ground distance, not flying distance, resulting in higher ping.