Gradient Calculator

Enter two points on a line — X1, Y1 and X2, Y2 — and the Gradient Calculator computes the gradient (slope) of the line, along with the rise, run, and angle of inclination. Whether you're analyzing a ramp, a ski slope, or a graph, you get a complete picture of steepness in one step.

Horizontal coordinate of the first point

Vertical coordinate of the first point

Horizontal coordinate of the second point

Vertical coordinate of the second point

Results

Gradient (Slope)

--

Rise (ΔY)

--

Run (ΔX)

--

Angle of Inclination

--

Percentage Grade

--

Slope Direction

--

Rise vs Run

Frequently Asked Questions

What is the gradient?

The gradient (also called slope) measures how steep a line is between two points. It is defined as the ratio of the vertical change (rise) to the horizontal change (run). A steeper line has a larger gradient value.

How do I calculate the gradient?

The gradient formula is: gradient = rise / run = (Y2 − Y1) / (X2 − X1). Simply subtract the y-coordinates to get the rise and subtract the x-coordinates to get the run, then divide rise by run.

What does a 1/10 gradient mean?

A 1/10 gradient means that for every 10 units of horizontal distance (run), the elevation changes by 1 unit (rise). This is equivalent to a 10% grade and an angle of approximately 5.71 degrees.

What is the rise if the gradient is 2 and the run is 10?

Using the formula rise = gradient × run, the rise equals 2 × 10 = 20. So if you travel 10 units horizontally along a line with gradient 2, you rise 20 units vertically.

What is the run if the gradient is 20% and the rise is 2?

A 20% gradient equals 0.2 as a decimal. Using run = rise / gradient, the run equals 2 / 0.2 = 10. So you travel 10 units horizontally for every 2 units of rise.

Can the gradient be negative?

Yes. A negative gradient means the line slopes downward from left to right. For example, if Y decreases as X increases, the gradient will be negative. A gradient of zero means the line is perfectly horizontal.

What happens when the gradient is undefined?

The gradient is undefined when the run (ΔX) equals zero — that is, when X1 = X2. This represents a perfectly vertical line, which has no finite slope. The calculator will flag this condition to avoid division by zero.

What is the difference between gradient and angle of inclination?

The gradient is the ratio rise/run, while the angle of inclination is the arctangent of that ratio expressed in degrees. A gradient of 1 corresponds to a 45° angle. The angle gives a more intuitive sense of steepness for physical applications like ramps and roads.

More Math Tools