Gradient and Slope Calculator

Result

Calculation Steps
Visual Representation

About Gradient and Slope

What is Gradient or Slope?

The gradient or slope of a line is a measure of its steepness and direction. It represents the change in y-coordinate (rise) for a unit change in x-coordinate (run).

Formula

The slope \(m\) of a line passing through points \((x_1, y_1)\) and \((x_2, y_2)\) is given by:

\[m = \frac{y_2 - y_1}{x_2 - x_1}\]

Where:

  • \((x_1, y_1)\) is the first point
  • \((x_2, y_2)\) is the second point
  • \(m\) is the slope

Calculation Steps

  1. Identify two points on the line: \((x_1, y_1)\) and \((x_2, y_2)\)
  2. Calculate the change in y: \(\Delta y = y_2 - y_1\)
  3. Calculate the change in x: \(\Delta x = x_2 - x_1\)
  4. Divide the change in y by the change in x: \(m = \frac{\Delta y}{\Delta x}\)

Example

Let's calculate the slope of a line passing through points (1, 2) and (4, 8):

  1. \((x_1, y_1) = (1, 2)\) and \((x_2, y_2) = (4, 8)\)
  2. \(\Delta y = y_2 - y_1 = 8 - 2 = 6\)
  3. \(\Delta x = x_2 - x_1 = 4 - 1 = 3\)
  4. \(m = \frac{\Delta y}{\Delta x} = \frac{6}{3} = 2\)

The slope of the line is 2.

(1, 2) (4, 8)