Midpoint Calculator

Use this Midpoint Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Point A
Point B

Formula and interpretation
Midpoint

▼ See explanations and tips below ▼

What Is a Midpoint?

A midpoint is the point exactly halfway between two endpoints of a line segment. If point \(A\) and point \(B\) are the ends of a segment, the midpoint \(M\) divides that segment into two equal parts: \(AM\) and \(MB\).

In coordinate geometry, a point is described by coordinates. In two dimensions, a point has an \(x\)-coordinate and a \(y\)-coordinate, such as \((-4, 2)\). In three dimensions, it also has a \(z\)-coordinate, such as \((-3, 5, 1)\).

The key idea is simple: the midpoint is found by averaging matching coordinates. The midpoint’s \(x\)-coordinate is halfway between the two endpoint \(x\)-coordinates, the midpoint’s \(y\)-coordinate is halfway between the endpoint \(y\)-coordinates, and in 3D the midpoint’s \(z\)-coordinate is halfway between the endpoint \(z\)-coordinates.

This makes the midpoint useful whenever you need the center point of a segment, the center of a diameter, a halfway location in a coordinate model, or a simple way to divide a straight segment evenly.


Why Midpoints Matter

Midpoints connect arithmetic with geometry. Instead of estimating the center of a segment by looking at a graph, you can calculate it exactly from the endpoint coordinates.

Students use the midpoint formula in coordinate geometry, algebra, analytic geometry, and calculus. It is also useful in applied settings where coordinates represent positions on a drawing, grid, screen, map-like plane, model, or 3D coordinate system.

Common uses include:

  • finding the center of a line segment;
  • finding the center of a circle when the endpoints of a diameter are known;
  • placing a label, object, or marker halfway between two coordinate points;
  • checking whether a point bisects a segment;
  • understanding vectors, distances, and coordinate averages.

The midpoint is not just “somewhere between” two points. It is the exact point that is equally far from both endpoints along the segment.


Key Terms to Know

  • Point: A location described by coordinates, such as \((x, y)\) in 2D or \((x, y, z)\) in 3D.
  • Endpoint: One of the two points that define a line segment.
  • Line segment: The straight part of a line between two endpoints.
  • Midpoint: The point exactly halfway between the endpoints of a segment.
  • Cartesian coordinates: Coordinates based on perpendicular axes, usually labeled \(x\), \(y\), and sometimes \(z\).
  • Coordinate-wise average: An average taken separately for each matching coordinate.
  • Vector from \(A\) to \(B\): The coordinate differences that describe the movement from point \(A\) to point \(B\).
  • Euclidean distance: The straight-line distance between two points in a Cartesian coordinate system.

How the Midpoint Formula Works

The midpoint formula works because each coordinate of the midpoint must lie halfway between the corresponding coordinates of the endpoints.

For a 2D segment with endpoints:

$$ A = (x_1, y_1) $$

and

$$ B = (x_2, y_2) $$

the midpoint is:

$$ M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right) $$

The formula adds the two \(x\)-coordinates and divides by \(2\), then does the same for the two \(y\)-coordinates.

In 3D, the same idea extends to the \(z\)-coordinate. For endpoints:

$$ A = (x_1, y_1, z_1) $$

and

$$ B = (x_2, y_2, z_2) $$

the midpoint is:

$$ M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2}\right) $$

Where:

  • \(A\) is the first endpoint.
  • \(B\) is the second endpoint.
  • \(M\) is the midpoint.
  • \(x_1, y_1, z_1\) are the coordinates of point \(A\).
  • \(x_2, y_2, z_2\) are the coordinates of point \(B\).

The vector from \(A\) to \(B\) is found by subtracting the coordinates of \(A\) from the coordinates of \(B\).

In 2D:

$$ \vec{AB} = (x_2 - x_1, y_2 - y_1) $$

In 3D:

$$ \vec{AB} = (x_2 - x_1, y_2 - y_1, z_2 - z_1) $$

The distance between the endpoints is the length of that vector. In 2D:

$$ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} $$

In 3D:

$$ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2} $$

The midpoint tells you where the halfway point is. The vector tells you the direction and coordinate change from \(A\) to \(B\). The distance tells you how long the segment is.


Examples of Midpoints in Practice

Example 1: A Simple 2D Midpoint

Suppose the endpoints are:

$$ A = (-4, 2) $$

and

$$ B = (8, 10) $$

Use the 2D midpoint formula:

$$ M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right) $$

Substitute the coordinates:

$$ M = \left(\frac{-4 + 8}{2}, \frac{2 + 10}{2}\right) $$

Simplify each coordinate:

$$ M = \left(\frac{4}{2}, \frac{12}{2}\right) $$

So the midpoint is:

$$ M = (2, 6) $$

The point \((2, 6)\) is halfway between \((-4, 2)\) and \((8, 10)\).


