Skip to content
Calcipedia
Midpoint Calculator instructional illustration

Midpoint Calculator

Find the midpoint between two coordinate points in 2D or 3D space with distance, half-distance, selectable decimal precision, step-by-step formula substitution.

Last updated

Midpoint between two points Use this midpoint calculator to find the point exactly halfway between two coordinate points in 2D or 3D space. It also shows formula substitution, distance to each endpoint, and 2D slope context so the answer is easier to check.

Dimensions

Use 2D for x-y coordinate-plane problems or 3D when the z coordinate changes the midpoint and distance.

Displayed precision

Quick examples

Result

Midpoint

(3, 4)

2D midpoint and straight-line distance for the entered coordinates.

Distance
10
Each half
5
Squared distance
100
Segment type
diagonal
Δx
6
Δy
8

Half of this segment is 5 units long. That is the distance from either endpoint to the midpoint.

Line context

The segment slope is 1.3333 and the direction angle from Point A to Point B is 53.1301°.

How to read it

The midpoint averages each coordinate pair, so it always sits halfway along the segment. If you plug the midpoint and either endpoint into the endpoint formula, the opposite endpoint comes back.

Formula substitution

x midpoint = (0 + 6) / 2 = 3

y midpoint = (0 + 8) / 2 = 4

distance = sqrt((6)^2 + (8)^2) = 10

← All General calculators

Geometry

Midpoint between two coordinate points

The midpoint calculator finds the point exactly halfway between two coordinate points in 2D or 3D space. It also computes the distance between the points, distance to each endpoint, formula substitution, and 2D line context, which makes it useful when you want the halfway coordinate and the segment checks in one place.

What the midpoint calculator does

The midpoint of two points is the point that sits exactly halfway along the line segment joining them. In a coordinate plane, that means averaging the x-values and averaging the y-values. In 3D space, the z-values are averaged as well.

This calculator is useful whenever you need the center of a segment, the midpoint of a diameter, or a quick sanity check on a pair of coordinates. It also reports the straight-line distance so you can confirm the full segment length at the same time.

The midpoint formula in 2D and 3D

The midpoint formula is one of the standard coordinate-geometry formulas. For 2D points, the midpoint is M = ((x1 + x2) / 2, (y1 + y2) / 2). For 3D points, the z-coordinate is averaged the same way: M = ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2).

Because the formula adds the coordinates before dividing by 2, the order of the points does not matter. Swapping Point A and Point B gives the same midpoint, which is exactly what you would expect for the center of a segment.

The page also shows the distance formula alongside the midpoint. That is helpful because the midpoint tells you where the center is, while the distance tells you how long the entire segment is.

M = ((x1 + x2) / 2, (y1 + y2) / 2)

Average the x and y coordinates in 2D. This is the specific relationship the calculator applies when building the result.

M = ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2)

Average all three coordinates in 3D. This is the specific relationship the calculator applies when building the result.

d = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)

Straight-line distance between the two points.

Step-by-step midpoint substitution

A strong way to avoid sign mistakes is to write each coordinate average separately. For points A(x1, y1) and B(x2, y2), the x-coordinate of the midpoint is (x1 + x2) / 2 and the y-coordinate is (y1 + y2) / 2. In 3D, repeat the same step for z.

The calculator shows those substitutions directly. That makes it more useful for homework checks than a bare answer because you can see whether a negative coordinate was added correctly before the final midpoint appears.

Worked example: (0,0) and (6,8)

A classic 2D example uses the points (0,0) and (6,8). Average the x-coordinates: (0 + 6) / 2 = 3. Average the y-coordinates: (0 + 8) / 2 = 4. The midpoint is therefore (3, 4).

The distance between the points is 10 units because the coordinate differences are 6 and 8, which form a 6-8-10 right triangle. That means each half of the segment is 5 units long, and the midpoint splits the segment into two equal pieces.

Negative coordinates, decimals, and vertical lines

