How to use the midpoint calculator
Choose a dimension, enter the coordinate fields, and click Calculate. The result shows the point halfway between the two points, the coordinate averages, and the calculation steps. You can copy the generated text or download it as a text file.
- Select 2D or 3D.
- Enter the first point in x1 and y1, then enter the second point in x2 and y2. In 3D mode, fill in z1 and z2.
- Choose None or units in the Unit selector.
- Click Calculate. Review the result, then use Copy result or Download result (.txt) if you need the generated text elsewhere.
Midpoint formula for 2D and 3D coordinates
For 2D points, the calculator adds each matching pair and divides the sum by 2: M = ((x1 + x2) / 2, (y1 + y2) / 2). In 3D mode, z1 and z2 are averaged in the same way: M = ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2).
Point 1: (1, 2)
Point 2: (5, 6)
Midpoint: (3, 4)
The result area shows the midpoint, Mx and My, and Mz in 3D mode. The Steps list includes each coordinate sum and division. Displayed values use up to six decimal places.
What the Unit selector changes
The Unit selector contains None and units. Selecting units adds units after the displayed midpoint and in the downloadable text. The calculator does not convert coordinates, so enter both points using the same unit. With None selected, the script has no label for the empty option, so the generated midpoint line ends with undefined.
Why a coordinate midpoint can be rejected
Each coordinate must contain digits with an optional minus sign and decimal point. Blank fields, a leading plus sign, scientific notation such as 1e3, and other invalid text produce an error. The absolute value must be no greater than 1e12. Negative values, zero, and decimal values are accepted.
- 2D mode reads x1, y1, x2, and y2. Hidden z1 and z2 values do not add a third coordinate.
- Changing a dimension, coordinate field, or Unit hides the current result. Click Calculate again after the change.
- Reset clears the coordinate fields, hides the result, and selects 2D.
Privacy and calculation behavior
The page script calculates the midpoint in your browser. It has no fetch, XMLHttpRequest, sendBeacon, or form-post code for the coordinates, so the page does not send them to a server.
Where a coordinate midpoint comes up
The calculation averages coordinate numbers in flat 2D or 3D space. A latitude and longitude pair is treated as two numbers, so the result does not account for Earth's curvature or a GPS coordinate system.
When to use another math calculator
The Math Calculators category covers other equation and geometry tasks. Choose the Distance Formula Calculator for the straight-line distance between two 2D or 3D points.
Use the Geometry Calculator for slope, triangle area, circle measurements, polygon area, or solid measurements. Choose the Algebra Calculator for equations.
Frequently asked questions
What is the midpoint formula for two points?
The formula averages each matching coordinate. For 2D points, M = ((x1 + x2) / 2, (y1 + y2) / 2).
Can I calculate a 3D midpoint?
Select 3D, then enter z1 and z2 along with x1, y1, x2, and y2.
Why is my midpoint calculator input rejected?
An input is rejected when it is blank, uses invalid number text, or has an absolute value above 1e12. Scientific notation and a leading plus sign are rejected.
Does the midpoint calculator convert units?
The calculator does not convert coordinate values. Selecting units appends units to the displayed midpoint. With None selected, the generated midpoint line ends with undefined.
Can I use latitude and longitude in the midpoint calculator?
The calculator averages the values as flat Cartesian coordinates. It does not account for Earth's curvature or a GPS coordinate system.