Home · Everyday · Geometry & Coordinates · Gradient Calculator
Gradient Calculator
The gradient (slope) between two points — rise over run — with the angle and the line through them.
What this calculator does
The gradient (slope) between two points — rise over run — with the angle and the line through them. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
Lines are handled in slope-intercept form y = mx + b unless the general form ax + by = c is shown.
A vertical line has no finite slope; the tools flag that case instead of inventing a number.
Parallel lines share the slope; perpendicular slopes multiply to −1.
Worked example
With the example inputs this page opens with (x₁ 1, y₁ 2, x₂ 4, y₂ 8), the result is 2 — gradient (slope). Gradient = rise ÷ run = (y₂ − y₁)/(x₂ − x₁). It is also the tangent of the line's angle to the horizontal.
Quick reference
| x₁ | Gradient (slope) |
|---|---|
| 0.5 | 1.7143 |
| 0.8 | 1.875 |
| 1 | 2 |
| 1.25 | 2.1818 |
| 1.5 | 2.4 |
| 2 | 3 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Gradient Calculator work?
The gradient (slope) between two points — rise over run — with the angle and the line through them. Two points → Gradient. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Gradient Calculator need?
Two points → Gradient. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Gradient Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.