Distance and Midpoint Calculator

Find the distance and the midpoint between two points.









Enter both points, then press Calculate.

Distance and Midpoint Calculator: Find Distance and Midpoint Between Two Points

The first patio I ever laid out taught me what distance and midpoint really mean, and the Distance and Midpoint Calculator on CalcSolver is the tool I reach for now. I was marking out a small square patio on a scale plan, one unit on the paper standing for one meter on the ground, and I needed two posts put in exactly. The first post sat at (1, 2) and the second at (4, 6), and I wanted to know how far apart they were and where the middle post should go. I typed the two points into the calculator, and it said the posts were 5 meters apart, with the middle at (2.5, 4), and that one answer settled the whole layout. I have used the same idea ever since, on garden beds, on floor plans and on maps, because two points are all it takes to find a distance and a halfway point.

At a glance:

  • It takes two points, (x1, y1) and (x2, y2), and returns the distance and the midpoint.
  • Distance is √[(x2 − x1)² + (y2 − y1)²], the straight line between the two points.
  • Midpoint is ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2), the point exactly halfway between them.
  • The Distance and Midpoint Calculator’s own example is (1, 2) and (4, 6), which gives distance 5 and midpoint (2.5, 4).
  • There is no box for a midpoint input, so a missing endpoint is worked out by hand and checked with the tool.

What Is a Distance and Midpoint Calculator?

A Distance and Midpoint Calculator on CalcSolver is a tool that takes two points on a coordinate plane and returns two answers: how far apart the points are, and the point exactly halfway between them. You give it the two points, and it works out the distance and the midpoint from them, with the steps underneath. A distance formula calculator does the first half of that job, and a midpoint calculator does the second half, and this tool does both at once, so you type the points once and read both answers together.

How to Use the Distance and Midpoint Calculator?

I have used the Distance and Midpoint Calculator on CalcSolver for dozens of pairs of points, and the routine never changes. Type the four numbers, press Calculate, and read the distance and the midpoint, with the steps underneath. A midpoint calculator takes the same two points and returns the halfway point, so the only work you do is typing the numbers in the right boxes.

Enter the Coordinates of the First Point

Type the x and y of your first point into the first two boxes on CalcSolver. The boxes already hold 1 and 2 when the page opens, so change them to your own numbers before you press Calculate. The first box is x1, the horizontal position, and the second is y1, the vertical position, and the order matters: the first point is the one you subtract from, and the second point is the one you subtract.

Enter the Coordinates of the Second Point

Type the x and y of your second point into the next two boxes on CalcSolver. The boxes already hold 4 and 6 when the page opens, so change them to your own numbers too. The third box is x2 and the fourth is y2, and a negative number goes in just as it is, with its minus sign, because the Distance and Midpoint Calculator takes whole numbers, negatives and decimals.

Calculate the Distance and Midpoint

Press Calculate on CalcSolver, and the answer appears in bold at the top: Distance and Midpoint, both on one line. The Distance and Midpoint Calculator works out both answers from the four numbers you type, so one press gives you the distance and the halfway point together. The same two points also give you the slope of the line through them, and the Slope Calculator works that out from (x1, y1) and (x2, y2) in the same way.

Understand Your Results

The distance is the straight-line length between the two points, and it is never negative, because a length cannot be less than zero. The midpoint is the point halfway along that line, and it sits at ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2), so its x is the average of the two x-values and its y is the average of the two y-values. The steps panel shows the working underneath, so you can see why the answer is right and not just what it is.

How to Calculate the Distance Between Two Points?

Subtract, square, add, and take the square root. That is the whole method, and every distance question is the same four steps in a different order. A distance between two points calculator does those four steps for you, and it rounds the answer to 6 decimal places, so a distance like √2 comes out as 1.414214.

Distance Formula Explained

