Distance Between Two Points

Find distance between two points: x1, y1 and x2, y2

Formula of distance between two points

Use formula below for calculating distance between two points:

d = √(x2 - x1)2 + (y2 - y1)2

Example

Let's say, we have:

  • x1 = 1
  • y1 = 2
  • x2 = 3
  • y2 = 7
  1. (3 - 1)2 + (7 - 2)2

  2. (2)2 + (5)2

  3. 4 + 25

  4. 29

  5. d ≈ 5,38