1. Enter the First Point
Enter the x₁ and y₁ coordinates for the first point on the straight line.
Calculate the gradient or slope of a straight line using two coordinate points. Get the rise, run, angle, distance, direction, line equation and complete calculation steps.
Provide the x and y values for each point.
Your line measurements and equation appear here.
Enter two coordinate points and select Calculate.
Find the slope of a straight line in three straightforward steps.
Enter the x₁ and y₁ coordinates for the first point on the straight line.
Enter the x₂ and y₂ coordinates for the second point. Positive, negative and decimal values are supported.
View the gradient, rise, run, angle, percentage grade, distance and equation of the line.
The gradient of a straight line measures how steeply the line rises or falls as it moves from left to right. In coordinate geometry, gradient is also commonly called slope.
The gradient is calculated by dividing the vertical change between two points by their horizontal change. The vertical change is called the rise, while the horizontal change is called the run.
A positive gradient means the line rises as it moves from left to right. For example, a gradient of 2 means the line rises by 2 units for every 1 unit it moves horizontally.
A negative gradient means the line falls as it moves from left to right. The larger the absolute value, the steeper the downward slope.
A horizontal line has a gradient of zero because there is no vertical change. A vertical line has an undefined gradient because its horizontal change is zero, and division by zero is not possible.
Suppose the two points are (2, 3) and (8, 15).
Rise = 15 − 3 = 12
Run = 8 − 2 = 6
Gradient = 12 ÷ 6
Gradient = 2
The line rises by 2 vertical units for every 1 horizontal unit.
Use the sign and value of the gradient to understand the direction and steepness of a line.
| Gradient Result | Line Type | Meaning | Example |
|---|---|---|---|
| m > 0 | Positive gradient | The line rises from left to right | m = 2 |
| m < 0 | Negative gradient | The line falls from left to right | m = −1.5 |
| m = 0 | Horizontal line | The y-coordinate remains constant | y = 4 |
| Undefined | Vertical line | The x-coordinate remains constant | x = 3 |
| |m| > 1 | Steeper line | Vertical change is greater than horizontal change | m = 3 |
| 0 < |m| < 1 | Gentler line | Horizontal change is greater than vertical change | m = 0.5 |
Common questions about gradients, slopes and coordinate points.
The gradient formula is m = (y₂ − y₁) ÷ (x₂ − x₁). Subtract the first y-coordinate from the second y-coordinate, then divide by the difference between the x-coordinates.
Yes. Gradient and slope both describe the rate at which a straight line rises or falls. Gradient is more common in British English, while slope is more common in American English.
A negative gradient means that the line moves downward as it travels from left to right. A more negative value generally represents a steeper downward line.
A vertical line has no horizontal change, so its run is zero. Calculating the gradient would require division by zero, which is undefined.
The gradient of a horizontal line is zero because its y-coordinate does not change. Therefore, the rise is zero.
Percentage grade is calculated by multiplying the gradient by 100. For example, a gradient of 0.25 is equal to a 25% grade.
Yes. This calculator accepts positive numbers, negative numbers, whole numbers and decimal coordinate values.