Calculate the distance between two points (x1, y1) and (x2, y2) on a 2D plane using the distance formula.