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.

Your figures

Example result — edit the figures to make it yours

2

Gradient (slope)

Gradient = rise ÷ run = (y₂ − y₁)/(x₂ − x₁). It is also the tangent of the line's angle to the horizontal.

Angle to horizontal63.4349°
Rise6
Run3
Line through the pointsy = 2x + 0

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

Gradient = (y₂ − y₁) / (x₂ − x₁)

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

Quick reference — varying x₁
x₁Gradient (slope)
0.51.7143
0.81.875
12
1.252.1818
1.52.4
23

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.