Midpoint of segment

Type x₁, y₁, x₂, y₂. The midpoint is the average of the coordinates. (0,0) and (4,6) give M = (2, 3). (0,0) and (1,1) give M = (0.5, 0.5). (−2,3) and (4,1) give M = (1, 2).

The result is the text M = (x, y), not one number. Each coordinate is rounded to six places.

Input data

Results

Enter data and click Calculate.

How it works

The midpoint of a segment sits halfway. The calculator computes mx = (x₁+x₂)/2 and my = (y₁+y₂)/2, rounds each with round(v×1e6)/1e6, and builds the text M = (mx, my). (0,0) and (4,6) give M = (2, 3).

The fields are x₁, y₁, x₂, y₂. The IDs stay a, b, c, d. (0,0) and (1,1) give M = (0.5, 0.5), a JS decimal point. (−2,3) and (4,1) give M = (1, 2).

An empty field is read as 0. Swapping the ends does not move the midpoint: (4,6) and (0,0) also give M = (2, 3). This is not the segment length.

Distance of the same points is on the neighbouring page. There one number after a 1e6 round. Pythagoras finds legs, not a midpoint.

The header units switch does not multiply anything. 0,0,4,6 stay M = (2, 3) whatever the label says.

(0,0) and (4,6) give M = (2, 3). (0,0) and (1,1) give M = (0.5, 0.5). (−2,3) and (4,1) give M = (1, 2). Each coordinate is the average of the ends.

Formula

M = ((x₁+x₂)/2, (y₁+y₂)/2), each coordinate through Math.round(v × 1e6) / 1e6

How to use

  1. Type x₁, y₁, x₂, y₂, for example 0, 0, 4, 6.
  2. Click Calculate. The result is the text M = (2, 3).
  3. (0,0) and (1,1) give M = (0.5, 0.5). (−2,3) and (4,1) give M = (1, 2).
  4. This is not one number. The calculator builds M = (x, y).
  5. The length of that segment lives on the distance card.

(0,0) and (4,6) give M = (2, 3)

The midpoint is the average of the ends. The result is the text M = (x, y). (0,0) and (4,6) give M = (2, 3). (0,0) and (1,1) give M = (0.5, 0.5).

midpoint
Halfway on the segment. (0,0) and (4,6) give M = (2, 3). (−2,3) and (4,1) give M = (1, 2).
segment
Two ends, four fields. This is not a length. Length is on the neighbouring page.
coordinate
x and y each through round×1e6. 0.5 stays 0.5 in M = (0.5, 0.5).

Examples

Example 1

  • (0, 0)
  • (4, 6)

M = (2, 3)

What is the midpoint from (0,0) to (4,6)? M = (2, 3). Average of the coordinates.

Example 2

  • (0, 0)
  • (1, 1)

M = (0.5, 0.5)

What is the midpoint from (0,0) to (1,1)? M = (0.5, 0.5). A JS decimal point.

Example 3

  • (−2, 3)
  • (4, 1)

M = (1, 2)

What is the midpoint from (−2,3) to (4,1)? M = (1, 2).

Related calculators

Common questions

What is the midpoint from (0,0) to (4,6)?

M = (2, 3). (0+4)/2 = 2, (0+6)/2 = 3.

What does midpoint of a segment mean?

The halfway point. Average x and average y. The calculator writes M = (x, y).

What about (0,0) to (1,1)?

M = (0.5, 0.5). Text with a dot, because that is how the result is written.

What about (−2,3) to (4,1)?

M = (1, 2). (−2+4)/2 = 1, (3+1)/2 = 2.

Is the result one number?

No. The calculator builds the text M = (mx, my).

Does swapping the ends move the midpoint?

No. (4,6) and (0,0) also give M = (2, 3).

What if a field is empty?

It is read as 0. Empty x₁ y₁ mean the origin.

Does the result always have six decimals?

No. Each coordinate goes through round(v×1e6)/1e6. 2 stays 2.

Where is the segment length?

On the distance-between-two-points card. One number there.

Does a comma in 1.5 work?

Yes. 1.5 and 1,5 are the same coordinate.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.