Example 2: A 3D Midpoint

Suppose the endpoints are:

$$ A = (-3, 5, 1) $$

and

$$ B = (7, -1, 9) $$

Use the 3D midpoint formula:

$$ M = \left(\frac{-3 + 7}{2}, \frac{5 + (-1)}{2}, \frac{1 + 9}{2}\right) $$

Simplify:

$$ M = \left(\frac{4}{2}, \frac{4}{2}, \frac{10}{2}\right) $$

So the midpoint is:

$$ M = (2, 2, 5) $$

This point is halfway between the endpoints in all three coordinate directions: \(x\), \(y\), and \(z\).

The vector from \(A\) to \(B\) is:

$$ \vec{AB} = (7 - (-3), -1 - 5, 9 - 1) $$
$$ \vec{AB} = (10, -6, 8) $$

The distance between the endpoints is:

$$ d = \sqrt{10^2 + (-6)^2 + 8^2} $$
$$ d = \sqrt{100 + 36 + 64} $$
$$ d = \sqrt{200} = 10\sqrt{2} \approx 14.1421 $$

Example 3: A Midpoint with Fractional Coordinates

Suppose the endpoints are:

$$ A = (-2, 5) $$

and

$$ B = (3, -8) $$

The midpoint is:

$$ M = \left(\frac{-2 + 3}{2}, \frac{5 + (-8)}{2}\right) $$
$$ M = \left(\frac{1}{2}, \frac{-3}{2}\right) $$

So the midpoint is:

$$ M = \left(\frac{1}{2}, -\frac{3}{2}\right) $$

As decimals, this is:

$$ M = (0.5, -1.5) $$

Fractional midpoint coordinates are normal. They happen whenever the average of a coordinate pair is not a whole number.


Example 4: Identical Endpoints

If both endpoints are the same point, the midpoint is the same point.

For example:

$$ A = (4, -2) $$

and

$$ B = (4, -2) $$

Then:

$$ M = \left(\frac{4 + 4}{2}, \frac{-2 + (-2)}{2}\right) $$
$$ M = (4, -2) $$

The vector from \(A\) to \(B\) is \((0, 0)\), and the distance is \(0\). This makes sense because the segment has no length when both endpoints are identical.


How to Interpret the Result

The midpoint result is a coordinate point. It is not a distance, slope, area, or angle. It tells you the location of the point exactly halfway between the two endpoints.

In 2D, the result has the form:

$$ (x, y) $$

In 3D, the result has the form:

$$ (x, y, z) $$

Each coordinate should be interpreted in the same coordinate system and unit scale as the inputs. If your input coordinates represent meters, the midpoint coordinates represent meters. If the coordinates are unitless grid values, the midpoint is also expressed in those same unitless grid values.

The decimal midpoint is useful when the exact midpoint includes halves or decimal values. A midpoint such as:

$$ \left(\frac{1}{2}, -\frac{3}{2}\right) $$

may also be written as:

$$ (0.5, -1.5) $$

The vector from \(A\) to \(B\) shows the coordinate change from the first endpoint to the second endpoint. For example, a vector of \((10, -6, 8)\) means you move \(10\) units in the positive \(x\) direction, \(6\) units in the negative \(y\) direction, and \(8\) units in the positive \(z\) direction.

The distance value is the length of the segment between the endpoints. It is useful for understanding how far apart the endpoints are, but it is not the midpoint itself.

The coordinate preview is a visual aid. It can help you see the endpoints, the segment, and the midpoint, but the numeric result comes from the coordinate formulas.


Common Mistakes and Misconceptions

Mistake 1: Averaging all numbers together instead of matching coordinates.
The midpoint formula averages corresponding coordinates separately. Do not combine every coordinate into one large average. Average the two \(x\)-values, then the two \(y\)-values, and in 3D the two \(z\)-values.

Mistake 2: Confusing midpoint with distance.
The midpoint is a location. Distance is a length. A midpoint result looks like a point, such as \((2, 6)\). A distance result is a single number, such as \(14.1421\).

Mistake 3: Subtracting coordinates instead of adding them.
Subtraction is used for vectors and distance. Addition is used for the midpoint. For the midpoint, add matching coordinates and divide by \(2\).

Mistake 4: Mixing up \(x\), \(y\), and \(z\) fields.
Coordinate order matters. In \((x, y, z)\), the first number is \(x\), the second is \(y\), and the third is \(z\). Swapping coordinates can move the midpoint to a different location.

Mistake 5: Using 2D mode for a 3D problem.
If the points have \(z\)-coordinates, use 3D mode. Otherwise, the midpoint will be calculated only from the \(x\)- and \(y\)-coordinates.

Mistake 6: Expecting blank fields to stop the calculation.
Blank, malformed, non-finite, or unsupported exceptionally long coordinate entries are treated as \(0\). If a result looks unexpectedly centered near the origin, check whether any coordinate field was left empty or outside the calculator's supported decimal range.