The distance formula is d = √(x2 − x1)² + (y2 − y1)²], and it is the Pythagorean theorem in disguise: the change in x and the change in y are the two legs of a right triangle, and the distance is the hypotenuse. The Pythagorean theorem article on Wikipedia sets out the theorem, its proof and its history in full. Pythagoras set out the theorem more than 2,500 years ago, and Euclid proved it in his Elements; the US Common Core teaches it in Grade 8, the UK GCSE tests it, and India’s NCERT covers it in Class 10. A distance formula calculator uses this formula on the four numbers you type on CalcSolver, and it rounds the answer to 6 decimal places.

How to Use the Distance Formula?

First, subtract the x-values and the y-values: x2 − x1 and y2 − y1. I check the subtraction first, because the two differences are the legs of the triangle, and a wrong difference gives a wrong distance. Second, square both answers, because a square is never negative, and that is why the formula works with negative coordinates too. Third, add the two squares together. Fourth, take the square root of the sum, and that is the distance. If the two points are the same, both differences are 0, so the distance is 0, and the midpoint is the point itself. A distance formula calculator follows the same four steps, and it rounds the answer to 6 decimal places. The Distance and Midpoint Calculator follows the same four steps, and its steps panel shows the working in order.

Example: Find the Distance Between Two Points

For (1, 2) and (4, 6), the change in x is 4 − 1 = 3 and the change in y is 6 − 2 = 4. Square them: 3² = 9 and 4² = 16. Add them: 9 + 16 = 25. Take the square root: √25 = 5, so the distance is 5. The Distance and Midpoint Calculator shows the same working in its steps panel, and the middle line of the steps always reads (9 + 16) = square root of 25, because that line is written for the default example. For other points the final distance is still right, but the middle line still says 9 + 16, so I read the final answer and check the first two lines of the steps, not the middle one. A distance between two points calculator returns the same answer from the same four numbers, and I use it to check the squaring before I trust the root. A second pair shows the same method with negatives: for (−3, −1) and (2, 4), the change in x is 2 − (−3) = 5 and the change in y is 4 − (−1) = 5, so the distance is √(25 + 25) = √50 = 7.071068.

How to Calculate the Midpoint Between Two Points?

Add the x-values and halve them, add the y-values and halve them. That is the whole method, and it is the average of the two points, one coordinate at a time. A midpoint formula calculator does that averaging for you, and it rounds each coordinate to 6 decimal places.

Midpoint Formula Explained

The midpoint formula is M = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2), and it is the average of the two points: the x of the midpoint is the average of the two x-values, and the y of the midpoint is the average of the two y-values. That is why the midpoint always sits on the line segment between the two points, exactly halfway along it. The Distance and Midpoint Calculator works the formula out from the four numbers you type on CalcSolver, and the steps panel shows the substitution for both coordinates.

How to Find the Midpoint Using Coordinates?

Add the two x-values and divide by 2, and that is the x of the midpoint. Add the two y-values and divide by 2, and that is the y of the midpoint. I check the two halves separately, because the x and the y do not depend on each other, and a slip in one does not change the other. If the two points are the same, the midpoint is that point, because the average of a number with itself is the number itself.

Example: Find the Midpoint of Two Points

For (1, 2) and (4, 6), the x of the midpoint is (1 + 4) ÷ 2 = 2.5 and the y is (2 + 6) ÷ 2 = 4, so the midpoint is (2.5, 4). The Distance and Midpoint Calculator shows the same working in its steps panel, with both coordinates substituted in full. A second pair with decimals shows the same method: for (1.5, 2.5) and (4.5, 6.5), the midpoint is ((1.5 + 4.5) ÷ 2, (2.5 + 6.5) ÷ 2) = (3, 4.5), because the change in x is 3 and the change in y is 4, so the distance is 5 as well.

Distance and Midpoint Calculator with two orange points joined by a line on a bright blue grid beside a calculator
Two points, one line: the distance is its length and the midpoint is its middle.

