Calculate the distance from point to line

straight line: X +  Y = 
point:  , 
distance

The length of the perpendicular segment from a point outside a straight line to the line is called the distance from the point to the line.

Suppose the equation of line L is Ax+By+C=0, and the coordinates of point P are (Xo, Yo), then the distance from point P to line L is: d=│AXo+BYo+C│ / √(A²+B²).