Skip to content
Calcapedia
Math

Midpoint Calculator

Find the point halfway between two points, a missing endpoint from the midpoint, or the point that splits a segment in any ratio, in 2D or 3D.

Level: Grades 9–10

Printable worksheet

Midpoint Calculator

Inputs
Find
Coordinates

Result

Midpoint M

(5, 7)

The midpoint of (2, 3) and (8, 11) is (5, 7).

M: x
5
M: y
7
Length of AB
10
Half the length (A to M)
5

See the step-by-step solution ↓

Step-by-step solution

  1. The midpoint M is halfway, so average the matching coordinates of the two ends A and B

    M = ((xA + xB)/2, (yA + yB)/2)
  2. Add the two x-coordinates and divide by 2

    xM=2+82=5
  3. Add the two y-coordinates and divide by 2

    yM=3+112=7
  4. Put the coordinates together to get the point M

    M = (5, 7)
  5. For reference, find the length of AB: square each change, add them and take the square root

    AB=(8−2)2+(11−3)2=10

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Find the point exactly halfway between two points on a graph, with every step shown. That halfway point of a line segment is called the midpoint. On a coordinate grid you find it by averaging. The midpoint's x-coordinate (its left-right position) is the average of the two x-coordinates. Its y-coordinate (its up-down position) is the average of the two y-coordinates. The same idea works in three dimensions: you average the z-coordinates (the depth) too.

This midpoint calculator does three related jobs. First, it finds the midpoint of two points. Second, it runs the formula backwards to find a missing endpoint, when you know one end and the midpoint. Third, it finds the point that splits a segment in any ratio m : n. That's the general version of the midpoint, which is the 1 : 1 case. Each answer comes with the length of the segment and the working for every coordinate.

Where it's used

Why this math matters outside the classroom:

  • Meeting halfway. Two friends at grid points (2, 3) and (8, 11) on a city map meet at the midpoint, the corner of 5th and 7th.
  • Trail rest stops. A hiker marks a rest stop one quarter of the way along a straight trail from (0, 0) to (12, 16) at the point (3, 4).
  • Graphic design. A designer centres a logo between corners at (40, 20) and (360, 220) by placing it at the midpoint (200, 120).
  • Bridge supports. An engineer places a support pier at the midpoint of a span running from (0, 0, 10) to (60, 0, 14), at (30, 0, 12).
  • Geometry proofs. Students show that the diagonals of a parallelogram bisect each other by checking that both diagonals have the same midpoint.

