Skip to main content
CalcChef

Slope Calculator

Enter two points for the slope (also as a fraction), y-intercept, distance, angle and line equation, or find a missing coordinate from a point and a slope. How it works

Use the Slope Calculator

Slope (m)
2.0000
Angle 63.43° · Percent grade 200.00%

Equation:
y = 2.00x + 0.00
Point-slope:
y − 0 = 2.0000(x − 0)
Y-Intercept (b):
0.0000
Perpendicular slope:
-0.5000
Slope as fraction:
2
Distance
11.1803

Rise / Run = (10.0000) / (5.0000)

About the Slope Calculator

The slope through (0, 0) and (5, 10) is 2: the rise is 10 and the run is 5. This slope calculator takes two points and shows the slope m = (y2 − y1) / (x2 − x1), the y-intercept (0), the distance between the points (11.1803), the angle of the line (63.43°), the percent grade (200.00%), the equation y = 2.00x + 0.00, the point-slope form and the perpendicular slope (-0.5). The slope also shows as a reduced fraction, -2/3 for (-2, 3) and (4, -1), and a second mode finds a missing coordinate from one point and a slope. A vertical line has no slope and is written x = c.

Run and rise to slope, angle and distance

RunRiseSlopeAngleDistance
430.750036.87°5.0000
10101.000045.00°14.1421
1210.08334.76°12.0416
10050.05002.86°100.1249
100100.10005.71°100.4988

Each row is the line from (0, 0) to (run, rise). A percent grade is the slope times 100, so 0.0500 is a 5% grade, which the page shows as a percent grade of 5.00%.

How to use this tool

  1. Enter x1 and y1 for the first point and x2 and y2 for the second. The fields start at (0, 0) and (5, 10).
  2. Read the slope, the slope as a fraction, the equation, the point-slope form, the y-intercept, the perpendicular slope, the angle, the percent grade and the distance.
  3. To find a missing coordinate instead, choose Find a missing coordinate, enter point 1, the slope (or a percent grade) and the X2 or Y2 you know.

Frequently asked questions

How do you find the slope between two points?
Divide the change in y by the change in x. For (-2, 3) and (4, -1) the rise is -1 − 3 = -4 and the run is 4 − (-2) = 6, so m = -4 / 6 = -0.6667. The y-intercept is b = 3 − (-0.6667)(-2) = 1.6667, and the equation is y = -0.67x + 1.67.
What is the slope of a horizontal or a vertical line?
A horizontal line has slope 0: (1, 5) and (4, 5) give y = 0.00x + 5.00, and its perpendicular slope is shown as Undefined (vertical). A vertical line has a run of 0, so its slope is undefined: (2, 3) and (2, 9) show Undefined (Vertical), no y-intercept, an angle of 90.00° and the equation x = 2.
How do I convert a slope to an angle or a percent grade?
The angle is atan(m) in degrees. A rise of 1 over a run of 12 is a slope of 0.0833 and an angle of 4.76°. A rise of 5 over a run of 100 is a slope of 0.0500 and an angle of 2.86°. The angle is measured from the positive x axis and stays between -90° and 90°, so a falling line such as (-2, 3) to (4, -1) shows -33.69°, not 146.31°. The percent grade is the slope times 100, shown to 2 decimals: 0.0500 is a 5% grade (5.00%) and the 1-in-12 ramp is 8.33%. A vertical line has no grade and shows Undefined.
What is the perpendicular slope?
It is the negative reciprocal, −1/m. A line with slope 2 has a perpendicular slope of -0.5, and a line with slope 0.75 has one of -1.3333. The product of two perpendicular slopes is -1, except when one line is horizontal and the other vertical.
How do I find a missing coordinate from the slope?
Choose Find a missing coordinate. With point 1 at (1, 2), slope 3 and X2 = 4, the page uses y2 = y1 + m(x2 − x1) = 2 + 3 × 3 and shows Y2 = 11.0000. Given Y2 instead it uses x2 = x1 + (y2 − y1) / m: from (0, 0) at an 8% grade (slope 0.08), Y2 = 4 gives X2 = 50.0000. A slope of 0 is a horizontal line, so it has no X2 for a different Y2, and the page says so.
What is point-slope form?
It is y − y1 = m(x − x1), written with the first point. For (-2, 3) and (4, -1) the page shows y − 3 = -0.6667(x + 2). The slope-intercept equation, y = -0.67x + 1.67, is the same line with m and b rounded to 2 decimals, so for closer work use the point-slope form or the 4-decimal slope and intercept.

Related Tools

View all tools