Slope Calculator

Coordinate grid showing points 2 comma 3 and 6 comma 11 on the line y equals 2x minus 1
Points (2, 3) and (6, 11) on the line y = 2x – 1.

Slope Calculator

Slope: 2

Equation: y = 2x – 1. Y-intercept: -1. X-intercept: 0.5.

Direct answer: The slope between (2, 3) and (6, 11) is 2: (11 – 3) divided by (6 – 2) = 8 divided by 4 = 2. The line through those points is y = 2x – 1, with a y-intercept of -1 and an x-intercept of 0.5.

By Average Calculator Team. Last reviewed: 16 November 2026.

Worked slope formula: 11 minus 3 divided by 6 minus 2 equals 8 divided by 4 equals 2
Slope is rise over run: change in y divided by change in x.

How slope works

The slope of a line, usually written as m, is the change in y divided by the change in x between two points on the line: m = (y2 – y1) / (x2 – x1). It is often called rise over run. A positive slope rises as x increases, a negative slope falls, a slope of zero is a flat horizontal line, and a vertical line has an undefined slope because the change in x is zero. Once you know the slope m and one point (x1, y1), point-slope form gives the equation: y – y1 = m(x – x1). Rearranged into slope-intercept form, y = mx + b, b is the y-intercept, where the line crosses the y-axis. The x-intercept is where y = 0, which is x = -b / m when m is not zero. For distances between points, use the distance calculator.

Worked examples

Example 1: points (2, 3) and (6, 11). Slope = (11 – 3) / (6 – 2) = 8 / 4 = 2. Point-slope form: y – 3 = 2(x – 2), which simplifies to y = 2x – 1. The y-intercept is -1 and the x-intercept is 0.5, because 2x – 1 = 0 gives x = 0.5.

Example 2: points (1, 2) and (5, 10). Slope = (10 – 2) / (5 – 1) = 8 / 4 = 2. The equation is y – 2 = 2(x – 1), which simplifies to y = 2x. The y-intercept is 0, so the line passes through the origin.

Example 3: points (0, 4) and (4, 1). Slope = (1 – 4) / (4 – 0) = -3 / 4 = -0.75. The equation is y – 4 = -0.75(x – 0), which simplifies to y = -0.75x + 4. The line falls as x increases, and the y-intercept is 4.

Example 4, vertical and horizontal lines: points (3, 1) and (3, 7) give slope = (7 – 1) / (3 – 3) = 6 / 0, which is undefined, and the line is x = 3. Points (-2, 5) and (3, 5) give slope = (5 – 5) / (3 – (-2)) = 0 / 5 = 0, and the line is y = 5.

Four panels showing positive, negative, zero and undefined slope
Positive, negative, zero and undefined: the four kinds of slope.

Slope and line equations at a glance

Points Slope Equation
(2, 3) and (6, 11) 2 y = 2x – 1
(1, 2) and (5, 10) 2 y = 2x
(0, 4) and (4, 1) -0.75 y = -0.75x + 4
(-2, 5) and (3, 5) 0 y = 5
(3, 1) and (3, 7) undefined x = 3

A slope of 2 and a slope of -0.75 describe very different lines, but the same formula finds both. For more equation work, try the math calculator or the scientific calculator.

Common mistakes

Subtracting in the wrong order: use (y2 – y1) with (x2 – x1), not (y2 – y1) with (x1 – x2). Mixing the order flips the sign of the slope.

Dividing by zero: when x2 equals x1, the line is vertical and the slope is undefined, not zero. Zero slope belongs to a horizontal line.

Confusing slope with intercept: in y = 2x – 1, the slope is 2 and the y-intercept is -1. The slope tells you how steep the line is; the intercept tells you where it crosses the y-axis.

Dropping a negative sign: (1 – 4) is -3, not 3. Keep the signs through every step, especially when a point has a negative coordinate.

Frequently asked questions

What is the slope of a line?

The slope measures how steep a line is: the change in y divided by the change in x between two points. A slope of 2 means y rises 2 units for every 1 unit x moves to the right.

How do I find the slope between two points?

Use m = (y2 – y1) divided by (x2 – x1). For (2, 3) and (6, 11): (11 – 3) divided by (6 – 2) = 8 divided by 4 = 2.

What is the equation of the line through (2, 3) and (6, 11)?

The slope is 2, and point-slope form gives y – 3 = 2(x – 2), which simplifies to y = 2x – 1. The y-intercept is -1 and the x-intercept is 0.5.

What does a slope of zero mean?

A slope of zero means a flat, horizontal line: y never changes. The points (-2, 5) and (3, 5) give (5 – 5) divided by (3 – (-2)) = 0 divided by 5 = 0, so the line is y = 5.

What is an undefined slope?

A vertical line has an undefined slope because the change in x is zero and division by zero is not defined. The points (3, 1) and (3, 7) give (7 – 1) divided by (3 – 3) = 6 divided by 0, which is undefined, and the line is x = 3.

What is the difference between slope and y-intercept?

Slope is how steep the line is; the y-intercept is where the line crosses the y-axis. In y = 2x – 1, the slope is 2 and the y-intercept is -1.

Source: the Math is Fun shows how to find the equation of a line from two points.

Last updated: November 16, 2026.