Calculate the slope and equation of a line passing through two points.
Results
Slope (m)—
Slope Angle—
Distance Between Points—
Midpoint—
y-intercept (b)—
Line Equation
Slope-Intercept Form
—
Point-Slope Form
—
Inputs and checks
Enter x and y for each of two points; the number fields use steps of 0.01 and have no stated bounds.
Press Calculate after changing coordinates to refresh the numeric results. Editing alone updates the drawing, not the numbers.
Use ordinary numeric coordinates, including negative values. Blank values are treated as zero when calculating.
Reading the result
Slope and distance use four decimals, while the angle and midpoint use two; the line equation is also displayed.
For a vertical line the slope is Undefined and the equation is x = the shared x-coordinate. The point-slope row is hidden, but the y-intercept row stays visible, showing a dash at first or possibly a value from a previous line calculation. Do not treat that value as the vertical line’s y-intercept.
If both points are identical, an error appears. The drawing can misplace a point whose second x or y coordinate is zero, so use numeric outputs rather than the diagram as proof.
Examples
Line through (1, 2) and (4, 6)
Input
First point (1, 2); second point (4, 6); press Calculate.