Skip to calculator
Calculate This

Midpoint calculator

Enter two points to get the midpoint of the segment between them in 2D or 3D, the distance AB and the slope, with every step shown.

Defaults to your region. Switch to compare any other scale.

Point A

Point B

Result

(5; 7)

Midpoint M

Exact: (5; 7) · Distance AB = 10

  • Midpoint M(5; 7)
  • Distance AB10
  • Distance from A to M5
  • Differences (Δ)Δx = 6; Δy = 8
  • Slope of AB1.333333

How it works

The midpoint averages each coordinate of A and B. It lies on segment AB at exactly half the distance from each end.

About this tool

Midpoint formula

The midpoint of A(x₁, y₁) and B(x₂, y₂) is M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). In 3D, also average the z coordinates.

Worked example

A(2, 3) and B(8, 11): M = ((2 + 8) ÷ 2, (3 + 11) ÷ 2) = (5, 7). The distance is √(6² + 8²) = 10, so M is 5 units from each end.

Formula

  • M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2, (z₁ + z₂) ÷ 2)
  • d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)
  • Slope (2D) = (y₂ − y₁) ÷ (x₂ − x₁)

How it is calculated

  1. Choose 2D or 3D.
  2. Enter the coordinates of point A.
  3. Enter the coordinates of point B.
  4. Read the midpoint, the distance AB and the slope.

Questions

What is the midpoint formula?

Average the x values and the y values: M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). For (−4, 1) and (6, 5) the midpoint is (1, 3).

How do I find an endpoint if I know the midpoint?

Double the midpoint and subtract the known end: B = 2M − A. With M(5, 7) and A(2, 3), B = (10 − 2, 14 − 3) = (8, 11).

Is this the same as the midpoint between two places on a map?

No. This tool works on flat (Cartesian) coordinates. For latitude and longitude on the Earth, use the geographic midpoint calculator, which accounts for the globe's curvature.

Sources

Related calculators