The following formula is used for finding the distance between any two points on a plane. It is a simple Pythagorean Theorem calculation, as you can see on the image on the left. The points A (-3,-2) and C (1,4) are two of the corners of a right triangle, which hypotenuse is in fact the distance between the points. So if we know the length of the legs of the triangle, we can easily calculate its hypotenuse, or the distance between the points, by using the formula of Pythagoras – a^{2}+b^{2} = c^{2}. We can easily see the length of the legs, because the are already measured by the Cartesian coordinate system. In our case AB = 4 and BC = 5. So the only thing we should do now is to replace the letters with the numbers and make the following calculations:

AB^{2} + BC^{2} = AC^{2}

4^{2} + 5^{2} = AC^{2}

16 + 15 = AC^{2}

AC = √ 31

AC = 5.5678

If we need a formula directly for AC (the distance), we can express the Pythagorean equation this way:

AC = √ BC^{2} + AB^{2}

But as we see, we can express BC and AB using the coordinates of the points:

AB = x2-x1 = 1 – (-3) = 1 + 3 = 4

BC = y2-y1 = 3 – (-2) = 2 + 3 = 5

So finally, we can write the distance formula directly like this:

Using the following calculator, you can find the distance between any two points on a Cartesian Coordinate System. The only thing you need to know is their coordinates. Just type them in the appropriate fields and click on the button. You will see below the distance between the points with the entered coordinates.

In the previous post ( here: distance-formula.net ) we went through the theory about the euclidean distance between any 2 points on a 2D euclidean plane. This article is about finding the distance between 2 points on a 3d plane.

So let’s get straight on the matter. Things here are pretty much the same, with the slight difference that this time we need to include the third co-ordinate of each point – **Z**. The formula looks like this:

In this formula:

D – this is the distance between the points

x1, y1, z1 – these are the three co-ordinates of the first point – A

x2, y2, z2 – these are the thee co-ordinates of the second point – B

The square root of the sum the Δx, Δy and Δz is actually the distance between the two points.

## Calculator

This below is a simple calculator, which can do the calculations from above for you and make your life easier. It’s very easy and intuitive to use. Simply type the three co-ordinates of your two points and hit the button ‘Calculate the Distance’. You will instantly see the result (in blue) in the box below the button.

I hope you like this tool and it’s useful for you. If it’s really so, please share it with friends using the social buttons. This way you will also help us a little. Thanks in advance!

Here is a simple distance formula calculator, which uses Javascript to calculate the euclidean distance between 2 random points. It is a simple calculation, for which you only need the coordinates of the points.

Because this script, no matter how simple it is, wasn’t created by me, here is some information about the author:

Original: Jay Kimmel (jaykimmel@bigplanet.com)

Web Site: http://www.jkimmel.com –>

<script language=”javascript” type=”text/javascript”>

<!– Begin

function distance(form) {

var x1 = eval(form.x1.value);

var y1 = eval(form.y1.value);

var x2 = eval(form.x2.value);

var y2 = eval(form.y2.value);

var xdiff = x2 – x1;

var ydiff = y2 – y1;

form.answer.value = Math.pow((xdiff * xdiff + ydiff * ydiff), 0.5);

}

// End –>

</script>

You can use the script on your site or sites with no limitation. If you do so, please refer to this site and the site of the author. Fair play is something that gives back.

Here below you can see this code working. If you have any questions about this distance calculator, or about the installation of the script, please do not hesitate to contact me. I will do my best to answer them. This is from me, for now. I hope this thing will be useful for someone. If you like it, you can also share it with friends using the social buttons on your left. Thanks!

### Distance calculator

Simply enter the coordinates of the points, between which you want to find the distance. Then click on ‘Calculate’.

More about this calculation (some theory) you can find here: http://distance-formula.net