Midpoint Calculator
Find the exact midpoint between two coordinate points — plus distance, slope, and line equation — instantly.
Last updated: March 2026
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
What Is the Midpoint Formula?
The midpoint of a line segment is the point that lies exactly halfway between two endpoints. Given two points P₁(x₁, y₁) and P₂(x₂, y₂) on the Cartesian plane, the midpoint M is:
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)
The logic is beautifully simple: you are averaging the x-values to find how far along the horizontal axis the midpoint sits, and averaging the y-values for the vertical position. Because the Cartesian plane has a uniform scale in every direction, the arithmetic mean of each coordinate gives you the geometric center of the segment.
This formula is derived from the section formula in coordinate geometry. If you divide a segment in the ratio 1:1 (i.e., into two equal halves), the dividing point's coordinates are exactly those averages.
Distance, Slope, and Line Equation
Beyond the midpoint itself, knowing two points lets you compute several other key quantities:
Distance Between Two Points
The distance formula is an application of the Pythagorean theorem. The horizontal gap (x₂ − x₁) and the vertical gap (y₂ − y₁) form the legs of a right triangle, and the straight-line distance between the points is the hypotenuse:
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Slope of the Line
Slope measures how steeply a line rises or falls. It is the ratio of the vertical change to the horizontal change:
m = (y₂ − y₁) / (x₂ − x₁)
A slope of 0 is perfectly horizontal. An undefined slope (division by zero) means a perfectly vertical line. Positive slopes rise left to right; negative slopes descend.
Equation of the Line
With slope m and any point on the line, you can write the equation in slope-intercept form: y = mx + b, where the y-intercept b = y₁ − m·x₁.
Real-World Applications of the Midpoint
The midpoint formula appears in many practical and academic contexts:
- Geometry proofs: Proving that a quadrilateral is a parallelogram by showing its diagonals bisect each other (share the same midpoint).
- Triangle midsegment theorem: The segment connecting midpoints of two sides is parallel to the third side and exactly half as long.
- GPS and navigation: Finding the halfway point of a journey for route planning or meeting-point calculations.
- Computer graphics: Midpoint algorithms (e.g., the Bresenham midpoint circle algorithm) use midpoints to rasterize curves efficiently.
- Engineering and construction: Locating the center of a beam, cable, or structural element for load balancing.
- Data science: Clustering algorithms use midpoints to update cluster centers iteratively (k-means).
Midpoint in 3D Space
The concept extends naturally to three dimensions. Given two points P₁(x₁, y₁, z₁) and P₂(x₂, y₂, z₂), the 3D midpoint is:
M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2)
You average each coordinate independently. This is used in 3D modeling, physics simulations, and GPS altitude calculations.
How to Calculate Midpoint If...
How to find the midpoint of (0, 0) and (10, 10)?
The midpoint of (0, 0) and (10, 10) is (5, 5). Average x: (0 + 10) / 2 = 5. Average y: (0 + 10) / 2 = 5. This lies on the line y = x.
How to find the midpoint of (−3, 7) and (5, −1)?
The midpoint is (1, 3). x = (−3 + 5) / 2 = 1, y = (7 + (−1)) / 2 = 3.
How to find the midpoint of (1.5, 2.5) and (4.5, 8.5)?
The midpoint is (3, 5.5). x = (1.5 + 4.5) / 2 = 3, y = (2.5 + 8.5) / 2 = 5.5. The formula works with decimals and fractions.
How to find the endpoint if I know the midpoint?
Rearrange the midpoint formula. If M = (mx, my) and one endpoint is (x₁, y₁), then the other endpoint is x₂ = 2mx − x₁, y₂ = 2my − y₁.
How to find the midpoint of a vertical line segment?
For a vertical segment, the x-coordinates are equal. Example: (3, 2) and (3, 10) have midpoint (3, 6). The segment has undefined slope but a perfectly defined midpoint.
How to find the midpoint of a horizontal line segment?
For a horizontal segment, the y-coordinates are equal. Example: (−4, 5) and (8, 5) have midpoint (2, 5). Slope is 0.
How to find the midpoint of (100, 250) and (300, 750)?
The midpoint is (200, 500). x = (100 + 300) / 2 = 200, y = (250 + 750) / 2 = 500.
How to find the distance from a point to the midpoint?
Once you have the midpoint coordinates, use the distance formula. The midpoint is exactly half the total segment length from each endpoint, so d(P₁, M) = d(M, P₂) = d(P₁, P₂) / 2.
People Also Search For
How to find the midpoint of a line segment on a graph?
Count grid squares to find the halfway point visually, or use the formula for precision. On graph paper, note both endpoints' coordinates, add the x-values and divide by 2, do the same for y-values, then plot the resulting point.
Midpoint calculator with negative numbers
The formula works identically with negative coordinates. Example: midpoint of (−6, −4) and (2, 10) is ((−6+2)/2, (−4+10)/2) = (−2, 3).
How to find the midpoint of a diameter to get the circle center?
The center of a circle is the midpoint of any diameter. If the diameter endpoints are (x₁, y₁) and (x₂, y₂), the center is at ((x₁+x₂)/2, (y₁+y₂)/2) and the radius is half the diameter length.
What is the midpoint theorem in triangles?
The triangle midpoint theorem states that the segment joining the midpoints of two sides is parallel to the third side and half its length. This is used to prove properties of similar triangles and parallelograms.
How to calculate slope from two points?
Slope = (y₂ − y₁) / (x₂ − x₁). For example, the slope from (1, 2) to (5, 10) is (10 − 2) / (5 − 1) = 8 / 4 = 2. A slope of 2 means for every 1 unit right, the line rises 2 units.
Distance formula vs midpoint formula — what's the difference?
The distance formula gives a scalar (a number) representing how far apart two points are. The midpoint formula gives a coordinate pair (a point) representing the location halfway between them. They use similar arithmetic but answer different questions.
Frequently Asked Questions
What is the midpoint formula?
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2). Average the x-coordinates for the midpoint x, and average the y-coordinates for the midpoint y.
What is the midpoint of (2, 4) and (6, 8)?
The midpoint is (4, 6). x = (2+6)/2 = 4, y = (4+8)/2 = 6. The distance between the two points is approximately 5.66 units.
Can the midpoint have decimal values?
Yes. If the sum of two coordinates is odd (e.g., 3 + 4 = 7), the midpoint coordinate is 3.5. Decimal midpoints are perfectly valid and common.
How do I find the midpoint in 3D?
Extend the formula to three coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2). Average each axis independently.
What is the difference between midpoint and median?
In geometry, the midpoint bisects a segment. A median of a triangle connects a vertex to the midpoint of the opposite side. In statistics, the median is the middle value in a sorted dataset — a different concept entirely.
Does this calculator work with fractions?
Enter fractions as their decimal equivalents (e.g., 1/4 as 0.25). The calculator handles all real numbers including decimals and negatives.
What does it mean if the slope is undefined?
An undefined slope occurs when x₁ = x₂ (a vertical line). Division by zero has no result, so slope is listed as "undefined." The line runs straight up and down.
Is my data stored when I use this calculator?
No. All calculations happen entirely in your browser. No coordinates or results are sent to any server.
How accurate are the results?
Results are computed using IEEE 754 double-precision floating-point arithmetic (JavaScript's native number type), accurate to roughly 15 significant digits — far more than any practical application requires.
Can I find the midpoint of more than two points?
This tool finds the midpoint between exactly two points. For the centroid (center of mass) of three or more points, average all x-coordinates together and all y-coordinates together. For a triangle with vertices (x₁,y₁), (x₂,y₂), (x₃,y₃), the centroid is ((x₁+x₂+x₃)/3, (y₁+y₂+y₃)/3).