Midpoint Calculator

Find the exact halfway point between two coordinates in 2D or 3D. See coordinate-by-coordinate working, segment distance, half-distance verification and slope where it is defined.

Point A

Point B

Your midpoint result

Segment distance0
Half distance0
Slope / direction0
Midpoint(0, 0)

Enter both endpoints. Coordinates can be positive, negative, zero or decimal values.

Calculation breakdown

Point A(0, 0)
Point B(0, 0)
Midpoint x-coordinate0
Midpoint y-coordinate0
Distance A → B0
Distance A → M0
Distance M → B0

Transparent formula

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

x midpoint = (x₁ + x₂) ÷ 2

y midpoint = (y₁ + y₂) ÷ 2

Distance = √((x₂ − x₁)² + (y₂ − y₁)²)

2D coordinate graph

The graph scales automatically to your points. It is a visual check, not a replacement for the exact numeric result.

What is a midpoint?

The midpoint of a line segment is the point exactly halfway between its two endpoints. In coordinate geometry, you find it by averaging matching coordinates: average the two x-values, then average the two y-values. In three dimensions, average the two z-values as well.

If point A is at (x₁, y₁) and point B is at (x₂, y₂), the midpoint M is:

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

This formula works for positive numbers, negative numbers, zero, fractions and decimals. It also works whether the segment is horizontal, vertical or diagonal.

Why the midpoint formula works

A midpoint is halfway along each coordinate direction. Suppose you move from x₁ to x₂. The total horizontal change is x₂ − x₁, so half that change is (x₂ − x₁) ÷ 2. Starting at x₁ and moving halfway gives:

x₁ + (x₂ − x₁) ÷ 2

Simplifying that expression produces:

(x₁ + x₂) ÷ 2

The same reasoning applies independently to y and, in 3D, to z. This coordinate-by-coordinate averaging is why the formula is both simple and general.

How to use the Midpoint Calculator

Choose 2D or 3D, then enter the coordinates of Point A and Point B. Click Calculate midpoint. The main result shows the midpoint, while supporting results show the full segment distance, half-distance and slope or direction information.

The breakdown also checks that the midpoint is truly halfway by calculating the distance from A to M and from M to B. Those two distances should match, apart from normal decimal rounding in the display.

Worked example: midpoint of (2, 3) and (8, 7)

Let A = (2, 3) and B = (8, 7). Average the x-coordinates first:

x = (2 + 8) ÷ 2 = 10 ÷ 2 = 5

Then average the y-coordinates:

y = (3 + 7) ÷ 2 = 10 ÷ 2 = 5

Therefore:

M = (5, 5)

The distance between A and B is:

√((8 − 2)² + (7 − 3)²) = √(36 + 16) = √52 ≈ 7.211

Each half of the segment is approximately 3.606 units long. That equal-distance check confirms that (5, 5) sits halfway between the endpoints.

Midpoint with negative coordinates

Negative coordinates do not require a different formula. Keep the signs attached to the numbers and average normally.

For A = (−4, 6) and B = (10, −2):

x = (−4 + 10) ÷ 2 = 3 y = (6 + (−2)) ÷ 2 = 2

So the midpoint is (3, 2). A common mistake is to lose the negative sign or turn addition of a negative number into the wrong operation.

Midpoint with decimal or fractional coordinates

The midpoint can be a decimal or fraction even when both endpoints are integers. For example, between (1, 2) and (4, 9):

M = ((1 + 4) ÷ 2, (2 + 9) ÷ 2) = (2.5, 5.5)

There is no need to round a midpoint to a whole number unless a particular application explicitly requires it. In pure coordinate geometry, the exact halfway coordinate should be preserved.

3D midpoint formula

In three-dimensional Cartesian space, a point has x, y and z coordinates. The midpoint is found by averaging all three matching pairs:

M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2, (z₁ + z₂) ÷ 2)

For A = (2, −1, 4) and B = (8, 5, 10):

M = ((2 + 8) ÷ 2, (−1 + 5) ÷ 2, (4 + 10) ÷ 2) = (5, 2, 7)

The same idea extends to any number of dimensions: take the arithmetic mean of each corresponding coordinate.

Distance and midpoint are related but different

The midpoint formula and distance formula use the same endpoint coordinates, which is why students often mix them up. Their purposes are different:

For a 2D segment, distance is:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

The midpoint does not subtract and square the coordinates. It adds matching coordinates and divides each sum by two.

Why the midpoint is equidistant from both endpoints

If M is the midpoint of segment AB, then AM and MB have the same length:

AM = MB = AB ÷ 2

This property is useful as an independent check. The calculator reports all three distances. If you entered the endpoints correctly, A-to-M and M-to-B will be equal within display precision.

Midpoint and slope

For two distinct points in 2D, the slope of the segment is:

slope = (y₂ − y₁) ÷ (x₂ − x₁)

If x₂ = x₁, the segment is vertical and the slope is undefined because division by zero is not defined. If y₂ = y₁ and the points are different, the slope is zero.

Slope is not needed to find a midpoint, but showing it alongside the midpoint helps describe the line segment and can be useful when checking coordinate-geometry work.

What if both endpoints are the same point?

