Free calculatorLive resultsSteps and sourcesEmbed on your site, free

Distance Calculator

Distance and Midpoint Between Two Points works out Distance and Euclidean distance from x₁, y₁ and x₂. The default figures on this page give distance of 5.000000; change any entry and the result, the working and the sources update together.

Distance
5.000000
Distance and Midpoint Between Two Points
Euclidean distance
5.000000
Manhattan distance
7.000000
Chebyshev distance
4.000000
Minkowski distance
4.497941
Distance squared
25.000000
Δx (run)
3
Δy (rise)
4
Midpoint x
1.5
Midpoint y
2
Midpoint
(1.5, 2)
Slope of the segment
1.333333
Direction angle
53.1301 deg
Direction angle
0.927295 rad
Dimensions
2
Formula used
d = √(Δx² + Δy²)
Worked out from Euclid, Elements, Book I, Proposition 47 (Pythagorean theorem) — basis of the distance formula and 2 other sources.

Your figures

Updates as you type
x coordinate of the first point.
Supply z₁ and z₂ to work in three dimensions.
Only used when the metric is Minkowski. p = 1 gives Manhattan, p = 2 gives Euclidean.

How this is worked out

6 steps
  1. Δx = 3 − 0 = 3; Δy = 4 − 0 = 4
  2. d = √(Δx² + Δy²)
  3. d² = (3)² + (4)² = 25
  4. d = √25 = 5
  5. Midpoint = (1.5, 2)
  6. Slope of the segment = Δy / Δx = 4 / 3 = 1.3333333333

Its 4 worked examples are re-run on every release, last on 15 September 2026. What changed

Sources and references

3 sources

What the Distance and Midpoint Between Two Points calculates

Computes the distance and midpoint between two points in the Cartesian plane or in 3D space, using the Euclidean, Manhattan, Chebyshev or Minkowski metric.

How to use this Distance and Midpoint Between Two Points

Enter x₁, y₁, x₂ and y₂. Distance updates as you type, and “Use a worked example” loads checked figures you can adjust. Change one figure at a time to see what drives the result.

How the result is worked out

Open “How this is worked out” beside the result for the step-by-step calculation behind Distance, Euclidean distance and Manhattan distance.

The method follows Euclid, Elements, Book I, Proposition 47 (Pythagorean theorem) — basis of the distance formula, NIST Dictionary of Algorithms and Data Structures — Manhattan distance, Chebyshev distance and Weisstein, Eric W. "Distance." MathWorld — Minkowski / L^p metric.

3-4-5 right triangle: (0,0) to (3,4) example

With x₁: 0, y₁: 0, x₂: 3, y₂: 4, the calculator returns Distance: 5, Midpoint x: 1.5, Midpoint y: 2. This example is checked against an independent source in the test suite.

What you can compare

Change one input at a time to see how it affects Distance, Euclidean distance and Manhattan distance. The inputs you can vary are x₁, y₁, x₂, y₂, z₁ (optional) and z₂ (optional).

Results are general information, not financial, tax, legal, medical or engineering advice. Check any decision that matters with a qualified professional.

Embed this calculator on your website

Copy this code into any page. The calculator appears with the figures currently entered, sizes itself to fit, and a small credit line links back here. Free, no account, no ads inside it, no tracking of your readers. Set your own figures and fixed fields; Personal removes the credit line, sets your colour and shows you which sites use it.

Preview

See something wrong? Report a problem with this calculator

Frequently asked questions

How can I calculate the distance between two locations?

Computes the distance and midpoint between two points in the Cartesian plane or in 3D space, using the Euclidean, Manhattan, Chebyshev or Minkowski metric. Open “How this is worked out” beside the result to see each step for your own figures.

How do I calculate distance?

It needs x₁, y₁, x₂, y₂, z₁ (optional) and z₂ (optional). Nothing else is required, and the figures stay in your browser.

How can I calculate the distance between two cities?

The result gives Distance, Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance and Distance squared, each labelled with its unit so the figure can be read on its own.

Can I Measure a distance with my phone?

Computes the distance and midpoint between two points in the Cartesian plane or in 3D space, using the Euclidean, Manhattan, Chebyshev or Minkowski metric. On the figures this page opens with — x₁ 0, y₁ 0 and x₂ 3 — the distance is 5. Put your own figures in their place and the working updates beside the result.

What information do I need for the Distance and Midpoint Between Two Points?

You need x₁, y₁, x₂, y₂, z₁ (optional), z₂ (optional), Distance metric and Minkowski order p. The page opens with default figures that give distance of 5.000000, so you can see the scale before entering your own.

What does this Distance and Midpoint Between Two Points show?

It shows Distance, Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, Distance squared, Δx (run) and Δy (rise), with the working and any warnings for your entries.

Related calculators

View all related calculators11 more