Midpoint Calculator

Quick answer

The midpoint of a segment is the point halfway between its two endpoints. Average the x coordinates and average the y coordinates: M = ((x1 + x2) / 2, (y1 + y2) / 2). For A(-3, 5) and B(7, -1), M = (2, 2). In 3D, average the z coordinates too. The midpoint sits half the segment length from each end.

Updated 2026-09-30Reviewed by Prof. Dr. Khalil Mudassar, PhD
Try
Coordinate geometry
Use 2D for points on a graph. Use 3D for points in space.
The x coordinate of the first endpoint.
The y coordinate of the first endpoint.
3D only.
The x coordinate of the second endpoint.
The y coordinate of the second endpoint.
3D only.

Midpoint M

--
Distance AB--
Half distance (AM = MB)--
Slope of AB--
Perpendicular bisector--
Half step from A to M--

Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.

Saved results (0)

How to Use the Midpoint Calculator

  1. Pick 2D or 3D. Graph-paper problems are 2D. Points with a height or depth value are 3D.
  2. Type the two endpoints A and B. Order does not matter for the midpoint. Negatives and decimals work; write fractions as decimals.
  3. Read M, then the extras. The tool shows each averaging step, the length of AB, the half length, the slope and, in 2D, the perpendicular bisector and a plot.
ResultWhat it tells you
Midpoint MThe point exactly halfway from A to B.
Distance ABThe full length of the segment, from the distance formula.
Half distanceThe length AM, which equals MB. It is the radius when AB is a diameter.
Slope of ABRise over run in 2D. In 3D the tool shows the direction vector instead.
Perpendicular bisectorThe line through M at a right angle to AB (2D). In 3D the tool lists the two quarter points.
Half stepThe change in each coordinate from A to M. Adding it again from M lands on B.

What Is the Midpoint of a Line Segment?

The midpoint of a line segment is the one point that splits the segment into two equal parts. It lies on the segment itself, and its distance to each endpoint is half the segment length.

OpenStax College Algebra 2e defines the midpoint formula as the average of the endpoint coordinates. The idea extends to three dimensions: OpenStax Calculus Volume 3 finds the center of a sphere as the midpoint of a diameter by averaging x, y and z.

A midpoint is not the same as a centroid. The centroid of a triangle averages three vertices, while a midpoint averages two endpoints. It is also not the halfway point of a trip on the curved Earth, where latitude and longitude do not behave like flat coordinates.

How Does the Midpoint Formula Work?

The midpoint formula averages each coordinate on its own. An average of two numbers sits exactly between them, so averaging x and y separately puts M halfway along both axes at once.

