Distance Calculator
Calculate distance between two points using the distance formula
Distance
—
Related Calculators
Frequently Asked Questions
What is the distance formula?
Distance = sqrt((x2-x1)^2 + (y2-y1)^2). This is derived from the Pythagorean theorem: the distance is the hypotenuse of a right triangle with legs (x2-x1) and (y2-y1). For a 3D distance: sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2).
How do I find the midpoint of two points?
Midpoint = ((x1+x2)/2, (y1+y2)/2). The midpoint is exactly halfway between the two points. For a line segment from (2,4) to (8,10): midpoint = ((2+8)/2, (4+10)/2) = (5, 7).
What is the slope between two points?
Slope = (y2-y1)/(x2-x1) = rise/run. A positive slope goes up-right. Negative slope goes down-right. Zero slope is horizontal. Undefined slope is vertical (x1=x2). Slope is the m in y = mx + b (slope-intercept form).
How do I calculate geographic distance between cities?
For real-world coordinates (latitude/longitude), use the Haversine formula or spherical law of cosines. The straight-line distance between two lat/lon points is the great-circle distance. Google Maps uses road network distance, which is always longer.
What is the unit circle?
A unit circle has center at origin (0,0) and radius 1. Any point on it satisfies x^2 + y^2 = 1. Distance from origin to any point on the unit circle = 1. It is fundamental to trigonometry: cos(theta) = x-coordinate, sin(theta) = y-coordinate for any angle theta.
Common Pythagorean Triples
| Point 1 | Point 2 | Distance |
|---|---|---|
| (0,0) | (3,4) | 5 |
| (0,0) | (5,12) | 13 |
| (0,0) | (8,15) | 17 |
| (0,0) | (7,24) | 25 |
| (0,0) | (20,21) | 29 |