Coordinate geometry calculator
Distance, midpoint and slope between two points on a coordinate plane.
Formula
How it works
Distance uses the Pythagorean theorem on the horizontal and vertical gaps between the points. The midpoint averages the x-coordinates and the y-coordinates separately. The slope is the vertical change divided by the horizontal change; it is undefined for a vertical line.
Worked example
The same calculation with the default values:
- x₁ 1
- y₁ 2
- x₂ 7
- y₂ 10
- distance = √((7 − 1)² + (10 − 2)²) = 10
- midpoint = ((1 + 7) ÷ 2, (2 + 10) ÷ 2)
- slope = (10 − 2) ÷ (7 − 1) = 1.333333
Result: Distance: 10 · Midpoint x: 4 · Midpoint y: 6
Common mistakes
- Subtracting coordinates in the wrong order inconsistently between x and y (e.g. x₂−x₁ but y₁−y₂) - the order must be consistent in both the distance and slope formulas, though the distance formula's squaring hides this particular mistake while the slope formula does not.
- Confusing midpoint with distance - the midpoint is a point (an x,y location halfway between), not a length; they answer different questions and use different formulas.
- Treating a vertical line's undefined slope as zero - a slope of zero describes a horizontal line, the opposite case; a vertical line's slope is undefined, not zero.
Related calculators
Binomial probability calculator
The probability of exactly k successes in n independent trials, each with the same success probability.
Circle calculator
Diameter, circumference and area of a circle from its radius.
Combinations and permutations calculator
How many ways to arrange or choose r items from n, with and without order mattering.
Conditional probability calculator
P(A given B) and P(B given A) from P(A), P(B) and P(A and B), with an independence check.