↑

Free Distance Calculator

What this tool does

The Distance Calculator finds the distance between any two points instantly. Enter the coordinates of point 1 and point 2 to see the straight-line distance using the Pythagoras formula, the midpoint between them, and the slope of the line through both points. The working is shown step by step, and negative or decimal coordinates work fine. Perfect for geometry homework, maps, physics and graphics. Free and private. Works anywhere.

Point 1 (x1, y1)
Point 2 (x2, y2)
Distance uses the Pythagoras formula sqrt((x2 - x1)^2 + (y2 - y1)^2). Negative and decimal coordinates are fine.
-
Distance
-
Midpoint
-
Slope
Details

Let us know

Please share your experience with this tool.

Thanks for rating!
No ratings yet — be the first!

How do I use the distance calculator?

Enter the coordinates of two points — x1, y1 and x2, y2 — and the distance, midpoint and slope appear instantly. The defaults (1, 2) and (4, 6) give a distance of 5, a midpoint of (2.5, 4) and a slope of 1.333333. Press Sample for (-2, 3) to (4, -5): distance 10, midpoint (1, -1), slope -1.333333. The details show dx, dy and every step of the working.

What is the distance formula?

The distance between two points comes from Pythagoras' theorem. The horizontal gap dx=x2 - x1 and the vertical gap dy=y2 - y1 form the two shorter sides of a right triangle, and the distance is the hypotenuse: sqrt(dx^2 + dy^2). For (1, 2) to (4, 6): dx=3, dy=4, so the distance is sqrt(9 + 16)=sqrt(25)=5 — the classic 3-4-5 triangle.

How do you find the midpoint?

The midpoint is the point exactly halfway between the two points. Average the x-coordinates and average the y-coordinates: ((x1 + x2)/2, (y1 + y2)/2). For (1, 2) and (4, 6) that is ((1 + 4)/2, (2 + 6)/2)=(2.5, 4). The midpoint is the same distance from both endpoints, which makes it useful for finding the centre of a segment, a circle's diameter endpoints, or a meeting point.

What is the slope between two points?

The slope measures how steep the line through the points is: slope=dy/dx=(y2 - y1)/(x2 - x1) — rise over run. A positive slope climbs to the right, a negative slope falls, and zero is flat. If dx=0 the line is vertical and the slope is undefined, which the tool reports honestly instead of dividing by zero. Slope is the “m” in the line equation y=mx + c.

What is the distance formula used for?

Geometry and coordinate problems, map and GPS distances on flat grids, physics (displacement between two positions), computer graphics and game development (how far apart two objects are), robotics, and anywhere positions are given as coordinates. The midpoint and slope complete the picture: together they describe where the segment is, where its centre is, and which way it points.

Is it free and private?

Yes. The distance calculator is completely free, needs no sign-up, and runs entirely in your browser. Your numbers are never uploaded to a server. It works on phones, tablets and desktop computers.

FAQs

What is the distance between (1, 2) and (4, 6)?

5 units. dx=3 and dy=4, so sqrt(3^2 + 4^2)=sqrt(25)=5.

What is the midpoint formula?

Average the coordinates: ((x1 + x2)/2, (y1 + y2)/2). For (1, 2) and (4, 6) the midpoint is (2.5, 4).

How do I find the slope between two points?

Slope=(y2 - y1)/(x2 - x1), the rise over the run. For (1, 2) to (4, 6): (6 - 2)/(4 - 1)=4/3=1.333333.

What does a negative slope mean?

The line falls as x increases — it goes downhill to the right. The sample (-2, 3) to (4, -5) has slope -1.333333.

Can I use negative coordinates?

Yes. Negative and decimal coordinates work fine; the formula squares the differences, so signs do not affect the distance.

Is it free?

Yes, completely free with no sign-up. Everything runs in your browser.


Author

Awais Arshad

Web Tools Developer & Content Creator at FastToolKit.