Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
CalculatorZilo Logo
Home / Math Calculators / Midpoint Calculator
Geometry Calculators

Midpoint Calculator

Published onSeptember 18, 2025 Updated onOctober 23, 2026 10:01 pm

The midpoint of two points is the point exactly halfway between them: average the x-coordinates, average the y-coordinates, and you have it. This calculator does that in 2D or 3D, adds the distance between the points and the slope of the segment, accepts fractions and mixed numbers such as 1 1/2, and can average any number of points at once in centroid mode, with the full working shown for every answer.

Midpoint Calculator

2D and 3D midpoints, distance, slope, and multi-point centroids

Quick Answer

For two points (x1, y1) and (x2, y2), the midpoint is M = ((x1 + x2) / 2, (y1 + y2) / 2). Example: (2, 3) and (8, 7) give M = (5, 5), a distance of 7.2111, and a slope of 0.6667. In 3D, average the z-coordinates as well. For three or more points, centroid mode averages every point the same way.

On this page
  • Quick Answer
  • How to use this midpoint calculator
  • The midpoint formula, plus distance and slope
  • Worked example: (2, 3) and (8, 7), checked line by line
  • Fraction and mixed-number input
  • Midpoint vs centroid: which mode do you need?
  • What competing calculators miss
  • Frequently asked questions
  • Add This Calculator to Your Website
  • References

How to use this midpoint calculator

Pick a mode, enter your coordinates, and press Calculate. The result stays hidden until you do, so the prefilled example never masquerades as your answer.

  1. Choose the calculation type. Two points in 2D is the standard midpoint. Two points in 3D adds a z-coordinate to each point. Centroid mode averages a list of points instead.
  2. Enter the coordinates. Plain decimals work, and so do fractions like 3/4 and mixed numbers like 1 1/2 or -2 3/4. In centroid mode, type one point per line with commas between coordinates.
  3. Press Calculate. You get the midpoint (or centroid), the distance between the two points, the slope in 2D mode, and the complete step-by-step working.
  4. Copy or share the result, or press Reset to restore the worked example values.

Bad input is called out, not silently fixed. A blank box, a word, or a fraction with denominator 0 stops the calculation with a message naming the field, and in centroid mode a message names the offending line. That is deliberate: a midpoint computed from a guessed coordinate is worse than no midpoint.

The midpoint formula, plus distance and slope

Three formulas do all the work on this page, and each one is just averaging or Pythagoras in disguise.

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

Midpoint (3D): M = ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2)

Distance: d = √((x2 − x1)² + (y2 − y1)²), with a third squared term added in 3D

Slope (2D only): m = (y2 − y1) / (x2 − x1)

The midpoint formula works because the halfway point sits at the average position on every axis independently. The distance formula is the Pythagorean theorem applied to the horizontal and vertical gaps between the points; if you only need lengths, this site's distance calculator covers 2D, 3D, and coordinate distance with unit options. Slope measures steepness, and it has one honest exception: when x1 equals x2 the segment is vertical, the division is by zero, and the slope is undefined. The calculator says so instead of printing a fake number.

Worked example: (2, 3) and (8, 7), checked line by line

The prefilled values in the calculator are exactly this example, so you can reproduce every line below by pressing Calculate.

Midpoint: average each pair of coordinates. x: (2 + 8) / 2 = 5 y: (3 + 7) / 2 = 5 M = (5, 5) Distance = sqrt((8 - 2)2 + (7 - 3)2) = 7.2111 Distance from each endpoint to M: 3.6056 (equal, as expected). Slope = (7 - 3) / (8 - 2) = 0.6667.

Two display details worth knowing. The tool prints squared terms as a trailing 2, so "(8 - 2)2" means (8 - 2) squared. And the last check line is the real proof the answer is right: both endpoints sit exactly 3.6056 from M, half of 7.2111, which is what "midpoint" promises. In 3D mode, (1, 2, 3) and (7, 4, 11) give M = (4, 3, 7) with a distance of 10.198. In centroid mode, the three points (0, 0), (3, 0), and (0, 3) average to (1, 1), the balance point of the triangle's corners.

Fraction and mixed-number input

Coordinates in textbooks and shop drawings are often fractions, so every box on this page parses them directly instead of forcing you to convert by hand.

You typeThe calculator readsFormat
3/40.75Fraction
1 1/21.5Mixed number
-2 3/4-2.75Negative mixed number
2.52.5Decimal

The steps keep the original text next to the converted value, so a line reads "x: (1 1/2 (= 1.5) + 5) / 2 = 3.25" and you can audit the conversion at a glance. The same parser runs inside centroid mode, so fraction coordinates work in the pasted point list too. A fraction with denominator 0 is rejected with an error, since it has no value.

Midpoint vs centroid: which mode do you need?

A midpoint belongs to a single segment: two endpoints, one halfway point. A centroid is the average position of a whole set of points, which is why it shows up as the balance point of a triangle's vertices, the centre of a cluster of survey readings, or the average location in data work.

ModeYou enterYou get
Two points, 2Dx1, y1, x2, y2Midpoint, distance, slope
Two points, 3Dx1, y1, z1, x2, y2, z2Midpoint, distance (no slope)
Centroid2 or more points, one per lineCentroid, point count, dimensions

Centroid mode accepts points of any equal dimension, not just 2D and 3D: two 4D points average coordinate by coordinate exactly the same way. If your points are the vertices of a shape and you need its geometric centre with area weighting, the dedicated centroid calculator is the better tool. And if you already know a midpoint and one endpoint and need the other end, the endpoint calculator runs this formula backwards.

