Logo

MonoCalc

/

Midpoint Calculator

Geometry

Point 1 (x₁, y₁)

X₁

Y₁

Point 2 (x₂, y₂)

X₂

Y₂

Midpoint

(5, 7)

Midpoint X (Mx)

5

Midpoint Y (My)

7

Segment Length

8.4853

Formula Breakdown

Mx = (2 + 8) / 2 = 5

My = (4 + 10) / 2 = 7

About This Tool

Midpoint Calculator – Find the Center of Any Line Segment

The midpoint of a line segment is the point that divides it into two equal halves. Whether you are working on a geometry assignment, designing a layout, programming a graphics engine, or bisecting a route on a map, the midpoint formula gives you the exact center coordinate with no guesswork.

The Midpoint Formula

Given two points (x₁, y₁) and (x₂, y₂) in the Cartesian plane, their midpoint M is:

M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)

In plain language: average the two x-values to get Mx, and average the two y-values to get My. The result is the coordinate that sits exactly halfway along the segment.

Step-by-Step Example

Suppose Point 1 is (2, 4) and Point 2 is (8, 10).

  • Mx = (2 + 8) / 2 = 10 / 2 = 5
  • My = (4 + 10) / 2 = 14 / 2 = 7
  • Midpoint = (5, 7)

You can verify this visually: the point (5, 7) lies exactly on the line between (2, 4) and (8, 10), dividing it into two segments of equal length.

Negative and Decimal Coordinates

The midpoint formula works identically for all real numbers. Points in any quadrant of the Cartesian plane — including negative coordinates and decimal values — are fully supported.

  • Points (-3, -5) and (7, 1): midpoint = ((-3 + 7) / 2, (-5 + 1) / 2) = (2, -2)
  • Points (1.5, 2.5) and (4.5, 6.5): midpoint = ((1.5 + 4.5) / 2, (2.5 + 6.5) / 2) = (3, 4.5)

Segment Length as Bonus Output

In addition to the midpoint, the calculator displays the segment length— the straight-line (Euclidean) distance between your two input points:

d = √((x₂ − x₁)² + (y₂ − y₁)²)

Having the segment length alongside the midpoint is useful when you need to split a known distance in half, check if a bisecting point falls within a required radius, or verify the geometry of a shape.

Common Applications

  • Geometry problems – finding the center of a triangle's side (used in midsegment theorems and centroid calculations)
  • Computer graphics – computing the center of a line, bounding box, or sprite for positioning and collision detection
  • Engineering and architecture – locating the midpoint of beams, pipelines, or structural members for load analysis
  • Mapping and navigation – finding the halfway point between two geographic locations when converting them to a flat coordinate system
  • Data visualization – centering labels between two data points on a chart

Degenerate Cases

When both points share the same x-coordinate, the segment is vertical and Mx = x₁ = x₂. When they share the same y-coordinate, the segment is horizontal and My = y₁ = y₂. If both coordinates are identical, the segment has zero length and the midpoint equals that single point — all of which this calculator handles without error.

Precision and Rounding

Results are computed using JavaScript's 64-bit floating-point arithmetic, which provides roughly 15 significant digits. Outputs are displayed to 4 decimal places with trailing zeros removed, so 3.0000 is shown as 3 and 4.5000as 4.5. You can copy any result to the clipboard with the copy button next to each value.

Frequently Asked Questions

Is the Midpoint Calculator free?

Yes, Midpoint Calculator is totally free :)

Can I use the Midpoint Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Midpoint Calculator?

Yes, any data related to Midpoint Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this midpoint calculator work?

Enter the x and y coordinates of two points (x₁, y₁) and (x₂, y₂). The calculator instantly applies the midpoint formula — Mx = (x₁ + x₂) / 2 and My = (y₁ + y₂) / 2 — and displays the midpoint coordinate along with the segment length between the two points.

What is the midpoint formula?

The midpoint formula states that the midpoint M of a line segment connecting (x₁, y₁) and (x₂, y₂) is M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2). It simply averages the x-coordinates and the y-coordinates separately to find the center point.

Can I use negative or decimal coordinates?

Yes. The calculator accepts any real number — positive, negative, or decimal — for all four coordinate fields. For example, points (-3.5, 2) and (4.5, -6) yield midpoint (0.5, -2).

What does the segment length represent?

The segment length is the straight-line (Euclidean) distance between the two input points, calculated as d = √((x₂ − x₁)² + (y₂ − y₁)²). It is provided as bonus context so you can understand both the center and the full span of the segment in one place.

What happens when both points are the same?

When both input points are identical, the midpoint is that same point and the segment length is 0. This is the degenerate case of a zero-length segment, and the calculator handles it correctly without error.

How accurate are the results?

Results use JavaScript's 64-bit floating-point arithmetic (IEEE 754), which provides approximately 15 significant digits of precision. Outputs are displayed rounded to 4 decimal places and trailing zeros are removed for clarity.