Midpoint Calculator | Two Points
Find the midpoint between two points in 2D or 3D coordinate space.
What Is the Midpoint Calculator | Two Points?
The Midpoint Calculator finds the exact centre point between two coordinates in 2D or 3D. Beyond the midpoint, it computes the distance between the points, the slope of the segment, the perpendicular bisector equation, and can find any division point using the section ratio formula, all with step-by-step working.
- ›2D and 3D modes: toggle between two-coordinate (x, y) and three-coordinate (x, y, z) input for spatial geometry problems.
- ›Section ratio tool: find the point that divides segment P₁P₂ in any ratio m:n, midpoint is the special case m:n = 1:1.
- ›Perpendicular bisector: computes the full equation of the perpendicular bisector line through the midpoint (2D only).
- ›Slope and distance: the slope of P₁P₂ and the Euclidean distance are shown alongside the midpoint for complete segment analysis.
- ›Step-by-step working: every calculation is broken down into numbered steps so you can follow the arithmetic exactly.
Formula
| Quantity | Formula | Description |
|---|---|---|
| Midpoint (2D) | M = ((x₁+x₂)/2, (y₁+y₂)/2) | Centre of segment P₁P₂ |
| Midpoint (3D) | M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2) | Centre in 3D space |
| Distance | d = √((x₂−x₁)²+(y₂−y₁)²) | Euclidean distance P₁→P₂ |
| Slope (2D) | m = (y₂−y₁)/(x₂−x₁) | Rise over run |
| Perpendicular slope | m⊥ = −1/m | Slope of bisector (2D) |
| Section ratio point | P = ((mx₂+nx₁)/(m+n), (my₂+ny₁)/(m+n)) | Divides P₁P₂ in ratio m:n |
How to Use
- 1Choose 2D or 3D mode using the toggle at the top.
- 2Enter the x and y coordinates (and z for 3D) for Point 1.
- 3Enter the coordinates for Point 2.
- 4Click "Calculate", or press Enter from any field, to compute all results.
- 5Read the midpoint coordinates in the result card at the top.
- 6Check slope, distance, and perpendicular bisector in the detail cards below.
- 7To find a section ratio point, enter the m and n ratio values and recalculate.
Example Calculation
Example 1, Midpoint in 2D
Example 2, Section ratio point (m:n = 2:1)
3D midpoint tip
Understanding Midpoint | Two Points
The Midpoint Formula Explained
The midpoint is the arithmetic mean of the two endpoint coordinate pairs. Each coordinate of the midpoint is the average of the corresponding coordinates of the endpoints. This can be derived geometrically: the midpoint M lies on segment P₁P₂ at equal distance from both ends, and parametrically it is the point at parameter t = 0.5 on the line segment P(t) = P₁ + t(P₂ − P₁).
Substituting t = 0.5: P(0.5) = 0.5P₁ + 0.5P₂ = ((x₁+x₂)/2, (y₁+y₂)/2). The formula generalises directly to any number of dimensions by averaging each coordinate independently.
- ›Midpoint divides the segment in the ratio 1:1.
- ›Applying midpoint twice gives the quarter-points at t = 0.25 and t = 0.75.
- ›The centroid of a triangle is the average of all three vertices: G = ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3).
- ›Midpoints are used in bisection algorithms for root finding in numerical methods.
The Section Ratio Formula
The section formula generalises the midpoint: given two points P₁(x₁, y₁) and P₂(x₂, y₂), the point that divides segment P₁P₂ in the ratio m:n (measured from P₁ to P₂) is:
- ›Ratio 1:1 gives the midpoint (m = n = 1).
- ›Ratio 1:0 gives P₂; ratio 0:1 gives P₁.
- ›The formula works for external division too: use a negative ratio to place the point outside the segment.
- ›In 3D, apply the same formula to each of x, y, and z independently.
Perpendicular Bisector of a Segment
The perpendicular bisector of segment P₁P₂ is the line that passes through the midpoint M and is perpendicular to P₁P₂. It is the locus of all points equidistant from P₁ and P₂, making it essential in geometry for finding circumcentres, Voronoi diagrams, and geometric constructions.
- ›The slope of the bisector is the negative reciprocal of the slope of P₁P₂: m⊥ = −1/m.
- ›If P₁P₂ is horizontal (slope 0), the perpendicular bisector is a vertical line x = Mx.
- ›If P₁P₂ is vertical (undefined slope), the perpendicular bisector is a horizontal line y = My.
- ›Two perpendicular bisectors of different sides of a triangle intersect at the circumcenter, the center of the circumscribed circle.
Distance Formula and Its Relationship to Midpoint
The Euclidean distance d = √((x₂−x₁)² + (y₂−y₁)²) is derived from the Pythagorean theorem: the horizontal and vertical differences form the legs of a right triangle with hypotenuse d. Knowing the midpoint M and the total distance d, the half-distance d/2 gives the radius of the circle centred at M that passes through both P₁ and P₂.
- ›In 3D: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²), extends the Pythagorean theorem.
- ›Manhattan distance (grid navigation): |x₂−x₁| + |y₂−y₁|.
- ›Chebyshev distance (chess king moves): max(|x₂−x₁|, |y₂−y₁|).
- ›The midpoint lies at distance d/2 from both endpoints, useful for circle constructions.
Frequently Asked Questions
How do you find the midpoint between two points?
To find the midpoint between P₁(x₁, y₁) and P₂(x₂, y₂), average each coordinate separately:
For example, P₁ = (3, 5) and P₂ = (9, 1): Mx = (3+9)/2 = 6, My = (5+1)/2 = 3, so M = (6, 3). You can verify this by checking that M is equidistant from both points.
What is the difference between the midpoint and the section ratio point?
The midpoint is the special case of the section ratio point where the ratio is 1:1, the point exactly halfway between P₁ and P₂. The section ratio formula allows you to find any point that divides the segment in a specified ratio m:n.
For ratio m:n, the point P is m/(m+n) of the way from P₁ to P₂:
With m=1, n=1 this reduces exactly to the midpoint formula.
How do I find the midpoint in 3D coordinates?
The 3D midpoint formula adds a third coordinate dimension, simply average z as well:
For P₁ = (1, 2, 3) and P₂ = (5, 6, 7): M = (3, 4, 5). The principle is identical to 2D, average each coordinate pair independently. Use the 3D toggle in this calculator to enter z-coordinates.
What is the perpendicular bisector and how is it calculated?
The perpendicular bisector of segment P₁P₂ passes through the midpoint M and is perpendicular to P₁P₂. Every point on this line is equidistant from P₁ and P₂.
- ›Compute the midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2)
- ›Compute the slope of P₁P₂: m = (y₂−y₁)/(x₂−x₁)
- ›The perpendicular slope is m⊥ = −1/m (negative reciprocal)
- ›Write the line through M with slope m⊥: y − My = m⊥(x − Mx)
Special cases: if P₁P₂ is horizontal (m = 0), the bisector is vertical (x = Mx). If P₁P₂ is vertical, the bisector is horizontal (y = My).
How is the midpoint formula used in real-world applications?
The midpoint formula appears across many practical and scientific applications:
- ›Mapping and navigation: finding the geographic centre between two locations (average latitude and longitude).
- ›Computer graphics: midpoint subdivision algorithms for Bézier curves; finding the centre of a line segment for rendering.
- ›Structural engineering: locating the midspan of a beam where maximum deflection typically occurs.
- ›Numerical analysis: the bisection method for root-finding repeatedly computes midpoints of intervals.
- ›Game development: collision detection, pathfinding, and lerp (linear interpolation) between positions.
Given the midpoint and one endpoint, how do I find the other endpoint?
If you know the midpoint M = (Mx, My) and one endpoint P₁ = (x₁, y₁), rearrange the midpoint formula:
Example: M = (5, 7) and P₁ = (2, 3). Then x₂ = 2×5 − 2 = 8 and y₂ = 2×7 − 3 = 11, so P₂ = (8, 11). This works in 3D too: z₂ = 2·Mz − z₁.
What is the distance formula and how does it relate to the midpoint?
The distance formula gives the Euclidean distance between two points, derived from the Pythagorean theorem:
The midpoint M lies exactly d/2 from each endpoint. So d/2 is the radius of the circle centred at M that passes through both P₁ and P₂. This connection is used in the circumscribed circle construction: the perpendicular bisectors of a triangle's sides meet at the circumcenter, equidistant from all three vertices.