TTKTheTextKit

Slope Calculator

Enter two points to get the slope of the line through them and its equation in slope-intercept, point-slope and standard form. The tool also gives the intercepts, the distance and midpoint of the segment, the angle with the x-axis and the slopes of parallel and perpendicular lines, and finds y for any x or x for any y. Everything runs in your browser.

Slope (m)
3
Rise 6 over run 2
Slope-intercept form
y = 3x - 1
y = mx + b
Point-slope form
y - 2 = 3 (x - 1)
Standard form
3x - 1y = 1
Ax + By = C with whole numbers
y-intercept
-1
Where the line crosses the y-axis
x-intercept
1/3 (0.3333333333)
Where it crosses the x-axis
Distance between the points
6.32455532
Square root of 40
Midpoint
(2, 5)
Angle with the x-axis
71.56505118 degrees
Perpendicular slope
-1/3
A parallel line has slope 3

y = 14

The slope of a line through two points is the rise over the run: m = (y2 - y1) / (x2 - x1). The y-intercept is b = y1 - m x1, which gives y = mx + b. Coordinates can be decimals, and all of the algebra uses exact fractions, so a slope of one third stays 1/3 and is not rounded to 0.3333. A vertical line has an undefined slope and the equation x = c, and a horizontal line has slope 0. The perpendicular slope is the negative reciprocal, and a parallel line has the same slope. Everything is worked out in your browser and nothing is uploaded.

Related Tools

[5 suggestions]

About the Slope Calculator

The slope of a line through (x1, y1) and (x2, y2) is the rise over the run: m = (y2 - y1) / (x2 - x1). The y-intercept is b = y1 - m x1, which gives the equation y = mx + b. The same line can also be written as y - y1 = m(x - x1), the point-slope form, or as Ax + By = C with whole numbers and A not negative, the standard form. Coordinates can be decimals, and all of the algebra is done with exact fractions, so a slope of one third stays 1/3 and is shown next to its decimal value instead of being rounded. A vertical line, where both x values are the same, has an undefined slope and the equation x = c. A horizontal line has slope 0 and no x-intercept. The perpendicular slope is the negative reciprocal, and a parallel line has the same slope. The distance between the points is the square root of dx squared plus dy squared, shown with the exact square, and the midpoint is the average of the coordinates. The angle is the inverse tangent of the slope, in degrees. Enter an x to find y on the line, or a y to find x. Nothing is uploaded.

How do I find the slope between two points?▾

Subtract the y values and divide by the difference of the x values: m = (y2 - y1) / (x2 - x1). For (1, 2) and (3, 8), the rise is 6 and the run is 2, so the slope is 3.

How do I write the equation of a line from two points?▾

Find the slope m, then the y-intercept b = y1 - m x1, and write y = mx + b. For (1, 2) and (3, 8), m is 3 and b is -1, so y = 3x - 1. The tool also gives the point-slope and standard forms.

What is the slope of a vertical or horizontal line?▾

A horizontal line has slope 0, because the rise is zero. A vertical line has an undefined slope, because the run is zero and you cannot divide by zero. A vertical line is written x = c.

How do I find a perpendicular or parallel slope?▾

A parallel line has the same slope. A perpendicular line has the negative reciprocal: turn the slope upside down and change its sign. A line with slope 3 has a perpendicular with slope -1/3.

Does it round the slope?▾

No. It keeps the exact fraction and shows the decimal beside it, so a slope of 1/3 is not turned into 0.333. Your points are not uploaded.