Distance & Midpoint Calculator
Find the distance between two points, the midpoint, slope, and angle. Interactive coordinate-plane visualization.
Math
Distance & Midpoint Calculator
Generated on April 25, 2026
Point A
Point B
Coordinate plane
Step-by-step calculation
Formula
d = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2). Slope = (y₂−y₁)/(x₂−x₁).
- 1A = (1, 2), B = (7, 10)
- 2Δx = x₂ − x₁ = 6, Δy = y₂ − y₁ = 8
- 3Distance = √((6)² + (8)²) = √100.0000 = 10.000000
- 4Midpoint = ((1 + 7)/2, (2 + 10)/2) = (4, 6)
- 5Slope m = 8 / 6 = 1.3333
- 6Angle from +x axis (counter-clockwise): 53.13°
?What is the Distance & Midpoint Calculator?
The Distance & Midpoint Calculator finds the straight-line (Euclidean) distance between two points in the 2D coordinate plane, plus their midpoint, the slope of the line connecting them, and the angle from the +x axis. Visualized on an auto-scaling coordinate plane with dashed right-triangle decomposition (Δx, Δy legs and the connecting hypotenuse) — making the Pythagorean origin of the distance formula obvious. Used in geometry homework, physics (vector magnitudes), surveying, computer graphics (collision detection, pathfinding), and game development.
The Formula
The distance formula is the Pythagorean theorem applied to the right triangle whose legs are Δx = x₂−x₁ and Δy = y₂−y₁. The hypotenuse of that triangle IS the distance from A to B. The midpoint formula is just the average of the two coordinates — geometrically it's the centroid of the line segment. The slope is rise-over-run; it equals tan(θ) where θ is the angle from the +x axis.
Practical Examples
Distance from (0,0) to (3,4): √(9+16) = √25 = 5. The 3-4-5 Pythagorean triple.
Midpoint of (1,2) and (7,10): ((1+7)/2, (2+10)/2) = (4, 6).
Slope from (0,0) to (1,1) = 1 — a 45° line.
Distance between (0,0) and (1,1) = √2 ≈ 1.414. The diagonal of a unit square.
Map applications: 2 GPS points (treating lat/lng as Cartesian) — the formula gives a straight-line approximation that's accurate over short distances.
Computer graphics: distance is the basis of every collision check ('is enemy within attack range?').
Frequently Asked Questions
Popular Conversions
Jump to a ready-made conversion — useful for quick reference and sharing:
Explore More Tools
GPA Calculator
Calculate your Grade Point Average on the 4.0 scale from your courses.
Grade Calculator
Calculate your final grade from weighted categories like tests, homework, and exams.
Student Result Card Calculator
Subject-wise marks, grades, and a printable school result card — ideal for small schools and parents.