Geometry and Measurement Tools

Slope Calculator

Calculate the slope of a line from two coordinate points or from rise and run. Find the slope value, angle in degrees, percentage grade, and a detailed step-by-step solution.

Calculate Slope

Choose a calculation method and enter your values below.

Enter the coordinates of two points

Example: Point 1 (1, 2) and Point 2 (5, 10).

Use the same unit for both coordinate axes or for rise and run.
Reset

What Is Slope?

Slope measures how steep a line is and describes its direction. It compares the vertical change, called the rise, with the horizontal change, called the run. In coordinate geometry, slope is commonly represented by the letter m.

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

Slope = vertical change divided by horizontal change

A positive slope means that the line rises from left to right. A negative slope means that it falls. A horizontal line has a slope of zero, while a vertical line has an undefined slope.

How to Calculate Slope from Two Points

To calculate the slope from two points, subtract the first point's y-coordinate from the second point's y-coordinate. Then divide that result by the difference between their x-coordinates.

Example: Find the slope between (1, 2) and (5, 10)

m = (10 − 2) / (5 − 1)
m = 8 / 4 = 2

The slope is 2. This means that for every one-unit increase in the horizontal direction, the line increases by two units vertically.

How to Calculate Slope Using Rise and Run

If you already know the rise and run, you do not need coordinate points. Divide the vertical change by the horizontal change.

Slope = Rise / Run

For example, if a ramp rises 1.5 meters over a horizontal distance of 6 meters:

m = 1.5 / 6 = 0.25
Grade = 0.25 × 100 = 25%

The ramp has a slope of 0.25, equivalent to a 25% grade.

Slope, Angle and Percentage Grade

Slope can be expressed in several related ways. The slope ratio is the vertical change divided by the horizontal change. The angle describes the line's inclination relative to the positive horizontal axis.

Angle = arctan(m)
Percentage Grade = m × 100

For a slope of 0.5, the angle is approximately 26.565 degrees and the percentage grade is 50%.

Slope Angle Grade Direction
0 0° 0% Horizontal
0.25 14.036° 25% Rising
0.5 26.565° 50% Rising
1 45° 100% Rising
-0.5 -26.565° -50% Falling

Types of Slope

Positive Slope

A positive slope occurs when the y-coordinate increases as the x-coordinate increases. The line rises from left to right.

Negative Slope

A negative slope occurs when the y-coordinate decreases as the x-coordinate increases. The line falls from left to right.

Zero Slope

A zero slope describes a horizontal line. The y-coordinate remains constant, so the vertical change is zero.

Undefined Slope

A vertical line has an undefined slope because the horizontal change is zero. Dividing by zero is not mathematically defined.

Frequently Asked Questions

What is the formula for slope?

The slope formula is m = (y₂ − y₁) / (x₂ − x₁). It divides the vertical change between two points by the horizontal change.

Can slope be negative?

Yes. A negative slope means that a line falls as you move from left to right. A positive slope means that it rises.

What does a slope of zero mean?

A slope of zero describes a horizontal line. Its vertical change is zero, while its horizontal change is nonzero.

What happens when the run is zero?

A zero run means the line is vertical. Its slope is undefined because division by zero is not possible.

How do you calculate percentage grade?

Multiply the slope by 100. For example, a slope of 0.25 corresponds to a 25 percent grade.

How is slope angle calculated?

The angle is calculated using the inverse tangent: θ = arctan(m). The result is expressed in degrees and represents the angle relative to the positive horizontal axis.

Related Geometry Calculators

Explore these related calculators for additional geometry and measurement calculations.