Grade level and standards: Grades 9–10; Common Core State Standards for Mathematics HSG.GPE.B.6. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Choose what to find: the midpoint, a missing endpoint, or the point that splits the segment in a ratio.
  2. Pick 2D or 3D. Then type the coordinates of point A and of point B (or of the midpoint M, when you're looking for an endpoint).
  3. For a ratio, enter m and n. The point P will sit so that its distance from A and its distance to B are in the ratio m : n.
  4. Read the point at the top. Below it are the separate coordinates, the length of AB and the step-by-step working.

What the inputs mean

Find
Missing endpoint: you know one end, A, and the midpoint, M, and want the other end. Ratio: the point P sits m parts of the way from A and n parts from B.
Ratio part m (from A)
A ratio of 1 : 3 puts P a quarter of the way from A to B. A ratio of 3 : 1 puts it three quarters of the way. Either part may be 0, which puts P at an endpoint.

Formula and method

M = ((xA + xB) ÷ 2, (yA + yB) ÷ 2)
In 3D, also zM = (zA + zB) ÷ 2
Missing endpoint: xB = 2xM − xA,  yB = 2yM − yA
Ratio m : n: P = A + (m ÷ (m + n)) × (B − A), coordinate by coordinate
Length AB = √((xB − xA)² + (yB − yA)²)

In the formulas, A and B are the two ends of the segment, M is the midpoint and P is the ratio point. xA means "the x-coordinate of A", yB means "the y-coordinate of B", and so on. m and n are the two parts of the ratio, and √ means square root.

Halfway along a straight segment, each coordinate has changed by half of its total change. So each coordinate of the midpoint is the average of the endpoint coordinates. The x and y directions don't affect each other. That's why the formula works one coordinate at a time.

Solving the midpoint formula for the unknown end gives the endpoint formula. Since xM = (xA + xB) ÷ 2, doubling both sides gives 2xM = xA + xB. So xB = 2xM − xA. In words, B is as far past M as A is before it.

For a ratio m : n, the point sits the fraction t = m ÷ (m + n) of the way from A to B. So each coordinate is the starting value plus t times the change. When m = n, t is one half, and the formula becomes the midpoint formula.

The length of AB comes from the distance formula. It's the Pythagorean theorem applied to the left-right and up-down changes.

Worked example

Find the midpoint of A(2, 3) and B(8, 11). Then find the point a quarter of the way from A to B.

  1. x-coordinate: (2 + 8) ÷ 2 = 10 ÷ 2 = 5.
  2. y-coordinate: (3 + 11) ÷ 2 = 14 ÷ 2 = 7, so M = (5, 7).
  3. Length of AB: √(6² + 8²) = √100 = 10, so M is 5 units from each end.
  4. A quarter of the way is the ratio 1 : 3, so t = 1 ÷ 4 = 0.25. P = (2 + 0.25 × 6, 3 + 0.25 × 8) = (3.5, 5).
  5. Working backwards from A(2, 3) and M(5, 7): B = (2 × 5 − 2, 2 × 7 − 3) = (8, 11). That gives back the original endpoint.

Result: The midpoint is (5, 7), and the segment is 10 units long. The 1 : 3 point is (3.5, 5), which is 2.5 units from A and 7.5 units from B.

Understanding the result

The midpoint is the balance point of the segment. It's the same distance from both ends, and it lies on the line through them. A quick check: the distance from A to M equals the distance from M to B, and each is half of AB.

A ratio point with m smaller than n lies closer to A. With m larger than n, it lies closer to B. The two distances it reports always add up to the full length of AB.

Because the midpoint formula is an average, swapping A and B gives the same midpoint. The ratio point is different. Swapping A and B (or swapping m and n) moves P to the mirror-image spot on the segment.

Assumptions and limitations

  • Coordinates are on an ordinary flat grid, called a Cartesian grid. The x, y and z axes are at right angles and use the same scale.
  • The ratio point always lies between A and B (dividing the segment "internally"). Both ratio parts are zero or positive.
  • Latitude and longitude are not flat coordinates. Averaging them gives only a rough midpoint for nearby places and a wrong one across long distances.
  • Dividing a segment externally isn't covered. That's when the point lies on the line beyond A or B.
  • Results are rounded for display. Very long decimals are shown to 6 places in the point text.

Frequently asked questions

What is the midpoint formula?

Add the two x-coordinates and divide by 2. Then do the same for the y-coordinates. For (2, 3) and (8, 11), that is ((2 + 8) ÷ 2, (3 + 11) ÷ 2) = (5, 7). In 3D, you average the z-coordinates the same way.

How do I find an endpoint if I know the midpoint?

Double each coordinate of the midpoint, then subtract the matching coordinate of the endpoint you know. With A(2, 3) and midpoint (5, 7), the other end is (2 × 5 − 2, 2 × 7 − 3) = (8, 11).

Can a midpoint have negative or fractional coordinates?

Yes. If the endpoints sit on opposite sides of an axis, the midpoint can be negative. If two coordinates add up to an odd number, the midpoint lands on a half, such as 2.5. Both are perfectly valid points.

What does dividing a segment in the ratio 2 : 1 mean?

The point is twice as far from A as it is from B, so it sits two thirds of the way along. From (0, 0) to (3, 6), that point is (2, 4). The midpoint is the special case 1 : 1.

Is the midpoint the same as the average of the points?

For two points, yes: the midpoint is their average, one coordinate at a time. For three or more points, that average is called the centroid. For a triangle, it's where the three medians meet (the lines from each corner to the middle of the opposite side).

How this calculator is checked

Method: The coordinate midpoint formula, its rearrangement for a missing endpoint, the internal section formula P = A + m/(m + n)·(B − A), and the Euclidean distance formula. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Midpoint Calculator on your own website or blog for free. Paste this code where you want it to appear: