Calculate the slope and angle of a line between two points.
Slope measures how steep a line is between two points: m = (y₂ − y₁) ÷ (x₂ − x₁), often described as 'rise over run.' A positive slope rises left to right; a negative slope falls.
The angle from horizontal follows directly from the slope using the arctangent function, converting the ratio into a more intuitive degree measurement.
A vertical line (where both points share the same x-coordinate) has an undefined slope, since the formula would require dividing by zero — this is a real mathematical edge case, not a calculator error.
Between points (1, 2) and (4, 8): slope = (8−2) ÷ (4−1) = 2, which corresponds to an angle of about 63.4° from horizontal.
A perfectly horizontal line — y doesn't change at all as x increases.
Mathematically, division by zero has no defined value at all — calling it 'infinite' is a common informal shorthand, but 'undefined' is the technically accurate term.
Grade of a road or ramp, pitch of a roof, rate of change in a data trend line — anywhere a 'steepness' or 'rate' needs a single number, it's fundamentally the same slope calculation.