Midpoint Calculator
Find the midpoint between two points in 2D or 3D, the distance between them and the gradient, or find a missing endpoint, with the working.
Reviewed by Dany, RightSums team · Updated
Runs in your browser. Free, no sign-up.
maths · Daily life · UK & US
Enter the coordinates of two points and the calculator finds the midpoint by averaging each pair of coordinates. It also gives the distance between the points, using Pythagoras, and in 2D the gradient (slope) of the line through them. Switch to 3D to add z coordinates. The distance is shown exactly where possible, as a whole number or a simplified square root such as 6√2, and as a decimal to the number of places you choose. There is also a reverse mode: give one endpoint and the midpoint, and it finds the other endpoint. Coordinates can be negative, decimals or fractions such as 1/2, and the arithmetic is exact. Every step is shown so you can follow the method.
Accepted inputs
- Two points in 2D (x, y) or 3D (x, y, z)
- Or one endpoint and the midpoint
- Decimal places for the distance
Outputs
- Midpoint
- Missing endpoint
- Distance between the points (exact and decimal)
- Gradient (slope) in 2D
- Step-by-step working
How to use the Midpoint Calculator
- Enter the x and y coordinates of both points, or switch to 3D to add z.
- The midpoint is found by adding each pair of coordinates and dividing by 2.
- The distance uses Pythagoras: square the difference in each coordinate, add the squares and take the square root.
- In endpoint mode, each coordinate of the missing point is twice the midpoint minus the known endpoint.
Frequently asked questions
How do you find the midpoint of two points?
Add the x coordinates and halve the total, then do the same for the y coordinates. For (2, 3) and (8, 11): x = (2 + 8) ÷ 2 = 5 and y = (3 + 11) ÷ 2 = 7, so the midpoint is (5, 7).
How do you find the distance between two points?
Square the difference in x and the difference in y, add them and take the square root. From (2, 3) to (8, 11) the differences are 6 and 8, so the distance is √(36 + 64) = √100 = 10. From (−1, 2) to (4, −6) it is √89, about 9.4340.
How do you find the midpoint in 3D?
Average each of the three coordinates. For (1, 2, 3) and (5, 6, 7) the midpoint is (3, 4, 5). The distance adds a third square: √(4² + 4² + 4²) = √48 = 4√3, which is about 6.9282.
How do you find an endpoint from the midpoint?
Double each coordinate of the midpoint and subtract the known endpoint. If A is (2, 3) and the midpoint is (5, 7), then B = (2 × 5 − 2, 2 × 7 − 3) = (8, 11). You can check it by finding the midpoint of A and B.
What is the gradient of the line between two points?
The gradient is the change in y divided by the change in x. From (2, 3) to (8, 11) it is (11 − 3) ÷ (8 − 2) = 8 ÷ 6 = 4/3, about 1.33. If both x coordinates are equal, the line is vertical and the gradient is undefined.
Related tools
- Percentage Calculator
Work out X% of a number, what percentage one number is of another, percentage increase or decrease, and a discounted price.
- Average Calculator
Paste a list of numbers to get the mean, median, mode, range, count and sum, with the working, plus an optional weighted average.
- Fraction Calculator
Add, subtract, multiply and divide fractions and mixed numbers, then simplify and convert the answer to a mixed number, decimal and percentage.
- Percent Error Calculator
Work out the percent error between a measured value and the true value, with absolute and relative error, a signed option and the working.