# Calculate the distance between two points on Earth using Javascript

# The distance on a plane

Given the X and Y position on a flat plane we can calculate the distance between two points using the Pythagorean theorem.

Given the X and Y position on a flat plane we can calculate the distance between two points using the Pythagorean theorem.