The midpoint formula works with any real-number coordinates, including negative values and decimals. For example, the midpoint of (-4, 2) and (6, -2) is (1, 0) because the x-average is 1 and the y-average is 0.

Vertical and horizontal segments do not need special midpoint formulas. If the x-values match, the midpoint keeps that same x-coordinate and averages y. If the y-values match, the midpoint keeps that same y-coordinate and averages x.

Midpoint, distance, slope, and endpoint checks

Midpoint and distance answer different questions. The midpoint is a coordinate, while distance is a length. Showing both makes it easier to catch errors: the distance from either endpoint to the midpoint should be exactly half the full segment length.

For 2D inputs, slope and direction angle provide another check on the same segment. A vertical line has undefined slope, a horizontal line has slope 0, and a diagonal line has a slope based on Δy divided by Δx.

Midpoint versus centroid and section formula

For two endpoints, the midpoint is the same as the average position of those two coordinates. For three or more points, the average coordinate is usually called a centroid, and it answers a different question than the midpoint of a single segment.

If a point divides a segment in a ratio other than 1:1, use a section formula rather than the midpoint formula. The midpoint is the special case where the ratio is equal on both sides.

Limitations and related tools

This calculator gives the geometric midpoint and straight-line coordinate-geometry checks only. It does not calculate weighted averages, centroids for polygons, geographic midpoints on a globe, or any kind of average that depends on extra mass or value weighting.

If you already know one endpoint and the midpoint, use the endpoint calculator to recover the missing point. If you only need the straight-line length between two points, the distance calculator is the better fit. This midpoint page is best when you want the halfway point and the segment length together.

Frequently asked questions

What is the midpoint of (0,0) and (6,8)?

The midpoint is (3, 4). Average the x-values to get 3 and the y-values to get 4.

Does the order of the points matter?

No. The midpoint formula is symmetric, so swapping the two points gives the same answer.

How do I find the midpoint in 3D?

Average each coordinate pair separately: x, y, and z. For example, the midpoint of (1,2,3) and (5,8,7) is (3,5,5).

Is midpoint the same as averaging coordinates?

Yes. The midpoint formula is just coordinate averaging applied to the endpoints of a line segment.

Why does the calculator also show distance?

Because midpoint and distance often go together in geometry problems. The midpoint tells you where the center is, and the distance tells you the full segment length.

Can a midpoint have negative coordinates?

Yes. If the endpoints are on opposite sides of zero, the averaged result can still be negative, positive, or mixed.

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

Rearrange the midpoint formula. If you know one endpoint and the midpoint, the missing endpoint is twice the midpoint minus the known endpoint on each coordinate.

When should I use the distance calculator instead?

Use the distance calculator when you only need the straight-line length between two points. Use this midpoint calculator when you need the halfway point too.

How do I find the midpoint step by step?

Average the x-coordinates, then average the y-coordinates. In 3D, average the z-coordinates too. For example, with (2,4) and (8,10), x = (2+8)/2 = 5 and y = (4+10)/2 = 7, so the midpoint is (5,7).

What is the midpoint formula for negative coordinates?

The formula is the same. Keep the signs when you add: the midpoint of (-4,2) and (6,-2) is ((-4+6)/2, (2+(-2))/2) = (1,0).

Is midpoint the same as centroid?

For two points, the average coordinate is the midpoint of the segment. For three or more points, the average position is usually called a centroid, which is a broader concept.

Can this midpoint calculator find a geographic midpoint?

No. Latitude and longitude require spherical or ellipsoidal geography methods. This page assumes ordinary Cartesian coordinates such as x-y or x-y-z geometry.

What does distance to the midpoint mean?

It is half the total segment length. If the full distance between two endpoints is 10 units, each endpoint is 5 units from the midpoint.

What if the two endpoints are identical?

Then the midpoint is the same point and the distance is 0. That is a valid result, not an error.

Also in General

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.