This free calculator computes the distance between two points, the slope of the line joining them, the equation of the line, and both x- and y-intercepts. Enter the coordinates of points A and B to instantly obtain all results.
Let the two points be:
\[ A(x_A,y_A), \quad B(x_B,y_B) \]The distance between the two points is:
\[ d(A,B)=\sqrt{(x_A-x_B)^2+(y_A-y_B)^2} \]The slope of the line is:
\[ m=\frac{y_B-y_A}{x_B-x_A} \]The equation of the line in point–slope form is:
\[ y-y_B=m(x-x_B) \] ---Enter the x- and y-coordinates of points A and B, then press Enter. The calculator will display:
If both points have the same x-coordinate, the line is vertical. In this case the slope is undefined and the equation becomes:
\[ x=\text{constant} \]