anındahesapla

Distance between two points calculator

Finds the distance and midpoint between two points on a plane from their coordinates.

· Updated:

WhatsApp X Facebook

Distance between two points: 5. The points (1, 2) and (4, 6) lie 5 units apart. The horizontal gap is 3, the vertical gap is 4, and the midpoint sits at (2.5, 4).

Maths students, teachers, game developers, designers and anyone working with coordinates use this calculator.

A right triangle hides in every pair of points.

Results appear instantly, and no sign-up is needed to use the tool.

Free.

Result

5 units

Distance between two points: 5

How the distance is found

Two points form a right triangle.

The gaps are its legs.

The horizontal and vertical gaps are the legs, and the straight-line distance is the hypotenuse, so the square root of the sum of their squares gives √(3² + 4²) = 5 in the example, the familiar three-four-five triangle.

Order does not matter.

Squares remove signs.

The midpoint is an average.

Adding the two x values and halving them gives the midpoint's x, and the same for y, which is why the example's midpoint lands at (2.5, 4), exactly halfway along the line joining the points.

Units follow the input.

Metres in, metres out.

Map grids and screen pixels both work. The calculator treats them the same.

Quick rule: square both gaps, add them, take the root.

Games use this formula all the time, often without players noticing.

Checking whether an enemy is within range, whether two objects collide or how far a player has moved all come down to this formula, often run thousands of times each second in a game loop.

Three dimensions add a z term.

The same square-root idea extends to space.

Graphic designers use the same calculation to space elements evenly on a page, and robotics and drone software use it to measure how far a device is from a target on a flat floor or field.

Architects check distances between points on a floor plan the same way.

Results appear instantly, and the midpoint is shown alongside the distance.

No sign-up is needed.

School geometry problems often ask whether a triangle is right-angled, and calculating the three side lengths from the corner coordinates with this tool lets students test the Pythagorean relationship directly.

Distances also help classify triangles as equilateral or isosceles.

Calculation steps

Formula: d = √((x₂ − x₁)² + (y₂ − y₁)²).

  1. Enter x₁ and y₁ for the first point.
  2. Enter x₂ and y₂ for the second point.
  3. Read the distance, gaps and midpoint.
Input or resultValue
x₁, y₁1, 2
x₂, y₂4, 6
Horizontal and vertical gap3, 4
Midpoint(2.5, 4)
Distance5 units

Units follow your input.

For map coordinates in latitude and longitude, use a dedicated geographic distance tool instead, since this formula assumes a flat plane and the curvature of the Earth makes its result increasingly wrong over long distances.

Frequently Asked Questions

What is the distance between (1, 2) and (4, 6)?
5.
What is the midpoint?
(2.5, 4).
Does point order matter?
No.
Can I use latitude and longitude?
Not over long distances.
What units does the result use?
The same units as your coordinates, such as metres or pixels.