Gradient Calculator

Quick answer

The gradient calculator finds the gradient (slope) of the line through two points as rise over run, with the angle of inclination and the distance between the points.

Gradient
0.5
Rise
3
Run
6
Angle of inclination
26.5651
Distance between the points
6.70820393
Gradient as a percentage
50 %

“Gradient” is the UK word for slope. It describes steepness: hills, roofs, ramps and graphs of rates. A gradient of 0.5 means 1 up for every 2 across.

How to use the Gradient Calculator

  1. Point 1 – x
  2. Point 1 – y
  3. Point 2 – x
  4. Point 2 – y

Results update as you type, and everything is calculated in your browser.

How it works

The rise and run are the differences in y and x. The angle is the arctangent of the gradient; the distance uses the Pythagorean theorem.

Tips

  • Sketch the points first – a quick drawing shows whether a slope should be positive or negative.
  • Keep the order of the points consistent in every formula.
  • Vertical lines have an undefined slope; horizontal lines have slope zero.
  • Use the same units on both axes when you measure distances or angles.

Common mistakes to avoid

  • Swapping x and y coordinates.
  • Subtracting the coordinates in a different order in the numerator and denominator of the slope.
  • Forgetting that the distance is always positive.

Inputs explained

Field What to enter
Point 1 – x A number
Point 1 – y A number
Point 2 – x A number
Point 2 – y A number

What each result means

  • Gradient = ([Point 2 – y] – [Point 1 – y])÷([Point 2 – x] – [Point 1 – x])
  • Rise = [Point 2 – y] – [Point 1 – y]
  • Run = [Point 2 – x] – [Point 1 – x]
  • Angle of inclination = deg(atan2([Point 2 – y] – [Point 1 – y], [Point 2 – x] – [Point 1 – x]))
  • Distance between the points = sqrt(([Point 2 – x] – [Point 1 – x])^2 + ([Point 2 – y] – [Point 1 – y])^2)
  • Gradient as a percentage = ([Point 2 – y] – [Point 1 – y])÷([Point 2 – x] – [Point 1 – x])×100

Example values

How the main result changes when Point 1 – x changes and everything else stays at the example values above:

Point 1 – x Gradient
0.5 0.4615
0.75 0.48
1 0.5
1.25 0.5217
1.5 0.5455
2 0.6

Formula

Gradient m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁)

Worked example

Inputs — Point 1 – x: 1; Point 1 – y: 2; Point 2 – x: 7; Point 2 – y: 5.
Results — Gradient = 0.5; Rise = 3; Run = 6; Angle of inclination = 26.5651 °; Distance between the points = 6.70820393; Gradient as a percentage = 50 %.

Key terms

Gradient
The steepness of a line, rise over run.

Frequently asked questions

How do I find a gradient from two points?

Divide the change in y by the change in x.

What does a negative gradient mean?

The line goes down from left to right.

What is the gradient of a vertical line?

Undefined, because the run is zero.

Is gradient the same as slope?

Yes, in coordinate geometry.

What formula does the Gradient Calculator use?

Gradient m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁).

Sources

  1. OpenStax – College Algebra 2e
  2. OpenStax – Precalculus 2e

Cite this calculator

Speedy Calculator. (2026). Gradient Calculator. Speedy Calculator. https://speedycalculator.com/calculators/math/gradient/