Math

Midpoint of a Line Segment Calculator

Midpoint and length of a line segment between two points.

Enter your values

Enter the point 1 x you are working with.

Enter the point 1 y you are working with.

Enter the point 2 x you are working with.

Enter the point 2 y you are working with.

Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.

Results
Midpoint
(2, 1)
Segment length
8.9443
Point 1
(-2, 3)
Point 2
(6, -1)

Quick answer

The midpoint averages the x-coordinates and averages the y-coordinates of the two endpoints.

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

At a glance

What it doesMidpoint and length of a line segment between two points.
CategoryMath
Inputs neededPoint 1 x, Point 1 y, Point 2 x, Point 2 y
Main outputMidpoint
FormulaM = ((x1+x2)/2, (y1+y2)/2)
CostFree — no sign-up, no download

How to use the Midpoint of a Line Segment Calculator

  1. 1Enter the coordinates of both endpoints.
  2. 2Average the x-values and the y-values separately to get the midpoint.
  3. 3The distance formula gives the full segment length for reference.

Inputs explained

Point 1 x
Enter the point 1 x you are working with.
Point 1 y
Enter the point 1 y you are working with.
Point 2 x
Enter the point 2 x you are working with.
Point 2 y
Enter the point 2 y you are working with.

Worked example

Using the values the calculator loads with:

Inputs

  • Point 1 x-2
  • Point 1 y3
  • Point 2 x6
  • Point 2 y-1

Results

  • Midpoint(2, 1)
  • Segment length8.9443
  • Point 1(-2, 3)
  • Point 2(6, -1)

Frequently asked questions

Does this work in 3D?

This tool covers 2D points; extend the same averaging pattern with a z-coordinate for 3D.

What if the points are the same?

The midpoint equals that point and the segment length is zero.

What do I need to enter into the Midpoint of a Line Segment Calculator?

Just 4 values: point 1 x, point 1 y, point 2 x, point 2 y. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.

How does the Midpoint of a Line Segment Calculator work out the answer?

The midpoint averages the x-coordinates and averages the y-coordinates of the two endpoints. It applies the formula M = ((x1+x2)/2, (y1+y2)/2) and shows the working so you can check each step by hand.

Is the Midpoint of a Line Segment Calculator free, and do I need an account?

It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.

Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.