Distance Formula: 5 Formulas, 3 Worked Examples, and 4 Related Results for 2 Points
Distance formula gives 5 formulas, 3 worked examples, and 4 related results for 2 points in 2D and 3D. The 5 formulas cover 2D distance, 3D distance, distance from origin, horizontal distance, and vertical distance. The 4 related results cover midpoint, slope, Pythagorean theorem, and distance from origin.
What Is the Distance Formula?
Distance formula is an equation that finds straight-line distance between 2 points in a coordinate plane. Formula is d = √((x2 – x1)^2 + (y2 – y1)^2). Points include (1, 2), (4, 6), and (-3, -1). Distance is a length, and distance is 0 or more. According to Khan Academy, distance formula is an application of Pythagorean theorem. Khan Academy derives formula from a right triangle with legs (x2 – x1) and (y2 – y1). Hypotenuse of that triangle is distance d.
What Is the Distance Formula in 2D?
d = √((x2 – x1)^2 + (y2 – y1)^2). Formula subtracts matching coordinates, squares each difference, adds squares, and takes square root. Result is Euclidean distance, straight-line distance, between 2 points.

What Are the 5 Distance Formula Forms?
- 2D distance d = √((x2 – x1)^2 + (y2 – y1)^2).
- 3D distance d = √((x2 – x1)^2 + (y2 – y1)^2 + (z2 – z1)^2).
- Distance from origin d = √(x^2 + y^2).
- Horizontal distance d = |x2 – x1|.
- Vertical distance d = |y2 – y1|.
Table 1: The 5 distance formula forms
| Form | Formula | Use | Variables |
|---|---|---|---|
| 2D distance | d = √((x2 – x1)^2 + (y2 – y1)^2) | Straight-line distance between 2 points in a plane | x1, y1, x2, y2 |
| 3D distance | d = √((x2 – x1)^2 + (y2 – y1)^2 + (z2 – z1)^2) | Straight-line distance between 2 points in space | x1, y1, z1, x2, y2, z2 |
| Distance from origin | d = √(x^2 + y^2) | Distance from (0, 0) to (x, y) | x, y |
| Horizontal distance | d = |x2 – x1| | Distance along a horizontal line | x1, x2 |
| Vertical distance | d = |y2 – y1| | Distance along a vertical line | y1, y2 |
How Does the Distance Formula Come From the Pythagorean Theorem?
a^2 + b^2 = c^2. Legs are a = x2 – x1 and b = y2 – y1. Hypotenuse is c = d. Substitution gives d^2 = (x2 – x1)^2 + (y2 – y1)^2. Square root gives d = √((x2 – x1)^2 + (y2 – y1)^2).
What Are 3 Worked Examples of the Distance Formula?

- (1, 2) and (4, 6): distance is 5 units. dx = 3, dy = 4, squares 9 and 16, sum 25, square root 5.
- (-3, -1) and (2, 3): distance is 6.40 units. dx = 5, dy = 4, squares 25 and 16, sum 41, square root 6.40. OpenStax College Algebra 2e, section 2.1, gives same example and same result, √41.
- (1, 2, 3) and (4, 6, 15) in 3D: distance is 13 units. dx = 3, dy = 4, dz = 12, squares 9, 16, 144, sum 169, square root 13.
What Are 4 Related Results for 2 Points?
- Midpoint M = ((x1 + x2) / 2, (y1 + y2) / 2).
- Slope m = (y2 – y1) / (x2 – x1).
- Distance d = √((x2 – x1)^2 + (y2 – y1)^2).
- Pythagorean result a^2 + b^2 = c^2.
Table 2: Related results for 2 points
| Result | Formula | Result for (1, 2) and (4, 6) |
|---|---|---|
| Midpoint | M = ((x1 + x2) / 2, (y1 + y2) / 2) | (2.5, 4) |
| Slope | m = (y2 – y1) / (x2 – x1) | 4 / 3, or 1.33 |
| Distance | d = √((x2 – x1)^2 + (y2 – y1)^2) | 5 units |
| Pythagorean theorem | a^2 + b^2 = c^2 | 3^2 + 4^2 = 5^2 |
Midpoint for (1, 2) and (4, 6) is (2.5, 4). Slope for same points is 4 / 3, or 1.33.
How Do You Use the Distance Formula in 4 Steps?
- Identify 2 points, (x1, y1) and (x2, y2).
- Subtract matching coordinates to find dx and dy.
- Square dx and dy, and add squares.
- Take square root of sum, and add unit.
What Are 5 Common Mistakes With the Distance Formula?
- Mix x and y coordinates in subtraction.
- Forget square root at end.
- Square sum, instead of squaring each difference.
- Drop a negative sign in subtraction.
- Use distance for latitude and longitude, instead of a great-circle formula.
Distance is always 0 or more. Point order does not change distance.
What Do People Also Ask About the Distance Formula?
What is distance formula?
d = √((x2 – x1)^2 + (y2 – y1)^2) for 2 points in a plane.
What is distance formula in 3D?
d = √((x2 – x1)^2 + (y2 – y1)^2 + (z2 – z1)^2) for 2 points in space.
What is distance between (1, 2) and (4, 6)?
5 units.
How is distance formula related to Pythagorean theorem?
Distance formula is Pythagorean theorem applied to coordinate differences between 2 points.
What is midpoint formula?
M = ((x1 + x2) / 2, (y1 + y2) / 2) for 2 points in a plane.
How Does the Distance Formula Connect 2D Distance, 3D Distance, and Midpoint?
2D distance uses dx and dy. 3D distance adds dz to same sum. Midpoint averages same coordinates. Distance formula gives 5 formulas, 3 worked examples, and 4 related results for 2 points in 2D and 3D.
Sources: Khan Academy Distance formula, OpenStax College Algebra 2e section 2.1.

The University of the West Indies
My passion as a teacher and leader in education is to contribute to students’ enhanced learning by creation of a positive teaching/learning environment, where they are motivated to develop strong critical thinking, analytical and problem-solving skills.
As acting Vice-Principal and head of Physics, I have amassed five years of experience in leading meetings, implementing strategies to maintain discipline and school ethos, liaise with stakeholders in planning for future development of the institution; successfully negotiated the implementation of various projects for student development as well as supervising effective execution of such. For the past 19 years, I have incorporated discovery learning within the classroom through practical activities, problem solving and cooperative learning and have realized that students retention in Physics and Mathematics have increased significantly.
I am always cognizant that students have different learning styles, and as such teaching strategies during planning and delivery must take this crucial factor into consideration and be tailored to meet such differences.

