Loading…

Distance Between Points Calculator

Math Geometry • Coordinate Geometry

View all topics

Compute the Euclidean distance between two points in 2D or 3D: \(d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\)

Inputs accept 1e-3, pi, e, sqrt(2), sin(), cos(), tan(), ln(), log(), abs(). Use * for multiplication.

Point A
Point B
Display options

Diagram controls: wheel/trackpad to zoom • drag to pan (2D) • in 3D: drag to rotate, hold Shift/Alt (or right-drag) to pan • touch: 1-finger rotate, 2-finger pan, pinch to zoom • “Reset view” restores fit.

Ready
Enter two points and click Calculate.
Point diagram (pan/zoom enabled)

Tip: in 3D mode, rotate the view to clearly see separation along the \(z\) direction.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is the distance formula between two points in 2D?

For A(x1, y1) and B(x2, y2), the Euclidean distance is d = sqrt((x2 - x1)^2 + (y2 - y1)^2). It comes from the Pythagorean theorem using the horizontal and vertical differences.

How do you calculate distance between two points in 3D?

For A(x1, y1, z1) and B(x2, y2, z2), compute dx = x2 - x1, dy = y2 - y1, dz = z2 - z1, then d = sqrt(dx^2 + dy^2 + dz^2).

Can I use pi or scientific notation in the inputs?

Yes. Inputs accept entries like pi, sqrt(2), and 1e-3, and the calculator evaluates them before applying the distance formula.

Why is the distance always nonnegative?

The formula squares the coordinate differences and then takes a square root, so the result cannot be negative. The distance is 0 only when the two points are identical.

What units is the distance reported in?

The distance uses the same units as your coordinates. If x, y, and z are measured in meters, the computed distance is in meters as well.