Mistake 7: Using latitude and longitude as if they were flat Cartesian coordinates.
The midpoint formula here is for Cartesian coordinates in a flat 2D plane or a 3D coordinate system. Geographic latitude and longitude describe positions on Earth and require different methods for accurate geographic midpoints.

Mistake 8: Assuming the graph uses a fixed physical scale.
A coordinate preview may scale automatically to fit the points on screen. Use the numeric coordinates for the exact midpoint.


When to Use the Midpoint Formula

Use the midpoint formula when you have two endpoints and need the point halfway between them in a Cartesian coordinate system.

It is especially useful for:

  • finding the center of a segment on a coordinate plane;
  • locating the center of a circle when the endpoints of a diameter are known;
  • checking whether a point bisects a segment;
  • solving coordinate geometry problems in algebra or geometry;
  • working with 3D coordinates in math, modeling, or visualization;
  • finding a halfway coordinate for grids, screens, diagrams, or simple coordinate-based layouts.

The formula is best used when the segment is straight and the coordinates belong to the same Cartesian system.


Limitations and Things to Keep in Mind

The midpoint formula is exact for Cartesian coordinates, but it does not apply to every kind of coordinate system.

Keep these limitations in mind:

  • It supports 2D and 3D Cartesian midpoint calculations.
  • It does not calculate geographic midpoints on Earth.
  • It does not support polar, spherical, or complex-number coordinates.
  • It does not convert between units.
  • It assumes all coordinates use the same scale and coordinate system.
  • Finite decimal coordinate strings are kept as exact base-10 values for midpoint and vector arithmetic within a bounded input length. Very large or very small results may be shown in scientific notation.
  • Exact fractional output may appear only in certain integer-coordinate cases.
  • Blank, malformed, non-finite, or unsupported exceptionally long inputs are treated as \(0\), so review your entries carefully.
  • The coordinate preview is for visualization and may not use a fixed physical scale.
  • In 3D mode, yaw and pitch controls affect the visual preview only, not the midpoint calculation.

For homework, diagrams, and ordinary coordinate geometry, the midpoint formula is usually enough. For engineering, surveying, navigation, official records, mapping, or safety-related work, check that the coordinate system is appropriate and verify results with the required professional tools or standards.


How to Use This Calculator

  1. Choose 2D or 3D mode.
  2. Enter the \(x\)- and \(y\)-coordinates for point \(A\).
  3. Enter the \(x\)- and \(y\)-coordinates for point \(B\).
  4. In 3D mode, also enter the \(z\)-coordinates for both points.
  5. Review the main midpoint result in point notation.
  6. Use the decimal midpoint, vector, formula substitution, and distance result for extra context.
  7. Use the coordinate preview to see the endpoints, segment, and midpoint visually.
  8. In 3D mode, adjust yaw and pitch to rotate the preview.
  9. Use the example option if you want to load sample coordinates.
  10. Use the clear option carefully, because empty coordinate fields may calculate as \(0\).

Frequently Asked Questions

Is the midpoint just the average of two points?

Yes, but the average is taken coordinate by coordinate. In 2D, average the two \(x\)-coordinates and average the two \(y\)-coordinates. In 3D, also average the two \(z\)-coordinates.


Does it matter which point is A and which point is B?

The midpoint does not change if you swap point \(A\) and point \(B\), because addition gives the same coordinate sums either way. The distance also stays the same. The vector from \(A\) to \(B\), however, changes direction if the points are swapped.


Why does my midpoint have fractions or decimals?

A midpoint has a fractional or decimal coordinate when the average of a coordinate pair is not a whole number. For example, the average of \(-2\) and \(3\) is \(\frac{1}{2}\), which is \(0.5\).


Is the midpoint the same as the distance between two points?

No. The midpoint is a coordinate location halfway between the endpoints. The distance is the length of the segment connecting the endpoints.


Can I use this for latitude and longitude?

Not for an accurate geographic midpoint. Latitude and longitude are coordinates on Earth, not ordinary flat Cartesian coordinates. For geographic midpoint work, use a method designed for spherical or ellipsoidal Earth coordinates.


What happens if both endpoints are the same?

The midpoint is the same as the endpoint. The vector components are all \(0\), and the distance between the two points is \(0\).


Sources and References

Books

  1. Lynn Marecek and Andrea Honeycutt Mathis. Intermediate Algebra 2e. 2nd ed., OpenStax, 2020. Section 11.1, “Distance and Midpoint Formulas; Circles.” Accessed July 4, 2026.
  2. Gilbert Strang and Edwin “Jed” Herman. Calculus Volume 3. 1st ed., OpenStax, 2016. Section 2.2, “Vectors in Three Dimensions.” Accessed July 4, 2026.