Worked examples
Grade 12: A(1, 2, 3), B(4, 6, 15)
√(9 + 16 + 144) = √169 = 13
Grade 12: the midpoint of A(1, 2, 3) and B(5, 6, 7)
(3, 4, 5)
Grade 12: the point dividing A(0, 0, 0) and B(6, 3, 9) in the ratio 2 : 1
(4, 2, 6)
How to use it
- Choose what to find (distance / midpoint / division point).
- Enter the x, y and z of points A and B; for points in the plane leave z blank.
- For a division point also enter the ratio m : n. Read the value and the intermediate steps.
What this calculates
In the coordinate plane the distance between A(x₁, y₁) and B(x₂, y₂) follows from the Pythagorean theorem as √((x₂−x₁)² + (y₂−y₁)²); in space add the difference of the z coordinates. The midpoint of AB is the average of each coordinate. The internal division point P that splits AB in the ratio m : n is P = (n·A + m·B) ÷ (m + n), which is the midpoint when m = n. It is taught in the coordinate plane and space coordinates units of upper secondary school.
The formulas
- Distance (plane) AB = √((x₂−x₁)² + (y₂−y₁)²)
- Distance (space) AB = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
- Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2)
- Division point P = ((m·x₂ + n·x₁)/(m+n), (m·y₂ + n·y₁)/(m+n), (m·z₂ + n·z₁)/(m+n))
Reference table
| Input | Result |
|---|---|
| (0, 0, 0), (1, 2, 2) | 3 |
| (1, 2, 3), (4, 6, 3) | 5 |
| (0, 0, 0), (3, 4, 12) | 13 |
| (1, 1, 1), (2, 2, 2) | √3 |
| (-1, 0, 2), (3, 0, 5) | 5 |
Good to know
- For vector magnitude and dot product, see the Vector Calculator.
- For right triangle sides, try the Right Triangle Calculator.
Frequently asked questions
What is the difference between internal and external division?
Internal division is on the segment AB; external division is on its extension. This calculator finds only internal division points.
Which side are m and n in m : n?
AP : PB = m : n. The larger m is, the closer P is to B.
What happens when I leave z blank?
z is treated as 0, the points are handled in the plane and the results are shown as (x, y).
Is the distance only a decimal?
No. When it is exact it is shown as an integer or radical (for example 3√2) together with the decimal.
What if the two points are the same?
The distance is 0 and the midpoint is that same point.
Are my numbers stored?
No. Everything is calculated in your browser and nothing is sent to a server or saved.
Last updated 2026-12-02 · For reference only; not investment, tax or legal advice.