Midpoint Calculator

Find the point exactly halfway between two points on a coordinate plane. Enter the two endpoints, and this midpoint calculator gives the midpoint, the distance between the points and the slope of the line.

The x coordinate of the first point.

The y coordinate of the first point.

The x coordinate of the second point.

The y coordinate of the second point.

Formula: midpoint M = ((x1 + x2) / 2, (y1 + y2) / 2). Distance d = sqrt((x2 - x1) squared + (y2 - y1) squared).

How to Use the Midpoint Calculator

Enter the coordinates of the two endpoints. The first point is (x1, y1) and the second point is (x2, y2).

  1. Enter the x and y of the first point. The example uses (2, 4).
  2. Enter the x and y of the second point. The example uses (6, 10).
  3. Press Calculate, or press Enter. The midpoint appears first and large, with the distance and the slope below.
  4. Press Reset to clear the form and start over.
A photo of a student's hands plotting two points on graph paper and marking the midpoint between them with a red pen and ruler
The midpoint of (2, 4) and (6, 10) is (4, 7).

The Midpoint Formula

The midpoint is the point exactly halfway between two points, so it is the average of the two endpoints, one axis at a time. Add the two x values and divide by 2 to get the midpoint x. Add the two y values and divide by 2 to get the midpoint y.

The formula is M = ((x1 + x2) / 2, (y1 + y2) / 2). The midpoint always lies on the line segment between the two points, at the same distance from each end. That distance is half the total distance between the points.

The same idea gives the distance. The distance formula is d = sqrt((x2 - x1) squared + (y2 - y1) squared), which is the Pythagorean theorem applied to the horizontal and vertical gaps. Our distance calculator finds the distance between two points on its own, and our pythagorean theorem calculator covers the theorem behind it.

Worked Example: The Midpoint of (2, 4) and (6, 10)

Find the midpoint of (2, 4) and (6, 10).

  1. Average the x values. x = (2 + 6) / 2 = 8 / 2 = 4.
  2. Average the y values. y = (4 + 10) / 2 = 14 / 2 = 7.
  3. Read the answer. The midpoint is (4, 7).
  4. Check the distance. d = sqrt((6 - 2) squared + (10 - 4) squared) = sqrt(16 + 36) = sqrt(52) = 7.21.

Each endpoint sits 3.61 from the midpoint, which is half of 7.21, so the midpoint is exactly halfway. As a second check, the points (6, 3) and (12, 7) give a midpoint of (9, 5) and a distance of 7.21, since sqrt((12 - 6) squared + (7 - 3) squared) is also sqrt(52). The same steps work for any two points, so try your own numbers in the tool above.

A photo of a teacher drawing a straight line segment between two dots on a classroom whiteboard with a midpoint marked in the middle
Average the x values to get 4, average the y values to get 7, and the distance is 7.21.

Midpoint, Distance and Slope: Three Results From Two Points

Two points give three useful answers. The midpoint tells you where the halfway point is. The distance tells you how long the segment is. The slope tells you how steep it is.

The slope is m = (y2 - y1) / (x2 - x1). For (2, 4) and (6, 10), the slope is (10 - 4) / (6 - 2) = 6 / 4 = 1.5. A positive slope rises from left to right, a negative slope falls, a zero slope is flat, and a vertical segment has no slope at all because the division is by zero. The calculator says undefined instead of inventing a number.

The midpoint is also the point where the two halves meet. If you walk from (2, 4) to (6, 10), you reach (4, 7) after 3.61 units, exactly half the trip. Our slope calculator finds the slope and the line equation for the same two points.

Common Mistakes to Avoid

The most common mistake is averaging the wrong pair, adding x1 to y1 instead of x1 to x2. Keep the axes separate. Average the two x values for the midpoint x, and average the two y values for the midpoint y.

A second mistake is forgetting that the distance formula uses the differences, not the sums. The distance is sqrt((x2 - x1) squared + (y2 - y1) squared), not sqrt((x1 + x2) squared + (y1 + y2) squared). For (2, 4) and (6, 10), the differences are 4 and 6, and the distance is 7.21.

A third mistake is giving a slope for a vertical line. When x1 equals x2, the segment is vertical and the slope is undefined, because the formula divides by zero. A slope of zero means a flat horizontal line, which is a different thing entirely.

Where Midpoints Are Used

Midpoints show up wherever a halfway point matters. A meeting point halfway between two homes, the center of a line drawn on a map, the middle of a road between two junctions, all of these are midpoints. Hikers use the same idea to find the halfway point of a trail.

In geometry, the midpoint divides a segment into two equal parts, which is the starting point for bisectors, medians of triangles and the center of a circle through two points. In games and graphics, the midpoint is how a program finds the center between two positions on a screen. Our linear equation solver finds the equation of the line through the same two points.

A photo of a hiker standing at the halfway point of a trail between two wooden signposts in a green forest
The halfway point on a trail is a midpoint in real life.

Frequently asked questions

How do you find the midpoint of two points?

Average each coordinate separately. Add the two x values and divide by 2 for the midpoint x, then add the two y values and divide by 2 for the midpoint y.

What is the midpoint of (2, 4) and (6, 10)?

The midpoint is (4, 7). The x is (2 + 6) / 2 = 4 and the y is (4 + 10) / 2 = 7.

How do you find the distance between two points?

Use d = sqrt((x2 - x1) squared + (y2 - y1) squared). For (2, 4) and (6, 10), the distance is sqrt(16 + 36) = sqrt(52) = 7.21.

What is the slope between the two points?

Use m = (y2 - y1) / (x2 - x1). For (2, 4) and (6, 10), the slope is 6 / 4 = 1.5. A vertical segment has no slope, because the formula divides by zero.

Can the midpoint have decimal coordinates?

Yes. When the sum of the two x values or the two y values is odd, the midpoint has a decimal. The points (1, 2) and (4, 7) give a midpoint of (2.5, 4.5).

What is the difference between a midpoint and a centroid?

A midpoint is the halfway point between exactly two points. A centroid is the average position of three or more points, so the two words are not interchangeable.

Start Calculating Now!

Discover the power of smart tools at KitQuarter.

Explore All Tools