2D midpoint: M = ( (x1 + x2) / 2, (y1 + y2) / 2 )3D midpoint: M = ( (x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2 )Distance: d = sqrt( (x2 - x1)^2 + (y2 - y1)^2 )
  1. Add the two x coordinates and divide by 2.
  2. Add the two y coordinates and divide by 2. In 3D, do the same for z.
  3. Write the results as the point M.
  4. Find the length AB with the distance formula; AM and MB are each half of it.
  5. For the perpendicular bisector, take the negative reciprocal of the slope of AB and pass the line through M.

Midpoint Example: A(-3, 5) and B(7, -1)

Find the midpoint of the segment from A(-3, 5) to B(7, -1).

  1. x: (-3 + 7) / 2 = 4 / 2 = 2.
  2. y: (5 + (-1)) / 2 = 4 / 2 = 2.
  3. So M = (2, 2).
  4. Length: the changes are 10 and -6, so AB = sqrt(100 + 36) = sqrt(136) = 11.661904, and AM = MB = 5.830952.

The slope of AB is -6 / 10 = -0.6. The perpendicular slope is 10 / 6 = 1.666667, so the perpendicular bisector through (2, 2) is y = 1.666667x - 1.333333.

A 3D Example from a Sphere

OpenStax Calculus Volume 3 uses the diameter from P(-5, 2, 3) to Q(3, 4, -1). The center is ((-5 + 3) / 2, (2 + 4) / 2, (3 + (-1)) / 2) = (-1, 3, 1). The diameter is sqrt(84) = 9.165151, so the radius is 4.582576.

Factors That Change the Midpoint

The midpoint depends only on the two endpoints, but signs, dimensions and scale all affect how you read it.

Negative Coordinates

Adding a negative number is where most slips happen. (5 + (-1)) / 2 is 2, not 3. The method line wraps negative values in brackets.

Number of Dimensions

A 3D point has three coordinates, so the midpoint has three averages. Leaving out z places the answer on the floor of the space instead of at the true center.

Axis Scale

The formula assumes the same unit on every axis. A chart with years on x and dollars on y still has a midpoint, but its distance and perpendicular bisector have no physical meaning.

Vertical and Horizontal Segments

A vertical segment has an undefined slope, so its perpendicular bisector is horizontal: y = constant. A horizontal segment gives a vertical bisector: x = constant.

Midpoint vs Endpoint vs Distance

These three segment tools answer different questions from the same kind of input.

QuestionKnownFormula
Where is the middle?Both endpointsAverage each coordinate
Where is the other end?One endpoint and the midpointB = 2M - A
How long is it?Both endpointsSquare root of the summed squared changes
Where are the quarter points?Both endpointsA + (B - A) / 4 and A + 3(B - A) / 4

When the midpoint is known and one end is missing, run the formula in reverse with the endpoint calculator.

When to Use a Midpoint Calculator

Coordinate Geometry Homework

Midpoint questions appear in algebra, geometry and precalculus. The step layout shows each average, which is what graders look for.

Circle Centers

The center of a circle is the midpoint of any diameter, and the radius is the half distance. From there the circle calculator gives the area and circumference.

Perpendicular Bisectors

Every point on the perpendicular bisector is the same distance from A and B. Constructions, Voronoi-style regions and circumcenters all start here. The slope calculator explains the negative reciprocal step.

Design and Layout on a Grid

Centering an object between two marks on a floor plan or a screen uses the same average. Pixel and CAD coordinates are flat, so the formula applies directly.

Common Midpoint Mistakes

1. Subtracting Instead of Adding

(x2 - x1) / 2 is the half step, not the midpoint. The midpoint adds the coordinates first.

2. Forgetting to Divide by 2

x1 + x2 alone is twice the midpoint coordinate. For A(-3, 5) and B(7, -1) it gives (4, 4) instead of (2, 2).

3. Mixing X and Y Values

Average x with x and y with y. Pairing x1 with y2 produces a point that is not on the segment.

4. Dropping a Sign

Write negatives in brackets before adding. -3 + 7 is 4, not -10.

5. Averaging Latitude and Longitude

Map coordinates sit on a sphere. The plain average drifts from the true halfway point on long routes, so use a great-circle method.

6. Using the Wrong Slope for the Bisector

The bisector slope is the negative reciprocal, not the negative. For slope -0.6 it is 1.666667, not 0.6. To write the full line in another form, the linear equation solver handles the algebra.

Accuracy and Limitations

The midpoint is exact for the numbers you enter; results show up to 6 decimal places.

What it calculates accurately

  • The midpoint of any two points in 2D or 3D.
  • The segment length and the half length.
  • The slope and the perpendicular bisector, including vertical and horizontal cases.
  • The quarter points of a 3D segment.
  • A to-scale plot of A, M and B in 2D.

What it does not account for

  • Points on the curved Earth given as latitude and longitude.
  • Ratios other than 1:1 and quarters, such as a 2:5 split.
  • Fractions typed with a slash; enter decimals.
  • Exact radicals; lengths are decimals.

How We Calculate the Midpoint

Method
Each midpoint coordinate is the average of the two endpoint coordinates. The length uses the 2D or 3D distance formula. The bisector slope is -dx / dy through M.
Inputs used
x and y (and z in 3D) for endpoints A and B.
Assumptions
A flat Cartesian grid with equal units on every axis.
Rounding
Double precision inside; up to 6 decimal places shown, trailing zeros trimmed.
Edge cases
A = B returns that point with a warning. Vertical and horizontal segments show the special bisector lines. Empty z fields in 3D ask for input.
Sources
OpenStax College Algebra 2e section 2.1, Intermediate Algebra 2e section 11.1 and Calculus Volume 3 section 2.2. See Sources below.
Last reviewed
2026-09-30.

Frequently Asked Questions About the Midpoint Formula

Does the order of the two points matter?

No. (x1 + x2) / 2 equals (x2 + x1) / 2, so swapping A and B gives the same midpoint.

Can a midpoint have fractional coordinates?

Yes. The midpoint of (0, 0) and (3, 1) is (1.5, 0.5). An odd sum always gives a half.

What is the midpoint of a point and the origin?

It is half of each coordinate. The midpoint of (8, -6) and (0, 0) is (4, -3).

How do I find the midpoint of three points?

Three points have no single midpoint. Their average, ((x1 + x2 + x3) / 3, ...), is the centroid of the triangle they form.

Is the midpoint always on the segment?

Yes. It lies on the straight segment AB, exactly half the length from each end.

How do I find the point one quarter of the way from A to B?

Take the midpoint of A and M. For A(-3, 5) and M(2, 2) that gives (-0.5, 3.5).

How is the midpoint used to find a circle center?

The center is the midpoint of any diameter. The radius is half the diameter length.

Why does my midpoint differ from a map app?

Map apps work on a sphere. Averaging latitude and longitude only approximates the halfway point, and the error grows with distance.

Can I find the midpoint of two numbers on a number line?

Yes. Use 2D with both y values set to 0. The midpoint of 3 and 11 is 7.

Is my data saved?

No. The math runs in your browser. Save keeps a copy only in your own browser storage.

Sources

Related Calculators

Need another geometry or algebra tool?

Explore all math calculators

This calculator is for study and general coordinate work on a flat grid. The halfway point between two places on a map measured in latitude and longitude is not the average of the coordinates, so use a geodesic method for navigation or survey work. Spotted an error? Let us know.

Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~ More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.