The slope formula
The slope of a line measures how steep it is — how much y changes for each unit of change in x. From two points (x₁, y₁) and (x₂, y₂), it's the rise divided by the run.
Once you have the slope m, the line's equation in slope-intercept form is y = mx + b, where the y-intercept b = y₁ − m·x₁. The angle the line makes with the horizontal is arctan(m), converted to degrees.
Worked example
For the points (1, 2) and (4, 8):
Special cases
A positive slope rises left-to-right; a negative slope falls. A slope of 0 is a horizontal line (y = constant). When x₁ = x₂ the run is zero, the slope is undefined, and the line is vertical (x = constant) — the calculator reports this rather than dividing by zero. The distance between the points uses the Pythagorean theorem, √((x₂−x₁)² + (y₂−y₁)²).