How this calculator works
A line in a plane can be written as Ax + By = C. When B is nonzero, isolating y gives slope -A/B and intercept C/B. Subtracting the supplied points gives the line direction, rise, run and segment length. Both points satisfy the resulting equation, which extends beyond the finite segment in either direction. A vertical line is retained in standard form and has no slope or y intercept. Spatial points instead define P + t(Q - P), which works even when individual direction components are zero. Form conversion, point-slope, grade and rise/run tasks share these relations on this page.
Formula
m = rise/run; grade = 100m percent; theta = atan(m). Standard to slope form: m = -A/B, b = C/B. Point-slope: y - y0 = m(x - x0). Spatial line: R(t) = P + t(Q-P).
Worked example
Points (1, 3) and (3, 7) give rise 4 and run 2, so m = 2 and b = 1. The equation is y = 2x + 1, or 2x - y = -1. A 50% grade has slope 0.5 and angle about 26.565051 degrees.
Advertisement
Frequently asked questions
Can this represent vertical lines?
Yes. Use two points or standard form. A vertical line has B = 0, so its slope and grade outputs are omitted.
Is 100% grade a right angle?
No. It means rise equals run, giving slope 1 and an angle of 45 degrees.
Why does a 3D line use a parameter?
A single equation in x, y and z usually describes a plane. A parametric line specifies all three coordinates with one real parameter.
Does this draw a graph?
It returns numeric properties and equations. No graph is rendered.