Slope Calculator: Find the Slope of a Line

Finding a line’s slope means measuring how much its vertical position changes compared with its horizontal position. You may need to calculate it from two coordinate points, identify it from an equation, or determine whether two lines are parallel or perpendicular. A small sign or subtraction error can change the result.

The Slope Calculator helps you work through these calculations. It finds the slope as a simplified fraction and decimal, provides line equations in different forms, and calculates related values such as intercepts, angle, distance, midpoint, and percent grade.

Find the slope from two points

PointsRiseRunSlopey-interceptEquation
(1, 5), (7, 6)161/6 (about 0.1667)4.8333y = 0.1667x + 4.8333
(3, 8), (-2, 10)2-5-2/5 (about -0.4)9.2y = (-2/5)x + 9.2
(2, 3), (5, 11)838/3 (about 2.667)-7/3y = (8/3)x - 7/3; 8x - 3y = 7
(2, 5), (9, 19)14721y = 2x + 1; 2x - y = -1
(3, 4), (6, 8)434/3 (about 1.333)0y = (4/3)x; distance 5; angle 53.13 degrees
(3, 2), (7, 9)747/4 = 1.75-3.25y = (7/4)x - 3.25; distance about 8.062; angle about 60.26 degrees
(7, -4), (4, 8)12-3-424y = -4x + 24; angle about -75.96 degrees
(2, 3), (8, 11)864/3 (about 1.333)1/3y = 1.3333x + 0.3333; distance 10; midpoint (5, 7)
(0, 6), (3, 0)-63-26y = -2x + 6
(9, 4), (-6, 4)0-1504y = 4 (horizontal)
(1, 2), (5, 10)8420y = 2x; angle 63.43 degrees
EquationRearrangedSlopey-interceptx-intercept
6x - 2y = 12y = 3x - 63-62
y = 76x + 67Already in y = mx + b form7667-67/76 (about -0.88)
y = -2x + 5Already in y = mx + b form-252.5
Given slopeParallel slopePerpendicular slope
33-1/3
22-1/2
-4-41/4
-1/3-1/33
00Undefined
RiseSlopePercent gradeAngle
1:200.055%2.86 degrees
1:120.08338.33%4.76 degrees
1:100.110%5.71 degrees
1:40.2525%14.04 degrees
1:20.550%26.57 degrees
3:40.7575%36.87 degrees
1:11100%45 degrees
7:41.75175%60.26 degrees
2:12200%63.43 degrees
4:14400%75.96 degrees

It is: m = (y2 - y1) / (x2 - x1). It divides the vertical change between two points by the horizontal change.

Subtract the first point's y-coordinate from the second point's y-coordinate. Then divide by the difference between their x-coordinates, keeping the same subtraction order in both parts. The Slope Calculator does the same steps: subtract in the same order top and bottom, then divide.

Yes. A negative slope means the line falls as it moves from left to right. For example, a slope of -2 means the line moves down 2 units for every 1 unit to the right.

A slope of zero means the line is horizontal. Its y-coordinate stays constant as x changes.

A vertical line has no horizontal change, so the run is zero. The formula would require division by zero, which is undefined.

Yes. Both words describe vertical change divided by horizontal change.

First, write the equation in slope-intercept form, y = mx + b. The coefficient of x is the slope. If the equation is in the Ax + By = C form, rearrange it to make y the subject. The Slope Calculator reads the coefficient of x once the equation is in y = mx + b form.

In point-slope form, y - y1 = m(x - x1), the value of m is the slope. The other values identify a point on the line.

Distinct nonvertical parallel lines have equal slopes. Vertical lines are also parallel to other vertical lines.

For two nonvertical lines with defined slopes, take the negative reciprocal of the first slope. Their product must equal -1. A horizontal line is perpendicular to a vertical line.

Multiply the slope by 100: Percent grade = m x 100. For example, a slope of 0.25 gives a 25% grade.

The formula in this calculator applies to straight lines. A curve does not have one constant slope across its entire length. Finding its slope at a particular point requires a different mathematical method.