Math

Distance Formula Calculator

Calculate distance between two points and their midpoint in 2D space.

CALCULATOR

Enter your numbers

Instant results
5.0000
Distance
(2.5, 4)
Midpoint
Point 1: (1, 2)
Point 2: (4, 6)
Δx = 4 - 1 = 3
Δy = 6 - 2 = 4
d = √((Δx)² + (Δy)²) = √(3² + 4²) = √(9 + 16)
d = 5.0000
Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2)
Midpoint = ((1+4)/2, (2+6)/2) = (2.5, 4)

THE NUMORIX GUIDE

How to use the Distance Formula Calculator

Last reviewed September 14, 2026

What this calculator does

For points (x1,y1) and (x2,y2), calculate dx=x2-x1 and dy=y2-y1, distance=sqrt(dx^2+dy^2), and midpoint=((x1+x2)/2,(y1+y2)/2).

Formula and method

For points (x1,y1) and (x2,y2), calculate dx=x2-x1 and dy=y2-y1, distance=sqrt(dx^2+dy^2), and midpoint=((x1+x2)/2,(y1+y2)/2).

Variables and inputs

The default points are (1,2) and (4,6). Coordinates are numeric and unitless unless they represent a physical coordinate system.

Worked example

For (1,2) and (4,6): dx=3, dy=4; distance=sqrt(3^2+4^2)=5; midpoint=((1+4)/2,(2+6)/2)=(2.5,4).

How to interpret the result

Distance is the shortest straight-line separation in the coordinate plane; the midpoint is halfway along the segment joining the points.

Common mistakes to avoid

Do not subtract x from y, and keep the coordinate pairing intact. The midpoint averages corresponding coordinates, not all four values together.

Assumptions and limitations

This is a two-dimensional Euclidean formula. It does not model curved surfaces, weighted coordinates, or distances in three or more dimensions.

Practical use and checks

The Distance Formula Calculator measures the straight-line separation between two points and also returns their midpoint. Enter (1, 2) and (4, 6) as a check; delta x is 3, delta y is 4, distance is 5, and midpoint is (2.5, 4). The 3-4-5 result makes the square-and-square-root step easy to audit. Use the distance for a map coordinate, geometry problem, or two-dimensional displacement, and use the midpoint when locating the center of a segment. The formula assumes a flat Cartesian coordinate system with a common scale on both axes. If one axis represents dollars and the other represents hours, the arithmetic still returns a number but it is not a physical distance without a meaningful scaling convention. The result is always nonnegative, and reversing the two points should leave it unchanged. The calculator does not account for roads, obstacles, elevation, curved surfaces, latitude and longitude, or a weighted distance metric. Coordinates that are close together can show rounding effects, while very large coordinates can lose floating-point precision. For a route or geographic decision, treat this as straight-line geometry and use a domain-specific distance method when the coordinate system or travel path makes Euclidean distance inappropriate.

Sources and references

COMMON QUESTIONS

Frequently asked questions

What if the points are identical?

Both differences are zero, so distance is zero and the midpoint is that same point.

What units does the distance have?

It has the same unit as the coordinate values, provided both coordinate axes use compatible units.