Midpoint Calculator

Find the midpoint between two points with step-by-step working for each coordinate and a coordinate plane showing A, B and M.

Point A

A = (2, 4)

Point B

B = (8, 10)

Try an example

Midpoint

M = (5, 7)

Halfway between A (2, 4) and B (8, 10).

Step-by-Step Calculation

M = ((x₁ + x₂)/2, (y₁ + y₂)/2)

x-coordinate

xₘ = (x₁ + x₂) / 2

= (2 + 8) / 2

= 10 / 2

= 5

y-coordinate

yₘ = (y₁ + y₂) / 2

= (4 + 10) / 2

= 14 / 2

= 7

Therefore M = (5, 7)

Coordinate plane

Points A and B with midpoint MPoint A (2, 4), point B (8, 10) and midpoint M (5, 7) on segment AB. AM = MB = 3√2 ≈ 4.2426, half of AB = 6√2 ≈ 8.4853.510510xyA (2, 4)B (8, 10)M (5, 7)
A = (2, 4)B = (8, 10)M = (5, 7)The single tick marks on AM and MB show the two halves are equal in length. The view zooms to fit the points.

What the midpoint means

The midpoint is the point exactly halfway between the two endpoints of a line segment. It divides segment AB into two parts of equal length.

Length AB
6√2 ≈ 8.4853
AM
3√2 ≈ 4.2426
MB
3√2 ≈ 4.2426

AM = MB = AB / 2

Lengths come from the distance formula; the Distance Formula Calculator shows that working in full.

Midpoint formula

M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)

x₁
x-coordinate of Point A
y₁
y-coordinate of Point A
x₂
x-coordinate of Point B
y₂
y-coordinate of Point B

In 3D, add a third coordinate: (z₁ + z₂) / 2.

Common mistakes

  • Averaging only one coordinate. Both coordinates need averaging. For (2, 4) and (8, 10), M = (5, 7), not (5, 4) or (5, 10).
  • Adding without dividing by 2. (2 + 8, 4 + 10) = (10, 14) is the sum of the points, not the midpoint.
  • Mixing up the endpoints. Pair x₁ with x₂ and y₁ with y₂. Adding x₁ + y₁ mixes coordinates of the same point.
  • Sign errors with negatives. (−4 + 6)/2 = 1, and (6 + (−2))/2 = 2. Adding a negative number subtracts.
  • Subtracting instead of adding. (x₂ − x₁)/2 is half the horizontal distance, not the midpoint. The midpoint formula adds.
  • Confusing midpoint with distance. The midpoint is a point (x, y); the distance AB is a single length.
  • Rounding too early. Keep full values until the end: (1.25 + 2.5)/2 = 1.875, not 1.9.

Midpoint vs distance

MidpointDistance
AnswerA point (x, y)A length (one number, ≥ 0)
Tells youWhere halfway isHow far apart the points are
Formula((x₁ + x₂)/2, (y₁ + y₂)/2)√[(x₂ − x₁)² + (y₂ − y₁)²]
For (2, 4), (8, 10)(5, 7)6√2 ≈ 8.4853

For how far apart the points are, use the Distance Formula Calculator. The Slope Calculator gives the steepness and equation of the line through A and B, and the Linear Equation Calculator solves and graphs linear equations.

This midpoint calculator finds the point exactly halfway between two points. Enter Point A (x₁, y₁) and Point B (x₂, y₂), and it shows the midpoint M with the working for each coordinate: for A = (2, 4) and B = (8, 10), xₘ = (2 + 8)/2 = 5 and yₘ = (4 + 10)/2 = 7, so M = (5, 7).

A coordinate plane draws A, B and M on segment AB, zooming to fit your points, with tick marks showing that AM and MB are equal. The calculator handles negative numbers, decimals, horizontal and vertical segments, identical points, and 3D coordinates, and it gives the lengths AB, AM and MB as related information.

Worked Calculation Examples

ScenarioResultCalculation Step
Positive coordinates: (2, 4) and (8, 10)M = (5, 7)xₘ = (2 + 8)/2 = 10/2 = 5. yₘ = (4 + 10)/2 = 14/2 = 7.
Negative coordinates: (−4, 6) and (6, −2)M = (1, 2)xₘ = (−4 + 6)/2 = 2/2 = 1. yₘ = (6 + (−2))/2 = 4/2 = 2.
Horizontal segment: (2, 5) and (10, 5)M = (6, 5)xₘ = (2 + 10)/2 = 6. Both y-coordinates are 5, so yₘ = (5 + 5)/2 = 5.
Vertical segment: (4, −2) and (4, 8)M = (4, 3)Both x-coordinates are 4, so xₘ = 4. yₘ = (−2 + 8)/2 = 6/2 = 3.
Decimal coordinates: (1.25, −0.4) and (3.5, 2.2)M = (2.375, 0.9)xₘ = (1.25 + 3.5)/2 = 4.75/2 = 2.375. yₘ = (−0.4 + 2.2)/2 = 1.8/2 = 0.9. No rounding is needed.