How to Find an Endpoint Using the Midpoint Formula?

The Distance and Midpoint Calculator has no box for a midpoint, so a missing endpoint is worked out by hand and checked with the tool. Rearrange the midpoint formula: x₂ = 2xₘ − x₁ and y₂ = 2yₘ − y₁. Work out the missing point, type both points into the Distance and Midpoint Calculator, and check that the midpoint it shows is the one you started with.

Endpoint Formula Explained

The midpoint is the average of the two endpoints, so working backwards, each missing coordinate is twice the midpoint minus the known coordinate: x₂ = 2xₘ − x₁ and y₂ = 2yₘ − y₁. The same rule works for y. The formula needs one known point and the midpoint, and it gives the other endpoint, one coordinate at a time. A midpoint formula calculator does not do this step, because the tool takes two points and returns the midpoint, so the endpoint is worked out by hand and the tool only confirms it.

Example: Find a Missing Endpoint

Take the midpoint (2.5, 4) and the known point (1, 2). The missing x is 2 × 2.5 − 1 = 4, and the missing y is 2 × 4 − 2 = 6, so the missing endpoint is (4, 6). I check it on the Distance and Midpoint Calculator by typing (1, 2) and (4, 6), and it shows distance 5 and midpoint (2.5, 4), which is the midpoint I started with. A second example with a negative answer: the midpoint is (0, 0) and the known point is (−2, 3), so the missing x is 2 × 0 − (−2) = 2 and the missing y is 2 × 0 − 3 = −3, and the missing endpoint is (2, −3).

Understanding the Results on a Coordinate Plane

The answer has three parts, and each one means something different on the Cartesian plane. The two points are where the segment starts and ends, the distance is how long the segment is, and the midpoint is where the segment is cut in half. I read all three together, because the distance tells me the size and the midpoint tells me the middle. The Geometry Calculator works on the same coordinate plane, so the points you type here are the same kind of points it uses for shapes.

First Point and Second Point

The first point is (x1, y1) and the second is (x2, y2), and the Distance and Midpoint Calculator keeps them in the order you typed them on CalcSolver, so the first point is the one you subtract from and the second is the one you subtract. The distance is the same whichever order you type them in, because the differences are squared, and a square is never negative. The midpoint is the same too, because adding is the same in either order.

Distance Between the Two Points

The distance is the length of the straight line between the two points, and it is the hypotenuse of the right triangle with legs (x2 − x1) and (y2 − y1). It is never negative, and it is 0 only when the two points are the same point. For a horizontal pair like (2, 3) and (7, 3), the distance is 7 − 2 = 5, because y never changes, and the Distance and Midpoint Calculator shows 5 with the same working. For a vertical pair like (4, 1) and (4, 9), the distance is 9 − 1 = 8, because x never changes.

Midpoint of a Line Segment

The midpoint is the point on the segment exactly halfway between the two points, and it is the average of the two endpoints. It always lies on the segment, never outside it, and it divides the segment into two equal halves. For (2, 3) and (7, 3), the midpoint is ((2 + 7) ÷ 2, (3 + 3) ÷ 2) = (4.5, 3), and for (4, 1) and (4, 9), it is ((4 + 4) ÷ 2, (1 + 9) ÷ 2) = (4, 5). The Distance and Midpoint Calculator finds both from one set of four numbers, one press giving the distance and the midpoint together.

Visual Representation of Distance and Midpoint

On a graph, the two points are joined by a straight line, and the distance is the length of that line. Draw a horizontal line from the first point and a vertical line from the second, and the two meet at a right angle, making a right triangle whose hypotenuse is the distance. For (1, 2) and (4, 6), the triangle has legs 3 and 4 and hypotenuse 5, which is the 3-4-5 triangle, and the midpoint (2.5, 4) sits in the middle of the hypotenuse. The Geometry Calculator works with the same coordinate plane, and it finds the area and perimeter of shapes from the same kind of measurements.