If A and B have identical coordinates, the segment has zero length. Its midpoint is simply the same point. For example, the midpoint of (4, −2) and (4, −2) is (4, −2).

In this special case, the usual slope expression becomes 0 ÷ 0, so slope is undefined. The midpoint calculation itself remains completely valid.

Midpoint of a horizontal line segment

If both points have the same y-coordinate, only x changes. For A = (−6, 4) and B = (2, 4):

M = ((−6 + 2) ÷ 2, (4 + 4) ÷ 2) = (−2, 4)

The midpoint stays on the same horizontal line because the y-coordinate is unchanged.

Midpoint of a vertical line segment

If both points have the same x-coordinate, only y changes. For A = (3, −5) and B = (3, 9):

M = ((3 + 3) ÷ 2, (−5 + 9) ÷ 2) = (3, 2)

The segment's slope is undefined, but its midpoint is easy to calculate.

Finding a missing endpoint from a midpoint

The midpoint formula can be rearranged when the midpoint and one endpoint are known. From:

Mₓ = (x₁ + x₂) ÷ 2

multiply by two and isolate the missing coordinate:

x₂ = 2Mₓ − x₁

Similarly:

y₂ = 2Mᵧ − y₁

This reverse form is useful in geometry exercises, symmetry problems and coordinate constructions. The current calculator focuses on the standard two-endpoint midpoint problem so the main workflow stays simple and clear.

Midpoint and the perpendicular bisector

The perpendicular bisector of a segment passes through its midpoint and meets the segment at a right angle. This makes the midpoint important in constructions involving circles, triangle circumcenters and equal-distance loci.

If you know the segment's slope and it is neither zero nor vertical, the perpendicular slope is the negative reciprocal. The midpoint then gives a point through which that perpendicular line passes.

Midpoint of a circle's diameter

If two points are endpoints of a circle's diameter, their midpoint is the circle's center. For diameter endpoints A = (−2, 1) and B = (8, 7):

Center = midpoint = ((−2 + 8) ÷ 2, (1 + 7) ÷ 2) = (3, 4)

The radius is half the distance between the two endpoints.

Midpoint and parallelograms

The diagonals of a parallelogram bisect each other. That means both diagonals share the same midpoint. In coordinate geometry, you can calculate the midpoint of each diagonal to check whether four points have this necessary parallelogram property.

This technique is often cleaner than comparing several slopes because it directly tests whether the diagonals cut each other into equal halves.

Midpoint versus average of multiple points

A midpoint is specifically the average of two endpoints coordinate by coordinate. If you have three or more points and want their arithmetic coordinate average, that is a centroid-style calculation rather than the midpoint of one segment.

For example, the average x-coordinate of three points is (x₁ + x₂ + x₃) ÷ 3, not a midpoint formula. Keeping these concepts separate avoids using the right arithmetic for the wrong geometric object.

Midpoint versus median in statistics

“Midpoint” in coordinate geometry is not the same as the median of a dataset. Coordinate midpoint refers to a point halfway along a segment. In statistics, the median is a central value after observations are ordered. The word “middle” appears in both ideas, but the formulas and meanings are different.

Does the order of the endpoints matter?

No. Swapping A and B gives the same midpoint because addition is commutative:

(x₁ + x₂) ÷ 2 = (x₂ + x₁) ÷ 2

The same is true for y and z. Distance also remains unchanged. The direction vector and signed changes do reverse, but the midpoint itself does not move.

Common midpoint mistakes

Why a graph is useful

A coordinate graph provides a visual check that the calculated midpoint lies between the endpoints and appears centered on the segment. It is particularly helpful when negative coordinates are involved or when the segment crosses one or both axes.

The graph in this calculator automatically scales to the entered 2D coordinates. Numeric results remain authoritative because visual scaling and screen pixels are only a display aid.

Frequently asked questions

What is the midpoint formula?

For two 2D points, average the x-coordinates and average the y-coordinates: M = ((x₁ + x₂)/2, (y₁ + y₂)/2).

How do you find the midpoint between two points?

Add the two x-values and divide by two. Then add the two y-values and divide by two. The resulting ordered pair is the midpoint.

Can a midpoint have negative coordinates?

Yes. Midpoint coordinates can be positive, negative, zero, fractional or decimal.

Does this calculator work in 3D?

Yes. In 3D mode it averages x, y and z separately and also calculates the three-dimensional segment distance.

Is the midpoint always on the line segment?

Yes. For two endpoints in ordinary Cartesian space, their midpoint lies exactly halfway along the straight segment joining them.

What is the distance from an endpoint to the midpoint?

It is one-half of the full segment length. Both endpoint-to-midpoint distances are equal.

What happens if both points are identical?

The midpoint is that same point and the segment distance is zero.

Can I use decimals?

Yes. The calculator accepts ordinary signed decimal numbers, including zero and negative values.

Does swapping the two points change the midpoint?

No. The midpoint is unchanged because each coordinate calculation is based on addition and averaging.

Is midpoint the same as distance?

No. Midpoint returns a coordinate. Distance returns the length between two coordinates.

Final note: the midpoint formula is an exact coordinate relationship: average each pair of corresponding coordinates. The supporting distance, slope and graph are included to make the result easier to understand and verify, while the midpoint remains the calculator's primary result.