Quick answer
The distance between points is d = √((x₂ − x₁)² + (y₂ − y₁)²). From (0, 0) to (3, 4) it is 5, with a midpoint at (1.5, 2).
Enter the coordinates of two points. The calculator returns the distance and the midpoint.
Related tools: Euclidean Distance Calculator: Distance between two points with any number of coordinates. Area Calculator: Area of common two-dimensional shapes. Right Triangle Calculator: Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
How to use the Distance Between Two Points Calculator
- Enter x₁.
- Enter y₁.
- Enter x₂.
- Enter y₂.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| x₁ | A number | — |
| y₁ | A number | — |
| x₂ | A number | — |
| y₂ | A number | — |
Formula and method
Formula
d = √((x₂ − x₁)² + (y₂ − y₁)²)
IEEE-754 double precision; shown to at most 6 decimal places.
Euclidean distance; midpoint is the average of coordinates.
Worked examples
This example is verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: x₁ = 0; y₁ = 0; x₂ = 3; y₂ = 4.
| Result | Value |
|---|---|
| Distance | 5 |
| Midpoint | (1.5, 2) |
The first line is the headline result (distance). Below it the distance Between Two Points Calculator lists midpoint, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
The distance formula
It is the Pythagorean theorem on the horizontal and vertical differences: 3² + 4² = 25. Identical points give distance 0.
Midpoint
The midpoint is the average of the coordinates: ((0 + 3) ÷ 2, (0 + 4) ÷ 2) = (1.5, 2). Use the Endpoint calculator to find the other end from a midpoint.
How the result changes with x₂
Holding every other input at the first worked example, this table changes only x₂. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| x₂ | Distance | Midpoint |
|---|---|---|
| 1.5 | 4.272002 | (0.75, 2) |
| 3 | 5 | (1.5, 2) |
| 6 | 7.211103 | (3, 2) |
| 12 | 12.649111 | (6, 2) |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- x₁: entering "a" shows "x₁ must be a number." beside that field and no result.
Choosing between the Distance Between Two Points Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Euclidean Distance Calculator](/math/euclidean-distance/) | point A and point B | Distance |
| [Area Calculator](/math/area-calculator/) | shape and a | Area |
| [Right Triangle Calculator](/math/right-triangle-calculator/) | leg a and leg b | Hypotenuse c |
| [Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/) | find, leg a and other side | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Identical points give distance 0
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for x₁ to confirm this.
Frequently asked questions
What is the distance from (1, 1) to (4, 5)?
From (1, 1) to (4, 5): √(3² + 4²) = 5.
Does the order matter?
No. Distance is the same in either direction because the differences are squared.
How about 3D points?
Use the Euclidean Distance calculator.
What does the Distance Between Two Points Calculator calculate?
Straight-line distance and midpoint between two points in the plane. It returns Distance and Midpoint.
What formula does the Distance Between Two Points Calculator use?
d = √((x₂ − x₁)² + (y₂ − y₁)²). Euclidean distance; midpoint is the average of coordinates.
What do I need to enter in the distance Between Two Points Calculator?
You enter x₁, y₁, x₂ and y₂.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Identical points give distance 0.
What is an example of a distance Between Two Points result?
With x₁ 0, y₁ 0, x₂ 3 and y₂ 4, the distance is 5.
Related calculators
- Euclidean Distance Calculator — Distance between two points with any number of coordinates.
- Area Calculator — Area of common two-dimensional shapes.
- Right Triangle Calculator — Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
- Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Circle Calculator — Radius, diameter, circumference and area of a circle from any one of them.
- Angle Between Two Vectors Calculator — Angle between two vectors.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.