Distance Formula vs. Midpoint Formula

The two formulas answer different questions, and the Distance and Midpoint Calculator uses the same four numbers in different ways for each. The distance formula subtracts, squares, adds and takes a square root, and it returns one number, the length. The midpoint formula adds and halves, and it returns a point, two numbers. The distance is never negative, but a midpoint coordinate can be negative, because it is an average and averages keep their sign. The distance formula is Pythagoras, and the midpoint formula is an average, so one is a length and the other is a place. You need the distance when the question asks how far apart, and the midpoint when it asks where the middle is, and the Distance and Midpoint Calculator answers both from the same four numbers.

Real-Life Applications of Distance and Midpoint Calculations

Two points show up everywhere once you start looking for them. On a map, the distance between two places is the straight line between them, and the midpoint is the meeting point halfway: two friends 5 kilometers apart meet at the midpoint, 2.5 kilometers from each other. In a garden, the diagonal of a 5-meter by 4-meter bed is √(25 + 16) = √41 = 6.403124 meters, and the Distance and Midpoint Calculator shows the midpoint of the diagonal at the center of the bed, where the sprinkler goes. When you hang a picture on a 10-meter wall, the midpoint is at 5 meters, and the picture hangs centered. In construction, a rectangular corner is square when the diagonal measures 5 for sides 3 and 4, because 3² + 4² = 5². The Distance and Midpoint Calculator returns the same diagonal from the two corners, and the Triangle Calculator checks the same 3-4-5 triangle. Khan Academy teaches the same link between the distance formula and Pythagoras, and the SAT and ACT both test it, because two points are the start of coordinate geometry.

Frequently Asked Questions

How do you find the distance between two points?

Subtract the x-values and the y-values, square both answers, add them, and take the square root: d = √[(x2 − x1)² + (y2 − y1)²]. For (1, 2) and (4, 6), that is √(9 + 16) = √25 = 5. A distance between two points calculator does the same four steps from the four numbers you type. The Distance and Midpoint Calculator shows both answers with the steps underneath.

How do you calculate the midpoint of two coordinates?

Add the x-values and divide by 2, add the y-values and divide by 2: M = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2). For (1, 2) and (4, 6), that is (2.5, 4). A midpoint formula calculator does that averaging for you.

What is the difference between distance and midpoint?

Distance is one number, the length between the two points, and it is never negative. Midpoint is a point, two numbers, and it sits halfway between them. The distance tells you how far apart, and the midpoint tells you where the middle is. The Distance and Midpoint Calculator returns both from the same four numbers.

Can the distance between two points be negative?

No. Distance is a length, and the formula squares both differences, so the answer is never negative. The distance is 0 only when the two points are the same point, and for (3, 3) and (3, 3) it is 0.

Can you find the midpoint without a graph?

Yes, you do not need a graph. Add the x-values and halve them, add the y-values and halve them, and that is the midpoint. A midpoint calculator does it from the numbers alone, no drawing needed. For (0, 0) and (2, 3), the midpoint is (1, 1.5), and no graph is needed for that either.

How do you find the missing endpoint when the midpoint is known?

Use x₂ = 2xₘ − x₁ and y₂ = 2yₘ − y₁. For midpoint (2.5, 4) and known point (1, 2), the missing endpoint is (4, 6). Then type both points into the tool and check that it shows midpoint (2.5, 4).

Does the distance formula work with negative coordinates?

Yes. The formula squares the differences, and a square is never negative, so the signs disappear before the square root. For (−2, 5) and (6, −3), the change in x is 8 and the change in y is −8, so the distance is √(64 + 64) = √128 = 11.313708, and the midpoint is (2, 1).

Try your own numbers now on CalcSolver: the two points from your homework, the corners of your garden bed, or the two places on your map. The Distance and Midpoint Calculator does the arithmetic in a second, but the habit of checking the sign and the size is what actually keeps you right.