What Is a Midpoint?

The midpoint of a line segment is the point exactly halfway between its two endpoints. It lies on the segment and splits it into two pieces of equal length: if M is the midpoint of AB, then AM = MB = AB/2. Every segment has exactly one midpoint.

Why the Midpoint Formula Works

Think about one coordinate at a time. On a number line, the point halfway between x₁ and x₂ is their average, xₘ = (x₁ + x₂)/2: for 2 and 8, halfway is 5, which is 3 from each end. The same is true for the y-coordinates, yₘ = (y₁ + y₂)/2.

Moving halfway along the segment moves you halfway in the x-direction and halfway in the y-direction at the same time, so M = (xₘ, yₘ) = ((x₁ + x₂)/2, (y₁ + y₂)/2). The midpoint is not a single average of all four numbers; each coordinate is averaged separately.

Special Cases

If both points are the same, say A = B = (3, 5), the midpoint is that same point, (3, 5). On a horizontal segment the y-coordinates match, so the midpoint keeps that y-value: A = (2, 4), B = (8, 4) gives M = (5, 4). On a vertical segment the x-coordinates match: A = (6, 2), B = (6, 10) gives M = (6, 6).

Negative coordinates follow the same rule, with care over signs: A = (−6, 4) and B = (2, −8) give M = ((−6 + 2)/2, (4 + (−8))/2) = (−2, −2). Decimals work too, and it is best not to round until the end: (1.5, 2.75) and (6.5, 8.25) give M = (4, 5.5).

How to Use the Midpoint Calculator

  1. Choose 2D for points (x, y), or 3D for points (x, y, z).
  2. Enter the coordinates of Point A: x₁ and y₁ (and z₁). Negative numbers, decimals and zero are all fine.
  3. Enter the coordinates of Point B: x₂ and y₂ (and z₂). The midpoint M updates as you type; Reset restores the example.
  4. Read the midpoint M = (x, y), then follow the working for each coordinate: add the two values and divide by 2.
  5. Look at the coordinate plane: M sits on segment AB, and the matching tick marks show that AM and MB are equal.
  6. Check the related lengths AB, AM and MB, or load an example such as a vertical segment or negative coordinates.

Frequently Asked Questions

What is the midpoint formula?

M = ((x₁ + x₂)/2, (y₁ + y₂)/2), where (x₁, y₁) and (x₂, y₂) are the endpoints. Add the x-coordinates and divide by 2, then do the same with the y-coordinates.

How do you find the midpoint between two points?

Average each coordinate separately. For (2, 4) and (8, 10): (2 + 8)/2 = 5 and (4 + 10)/2 = 7, so the midpoint is (5, 7).

How do you find the midpoint when coordinates are negative?

Use the same formula and keep the signs. For (−4, 6) and (6, −2): (−4 + 6)/2 = 1 and (6 + (−2))/2 = 2, so M = (1, 2).

Can the midpoint have decimal coordinates?

Yes. Whenever a sum of coordinates is odd, the midpoint has a .5: the midpoint of (1, 2) and (2, 2) is (1.5, 2). Decimal inputs give decimal midpoints too, such as (4, 5.5) for (1.5, 2.75) and (6.5, 8.25).

What happens if the two points are the same?

The midpoint is that same point. For A = B = (3, 5), M = ((3 + 3)/2, (5 + 5)/2) = (3, 5). The segment has zero length.

Is the midpoint always halfway between two points?

Yes, by definition. It lies on the segment AB and its distance to each endpoint is the same: AM = MB = AB/2.

How is the midpoint different from the distance?

The midpoint is a location, a point (x, y). The distance is a length, a single non-negative number. For (2, 4) and (8, 10), the midpoint is (5, 7) and the distance is 6√2 ≈ 8.49.

How do you find the midpoint of a horizontal line segment?

The y-coordinates are equal, so only the x-coordinates need averaging. For (2, 5) and (10, 5), M = ((2 + 10)/2, 5) = (6, 5).

How do you find the midpoint of a vertical line segment?

The x-coordinates are equal, so only the y-coordinates need averaging. For (4, −2) and (4, 8), M = (4, (−2 + 8)/2) = (4, 3).

How do you find the midpoint in 3D?

Average the z-coordinates as well: M = ((x₁ + x₂)/2, (y₁ + y₂)/2, (z₁ + z₂)/2). For (1, 2, 3) and (5, 6, 7), M = (3, 4, 5).

Last updated: September 27, 2026.