Last updated: October 22, 2026 · Written by the Math Made Easy math teachers

Looking for 8th grade distance formula? Then this Grade 8 lesson on Finding Distance Between Points on a Grid explains each idea step by step, with worked examples.
Quick answer: To find the distance between two points on a coordinate plane, make a right triangle whose legs are the horizontal and vertical differences and apply the Pythagorean Theorem: d = √((x₂ − x₁)² + (y₂ − y₁)²). To find a perimeter on a grid, find every side length this way and add them.
Standards: 8.G.B.8 · Level: Grade 8
How do you find distance along a grid line?
When two points share a y-coordinate, they lie on a horizontal line, and the distance is the positive difference of the x-coordinates. When they share an x-coordinate, subtract the y-coordinates instead. For (−7, 4) and (5, 4), the distance is |5 − (−7)| = 12.
How do you find the distance between any two points?
Draw a right triangle with the segment as its hypotenuse. The horizontal leg has length |x2 − x1| and the vertical leg has length |y2 − y1|. The Pythagorean Theorem then gives the segment length.
d = √((x2 − x1)2 + (y2 − y1)2)
It is the Pythagorean Theorem written with coordinates.
- Subtract the x-coordinates to get the horizontal leg.
- Subtract the y-coordinates to get the vertical leg.
- Square both legs and add them.
- Take the square root and round if the sum is not a perfect square.
Find the distance from P(−1, −3) to Q(7, 12). The legs are 7 − (−1) = 8 and 12 − (−3) = 15. Then d2 = 64 + 225 = 289, so d = 17 units.
How do you find the perimeter of a figure on a grid?
Find the length of every side, using counting for horizontal and vertical sides and the distance formula for slanted ones. Add all side lengths. Leave a root in the answer for an exact perimeter, or round for a decimal.
Counting squares along a slanted segment gives the wrong length. A diagonal crossing one square is about 1.41 units long, not 2.
Order does not matter in the subtraction, because squaring removes the sign: (−8)2 and 82 are both 64.
- Horizontal distance: |x2 − x1|; vertical distance: |y2 − y1|.
- The distance formula is the Pythagorean Theorem with coordinate differences as the legs.
- Square both differences, add them, then take one square root.
- The perimeter of a grid figure is the sum of its side lengths.
- Three squared lengths a², b², c² with a² + b² = c² show a right triangle.
Finding Distance Between Points on a Grid: frequently asked questions
Where does the distance formula come from?
It comes from the Pythagorean Theorem. The horizontal and vertical differences between two points are the legs of a right triangle, and the segment joining the points is its hypotenuse.
Does it matter which point I call the first point?
No. The differences change sign when you swap the points, but squaring removes the sign. Both orders give the same squared legs and the same distance.
When is the distance a whole number?
The distance is a whole number when the sum of the squared legs is a perfect square, as with legs 8 and 15, where 64 + 225 = 289 = 17². Otherwise it is an irrational square root.
How do I show a triangle on a grid is a right triangle?
Compute the squared length of each side with the distance formula. If the two smaller squared lengths add up to the largest, the converse of the Pythagorean Theorem shows a right angle.
Should I round side lengths before adding for the perimeter?
Add the exact values first when you can, such as 6 + 5 + √61, and round only at the end. Rounding each side early can shift the final tenth.
Mis à jour le
