# Gradient Calculator

URL: https://speedycalculator.com/calculators/math/gradient/
Last updated: 2026-10-30

> 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.

## Inputs

- Point 1 – x
- Point 1 – y
- Point 2 – x
- Point 2 – y

## Results

- Gradient
- Rise
- Run
- Angle of inclination
- Distance between the points
- Gradient as a percentage

## Formula

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

## Explanation

"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

- **Point 1 – x**
- **Point 1 – y**
- **Point 2 – x**
- **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

FieldWhat to enterPoint 1 – xA numberPoint 1 – yA numberPoint 2 – xA numberPoint 2 – yA 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 – xGradient0.50.46150.750.4810.51.250.52171.50.545520.6

## 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.

## FAQ

**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

- [OpenStax – College Algebra 2e](https://openstax.org/details/books/college-algebra-2e)
- [OpenStax – Precalculus 2e](https://openstax.org/details/books/precalculus-2e)
