Slope Calculator

Point 1

Point 2

Slope Formula: m = (y2 - y1) / (x2 - x1) = rise / run


Add this Calculator to Your Site

What is Slope?

Slope is a measure of the steepness of a line. It describes how much a line rises (or falls) for each unit of horizontal movement. Slope is often represented by the letter "m" and is also known as gradient, incline, or grade.

The Slope Formula

The slope between two points (x1, y1) and (x2, y2) is calculated as:

m = (y2 - y1) / (x2 - x1) = rise / run

Where:

  • Rise = vertical change = y2 - y1
  • Run = horizontal change = x2 - x1

Types of Slopes

  • Positive Slope (m > 0): Line rises from left to right
  • Negative Slope (m < 0): Line falls from left to right
  • Zero Slope (m = 0): Horizontal line
  • Undefined Slope: Vertical line (when x2 = x1)

Slope-Intercept Form

Once you know the slope, you can write the equation of the line in slope-intercept form:

y = mx + b

Where:

  • m = slope
  • b = y-intercept (where the line crosses the y-axis)

To find b, substitute one point into the equation:

b = y1 - m * x1

Slope as an Angle

The slope can be converted to an angle using the arctangent function:

angle = arctan(m)

Example Calculations

Example 1: Positive Slope

Find the slope between points (2, 3) and (6, 11):

m = (11 - 3) / (6 - 2)
m = 8 / 4
m = 2

The line rises 2 units for every 1 unit to the right.

Example 2: Negative Slope

Find the slope between points (1, 8) and (5, 2):

m = (2 - 8) / (5 - 1)
m = -6 / 4
m = -1.5

The line falls 1.5 units for every 1 unit to the right.

Example 3: Line Equation

Find the equation of a line through (2, 3) with slope 2:

y = mx + b
3 = 2(2) + b
3 = 4 + b
b = -1

Line equation: y = 2x - 1

Applications of Slope

Construction and Engineering

Roof pitch, road grades, and ramp angles are all measured using slope.

Economics

Supply and demand curves, marginal cost, and rate of change in economic models.

Physics

Velocity-time graphs where slope represents acceleration.

Geography

Terrain analysis, water flow direction, and elevation change calculations.

Other Calculators