Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Slope (m)
2
rise over run
Rise (Δy = y₂ − y₁) 6
Run (Δx = x₂ − x₁) 3
Y-intercept (b) 0
Angle of incline 63.43°

What Is the Slope of a Line?

The slope of a line, often written as m, measures how steep the line is — the ratio of vertical change (rise) to horizontal change (run) between any two points on the line. A positive slope rises left to right, a negative slope falls, a zero slope is horizontal, and a vertical line has an undefined slope.

Line through two points showing rise and run on a coordinate grid
Slope is the ratio of vertical change (rise) to horizontal change (run) between two points.

How to Use This Calculator

Enter the coordinates of two points on the line: the first point \((x_1, y_1)\) and the second point \((x_2, y_2)\). The calculator instantly returns the slope, the rise \((\Delta y)\), the run \((\Delta x)\), the y-intercept of the line, and the angle the line makes with the horizontal axis.

The Formula Explained

The slope is computed as:

$$m = \frac{\text{Y}_2 - \text{Y}_1}{\text{X}_2 - \text{X}_1}$$

The numerator \((y_2 - y_1)\) is the rise — how much the line moves up or down. The denominator \((x_2 - x_1)\) is the run — how much it moves sideways. If the run is zero (the two x-values are equal), the line is vertical and the slope is undefined.

Advertisement
Slope formula illustrated with coordinates of two points
The formula uses the differences in y-values over the differences in x-values.

Worked Example

Take the points \((1, 2)\) and \((4, 8)\). The rise is \(8 - 2 = 6\) and the run is \(4 - 1 = 3\). So the slope is $$m = \frac{6}{3} = 2.$$ The y-intercept is \(b = 2 - 2 \times 1 = 0\), giving the line \(y = 2x\).

FAQ

What does a slope of 0 mean? The line is perfectly horizontal — y does not change as x changes.

Why is my slope "undefined"? Both points share the same x-value, so the run is zero. Division by zero is undefined and the line is vertical.

What is the angle of incline? It is \(\arctan(m)\) converted to degrees — the angle the line makes with the positive x-axis.

Last updated: