Slope Calculator
Slope, midpoint, distance from two points
About Slope Calculator
Slope measures how steeply a line rises or falls: m = (y₂ − y₁) / (x₂ − x₁), the change in y per unit change in x. The Toolenza calculator returns slope from two points, the corresponding angle in degrees, and the line's full equation (y = mx + b).
The same idea, different names
- Algebra — slope, gradient.
- Geometry — gradient, rate of change.
- Calculus — derivative (limit of slope as the points get closer).
- Statistics — regression coefficient (slope of the best-fit line).
- Construction — pitch, grade, fall, rake.
- Surveying — gradient in percent or per-mille (1% = 1 m rise per 100 m run).
All are computed the same way; the language depends on the field.
Slope interpretations by sign and magnitude
- m = 0 — horizontal line; no change.
- m = 1 — 45° rise (1 unit up per 1 unit right).
- m = ∞ (undefined) — vertical line; division by zero in the formula.
- m < 0 — line falls left-to-right.
- |m| > 1 — steep; |m| < 1 — gradual.
Practical conversions
- Slope to angle — θ = atan(m). Slope 0.5 = 26.6°; slope 1 = 45°; slope 2 = 63.4°.
- Slope to percentage grade — m × 100. A 5% grade is m = 0.05.
- Slope to rise:run — express as ratio. 6:12 roof pitch = slope 0.5 = 26.6°.
Pitfalls
Vertical lines have undefined slope, not infinite — division by zero isn't a number. Slope depends on scale — if the y-axis is in dollars and x is in years, slope is dollars per year; check units before quoting.
Frequently asked questions
A horizontal line — y doesn't change as x changes.
A vertical line — division by zero, because x doesn't change.
Once you have slope m, use point-slope form: y - y₁ = m(x - x₁). The calculator returns both slope and the full equation.
Multiply by 100. A 0.05 slope is 5% grade — common in road and roof terminology.
Embed this tool on your site
Drop a one-line iframe snippet into any blog, lesson plan, or knowledge base. Powered-by-Toolenza link included.
Embed this tool
Paste this snippet into any HTML page. The tool runs entirely in your reader's browser.
Related tools
Slope Calculator
No reviews yet — be the first to share your thoughts.
- No reviews yet — be the first to share your thoughts.