Key takeaways

  • The midpoint is an average, one axis at a time. If a result is not the average of the two endpoints on every axis, it is wrong.
  • Vertical segments have no slope. Any tool that prints a number for one is inventing it.
  • The distance from each endpoint to the midpoint must be equal. That check, printed in the steps, catches most sign and swap errors.
  • Two points give a midpoint; three or more give a centroid. The words are not interchangeable.

What competing calculators miss

The midpoint formula is simple, so tools differ on everything around it: input formats, extra outputs, and how honestly they handle edge cases.

  • Omni Calculator runs a clean 2D midpoint tool, but its centroid lives in a separate calculator, so averaging three or more points means starting over on another page.
  • OnlyCalculators' Coordinate Grid Calculator adds a line equation, angle of inclination, and perpendicular bisector, which is genuinely useful, but it is 2D only: no 3D points and no multi-point centroid.
  • MiniWebTool draws an interactive graph and reports extras such as the perpendicular bisector slope, yet it also stops at two points in 2D.
  • NumericCore and Cuemath explain the formula well with worked examples, but their tools take plain decimals only and stop at the midpoint and distance.
  • The smaller middle point calculator that used to sit on this site covered 2D and 3D midpoints with distance, but took decimals only, showed no working, reported no slope, and quietly treated a blank field as zero. It has been retired into this page, the fuller version: fractions, steps, slope, and errors that name the problem.
  • The gap this page fills: 2D, 3D, and any-dimension centroid in one tool, fraction and mixed-number input in every field including the centroid list, a slope that admits when it is undefined, and a built-in equal-distance check in the steps.

Frequently asked questions

The midpoint is the point exactly halfway between two endpoints. Average the x-coordinates and the y-coordinates separately: M = ((x1 + x2) / 2, (y1 + y2) / 2). For (2, 3) and (8, 7), the midpoint is (5, 5).

Yes. Every coordinate box accepts decimals, fractions such as 3/4, and mixed numbers such as 1 1/2 or -2 3/4. The step-by-step working shows each fraction next to its decimal value, so 1 1/2 appears in the steps as 1 1/2 (= 1.5).

A midpoint belongs to exactly two points: it is the halfway point of the segment joining them. A centroid averages any number of points, two or more, and gives their average position. With exactly two points, the centroid and the midpoint are the same point.

Slope divides the change in y by the change in x. On a vertical segment x does not change, so the division is by zero and the slope is undefined. The midpoint and distance are still computed normally. The calculator also reports undefined when the two points are identical, because x1 equals x2 there too.

Yes. Choose the 3D mode and average the z-coordinates the same way: M = ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2). The distance formula gains a third squared term under the square root, and no slope is reported in 3D.

Any number from two upward, one point per line, with commas between the coordinates. Every point must have the same number of coordinates. The points can have two, three, or more coordinates each, and fractions and mixed numbers work in centroid lines too.

Midpoint questions often continue into distance or perpendicular bisector problems. The distance is the full segment length, and the working also shows the distance from each endpoint to the midpoint. That second number is exactly half the distance, which confirms the midpoint really is halfway.

No. The calculator works with pure numbers from whatever single coordinate system your points use. Keep every coordinate in the same system and the same unit: mixing metres on one axis with feet on the other produces a meaningless midpoint and distance.

Add This Calculator to Your Website

Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.

Powered by Calculator Zilo

References

  1. OpenStax, Rice University. Intermediate Algebra 2e, Section 11.1: Distance and Midpoint Formulas; Circles. Accessed October 22, 2026.
  2. LibreTexts. Advanced Algebra, Section 8.1: Distance, Midpoint, and the Parabola. Accessed October 22, 2026.
  3. Weisstein, Eric W. "Midpoint." Wolfram MathWorld. Accessed October 22, 2026.
  4. Math Open Reference. Midpoint of a Line Segment (Coordinate Geometry). Accessed October 22, 2026.
  5. Wolfram Research. Wolfram Language Documentation: Midpoint (defines the midpoint for point lists in any number of dimensions). Accessed October 22, 2026.

Related calculators

Geometry Calculators45 45 90 Triangle Calculator A 45-45-90 triangle is the isosceles right triangle: two equal legs, a right angle, and a hypotenuse that is always the leg times √2.Geometry CalculatorsPerimeter Formula Calculator – Calculate Perimeter of Any Shape InstantlyGive this calculator a shape and its dimensions and it returns the perimeter with the formula written out and your numbers substituted, so you can follow every step.Geometry CalculatorsParallel Or Perpendicular CalculatorAre two lines parallel, perpendicular, or neither?Geometry Calculators30 60 90 Calculator: Solve Any Triangle FastA 30-60-90 triangle locks its sides into the ratio 1: √3: 2, so a single known value fixes the whole triangle.Geometry CalculatorsSin Calculator: Free Trigonometry Tool OnlineA sin calculator should do more than one ratio.Geometry CalculatorsGeometric Formula CalculatorSix shapes account for most geometry homework and most job-site measurement questions: rectangle, circle, triangle, square, sphere and cylinder.

We use cookies to analyze traffic. You can accept or decline cookies below. Learn more

calculatorzilo

CalculatorZilo

Free calculators for everyday life. No signup, no cost, just answers.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Popular tools

Mortgage Payment Calculator BMI Walking Calculator Salary Per Minute Calculator Percentage Off Calculator

Company

About Us Contact Us Privacy Policy Terms and Conditions
Disclaimer Cookie Policy DMCA Policy Affiliate Disclosure FAQ Accessibility Statement

© 2026 CalculatorZilo • Free calculators for everyone

  • Home
  • Calculators
    • Browse all calculators
    • Education
    • Real Estate
    • Chemistry
  • Finance
  • Math
  • Health & Fitness
  • Science
  • About
  • Contact
Search