Distance between two points calculator

Type x₁, y₁, x₂, y₂. Distance is √((x₂−x₁)²+(y₂−y₁)²). (0,0) and (3,4) give 5. (0,0) and (1,1) give 1.414214. (0,0) and (6,8) give 10.

The result is rounded to six places, not a trimmed decimal string. (0,0) and (1,1) show 1.414214, not raw √2.

Input data

Results

Enter data and click Calculate.

How it works

Distance between two points is the length of the segment. The calculator uses the root of (x₂−x₁)² + (y₂−y₁)², then rounds to six places with round(d×1e6)/1e6. (0,0) and (3,4) give a clean 5, the same 3-4-5 as Pythagoras.

The fields are x₁, y₁, x₂, y₂. The IDs stay a, b, c, d. (0,0) and (1,1) give 1.414214, √2 after the 1e6 round. (0,0) and (6,8) give 10, a doubled 3-4-5.

An empty field is read as 0. Leave x₁ and y₁ blank and you measure from the origin. A minus in a coordinate is a direction: (0,0) and (−3,−4) also give 5.

The midpoint of the same segment is on the neighbouring page. There the result is the text M = (x, y), not one number. Pythagoras from legs 3 and 4 also gives 5, with no axes.

The header units switch does not multiply anything. 0,0,3,4 stay 5 whatever the label says.

(0,0) and (3,4) give 5. (0,0) and (1,1) give 1.414214. (0,0) and (6,8) give 10.

Formula

d = √((x₂−x₁)² + (y₂−y₁)²), then rounding(d × 1e6) / 1e6

How to use

  1. Type x₁, y₁, x₂, y₂, for example 0, 0, 3, 4.
  2. Click Calculate. The distance is 5.
  3. (0,0) and (1,1) give 1.414214. (0,0) and (6,8) give 10.
  4. The result is after the 1e6 round, not the raw root.
  5. The midpoint of that segment lives on the neighbouring card.

(0,0) and (3,4) give 5

Distance is √((x₂−x₁)²+(y₂−y₁)²), then round(d×1e6)/1e6. (0,0) and (3,4) give 5. (0,0) and (1,1) give 1.414214.

Distance
The segment length. (0,0) and (3,4) give 5. (0,0) and (6,8) give 10.
points
Two points, four fields. x₁ y₁ and x₂ y₂. Empty is read as 0.
rounds
round(d×1e6)/1e6. (0,0) and (1,1) show 1.414214, not raw √2.

Examples

Example 1

  • (0, 0)
  • (3, 4)

5

What is the distance from (0,0) to (3,4)? 5. Same 3-4-5 as Pythagoras.

Example 2

  • (0, 0)
  • (1, 1)

1.414214

What is the distance from (0,0) to (1,1)? 1.414214. √2 after round(d×1e6)/1e6.

Example 3

  • (0, 0)
  • (6, 8)

10

What is the distance from (0,0) to (6,8)? 10. A doubled 3-4-5.

Related calculators

Common questions

What is it from (0,0) to (3,4)?

5. √(9+16) = 5. The 1e6 round leaves a clean 5.

What does distance between two points mean?

The segment length. √((x₂−x₁)²+(y₂−y₁)²). Then a round to six places.

What about (0,0) to (1,1)?

1.414214. That is √2 after rounding to six places, not the raw root.

What about (0,0) to (6,8)?

10. A doubled 3-4-5 triangle.

Does the result always have six decimals?

No. The calculator rounds to six places. 5 stays 5, not 5.000000.

What if a field is empty?

It is read as 0. Empty x₁ and y₁ mean the origin.

Does a minus in a coordinate work?

Yes. (0,0) and (−3,−4) also give 5.

Where is the midpoint?

On the midpoint card. There the text M = (x, y), not one number.

How is this different from Pythagoras?

Four coordinates here. Two legs there. With 3 and 4 the result is the same 5.

Does a comma in 1.5 work?

Yes. 1.5 and 1,5 are the same coordinate.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.