Midpoint Calculator

Find the point halfway between two coordinates. Enter your endpoints to see the midpoint, calculation steps and a visual explanation.

Enter two endpoints

Point A · First endpoint
Point B · Second endpoint
Try an example
Midpoint · M(x, y)

Decimals and negative values accepted. Display rounded to 10 significant digits where needed.

Visual explanation

A → M → B

M divides the line segment into two equal halves.

Midpoint coordinate diagramThe calculated midpoint and endpoints are shown on a coordinate grid.

Equal scale on both axes. The view centers on the midpoint.

Midpoint formula
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)
Last Updated: 13-Oct-2026 3 min read

Midpoint formula: find the center between two points

The midpoint formula finds the point halfway along a straight line segment. It is useful in coordinate geometry when you need to locate the center between two endpoints. This guide explains the equation for midpoint using simple steps, worked examples and a coordinate diagram.

What is a midpoint?

A midpoint divides a line segment into two equal parts. If A and B are the endpoints and M is the midpoint, then AM = MB. For example, the midpoint between 2 and 8 on a number line is 5: it is 3 units away from both numbers.

On a coordinate plane, a point has an x-coordinate for its horizontal position and a y-coordinate for its vertical position. To find the midpoint, average each pair of coordinates separately.

What is the equation for midpoint?

For endpoints A(x₁, y₁) and B(x₂, y₂), use:

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

x-coordinate of M = (x₁ + x₂) / 2
y-coordinate of M = (y₁ + y₂) / 2

Here, x₁ and y₁ belong to the first endpoint, while x₂ and y₂ belong to the second endpoint. M is the midpoint. Add x to x and y to y; do not mix the coordinates.

How to use the midpoint calculator

  1. Enter the x₁ and y₁ coordinates of Point A.
  2. Enter the x₂ and y₂ coordinates of Point B.
  3. Select Calculate midpoint to see M(x, y) and the calculation steps.
  4. Check the SVG diagram on the right, or below the inputs on smaller screens. M sits halfway between A and B.

Use the example buttons to explore positive, negative, vertical and horizontal cases. Reset restores the original example. The calculator accepts decimals and negative numbers; enter fractions as decimal values. Long results are displayed to 10 significant digits where needed.

How to find the midpoint: worked examples

Example 1: Positive coordinates

Find the midpoint between A(2, 4) and B(8, 10).

  1. Average the x-coordinates: (2 + 8) / 2 = 5.
  2. Average the y-coordinates: (4 + 10) / 2 = 7.
  3. Write the coordinate pair: M = (5, 7).

From A to M, move 3 units right and 3 units up. From M to B, move another 3 units right and 3 units up. The two halves are equal.

Example 2: Negative coordinates

For A(−6, 3) and B(4, −5):

x = (−6 + 4) / 2 = −1
y = (3 + (−5)) / 2 = −1

The midpoint is M = (−1, −1). Keep each negative sign when adding the coordinates.

Example 3: Decimal result

For A(0, 0) and B(3, 5):

M = ((0 + 3) / 2, (0 + 5) / 2) = (1.5, 2.5). A midpoint does not need to have whole-number coordinates.

Midpoint examples at a glance

Examples using the same midpoint formula for different line segments.
Line segmentPoint APoint BMidpoint M
Sloping(2, 4)(8, 10)(5, 7)
Vertical(3, 2)(3, 10)(3, 6)
Horizontal(−4, 2)(6, 2)(1, 2)
Same endpoints(2, 3)(2, 3)(2, 3)

For a vertical segment, the x-coordinate stays the same. For a horizontal segment, the y-coordinate stays the same. If both endpoints coincide, the midpoint is that same point.

Midpoint on a number line

For two numbers a and b, the midpoint is (a + b) / 2. For example, the midpoint between −4 and 10 is (−4 + 10) / 2 = 3. The number 3 is 7 units from each endpoint.

How to find a missing endpoint

If you know midpoint M(mₓ, mᵧ) and endpoint A(x₁, y₁), rearrange the midpoint formula:

x₂ = 2mₓ − x₁
y₂ = 2mᵧ − y₁

For M(5, 7) and A(2, 4), x₂ = 2 × 5 − 2 = 8 and y₂ = 2 × 7 − 4 = 10. The missing endpoint is B(8, 10). This is a manual method; the calculator above uses two known endpoints.

Common mistakes to avoid

  • Mixing x and y: average the x-coordinates together, then the y-coordinates.
  • Forgetting to divide: divide each coordinate sum by 2.
  • Losing negative signs: −6 + 4 is −2, not 10.
  • Confusing midpoint and distance: a midpoint is a position; distance is the length between two points.

FAQ on Midpoint Calculator

What is the equation for midpoint?

The equation for midpoint is M=((x₁ + x₂) / 2, (y₁ + y₂) / 2). It averages the x-coordinates and y-coordinates of two endpoints to find the point halfway between them.

Why does the midpoint formula divide by 2?

The formula averages two values for each coordinate. Dividing their sum by 2 gives the value halfway between them.

Can a midpoint have decimals or negative coordinates?

Yes. A midpoint can have whole numbers, decimals, fractions or negative coordinates. For example, the midpoint between (0, 0) and (3, 5) is (1.5, 2.5).

Does the order of the endpoints matter?

No. Swapping Point A and Point B gives the same midpoint because the coordinate sums stay the same.

What happens when both endpoints are the same?

The midpoint is that same point. For example, if A and B are both (2, 3), the midpoint is (2, 3) and the line segment has zero length.

Is the midpoint formula the same as the slope formula?

No. The midpoint formula finds the center of a line segment. The slope formula, (y₂ − y₁) / (x₂ − x₁), measures its steepness when x₂ − x₁ is not zero.