How to use
- Choose what you know: two points, or one point with a distance and a slope or angle.
- For two points, type X1, Y1, X2 and Y2. Fractions such as 3/4 and decimals both work.
- Read the slope first, then the rise and run, the angle, the distance, the percent grade, the line equation and where the line crosses the axes. The graph draws the two points and the line through them.
- Open the steps to see the slope and distance worked out. In the second mode, type a start point, a distance and either a slope (two points fit, one on each side) or an angle (one point fits).
Formula
Slope m = (y2 - y1) / (x2 - x1) = rise / run = tan(θ). Distance d = √((x2 - x1)² + (y2 - y1)²). The line is y = mx + b with b = y1 - m x1, so it crosses the y-axis at (0, b) and the x-axis at (-b/m, 0). A vertical line has run 0, so its slope is undefined and its equation is x = a number.Example
Points (3, 4) and (6, 8): rise 4, run 3, slope 4/3 (1.3333), distance 5, angle 53.13°, line y = (4/3)x. In India, a road that climbs 7 m over 100 m has a slope of 0.07, a 7% gradient, written as about 1 in 14.3, and its angle is about 4.0°.
A positive slope rises from left to right, a negative slope falls, 0 is level and a vertical line has no slope. The angle is the direction of travel from point 1 to point 2, from 0° to 360°, so the same line reads differently when you swap the points; the slope does not change. Exact fractions are kept, so 5/4 is not rounded to 1.25 until you ask for decimals. Two identical points do not make a line.