Slope Calculator

: Find the slope and equation of a line from two points, a point and slope or an equation, with intercepts, the angle and percent grade, worked exactly
Line
Whole numbers, decimals, negatives or fractions such as 3/4 and -1 1/2.
Exact: decimals and fractions are kept as fractions while calculating, so the slope, intercepts and equations are exact. Angles, square-root distances and slopes from an angle are rounded; ≈ marks a rounded figure.
Result
Slope (m)
3/2 = 1.5
Slope-intercept form
y = (3/2)x + 1/2
In decimals: y = 1.5x + 0.5
Point-slope form
y - 2 = (3/2)(x - 1)
y - y₁ = m(x - x₁) through (1, 2).
Standard form
3x - 2y = -1
Ax + By = C in whole numbers. General form: 3x - 2y + 1 = 0
Rise (Δy)
6
y₂ - y₁ = 8 - 2
Run (Δx)
4
x₂ - x₁ = 5 - 1
Direction
Rising
Up 3 for every 2 to the right.
Angle
56.3099°
arctan(1.5) in degrees (0.982794 rad), above the horizontal. This is also the angle of inclination.
Percent grade
150%
Rise ÷ run × 100: how far it climbs for every 100 across.
Ratio (rise : run)
≈ 1 : 0.666667
1 up (or down) for every about 0.666667 across. In whole numbers 3 : 2.
y-intercept
(0, 0.5)
b = 1/2 = 0.5: where the line crosses the y-axis.
x-intercept
(-1/3, 0)
Where y = 0: x = -1/3 ≈ -0.333333.
Perpendicular slope
-2/3 ≈ -0.666667
-1 ÷ m. Through (1, 2): y = -(2/3)x + 8/3. A parallel line has the same slope, 3/2.
Distance between the points
√52 ≈ 7.2111
√(run² + rise²) = √(4² + 6²).
Midpoint
(3, 5)
Halfway between the two points: ((x₁ + x₂) / 2, (y₁ + y₂) / 2).
Working
m = (y₂ - y₁) / (x₂ - x₁) = (8 - 2) / (5 - 1) = 6 / 4 = 3/2 = 1.5 b = y₁ - m × x₁ = 2 - (3/2) × 1 = 1/2
Rise over run
run 4rise 6

A slope calculator that finds the slope of a line from two points, from a point and a slope, from a typed equation, or from a rise and run, percent grade, angle or ratio. With the slope it gives the equation of the line in slope-intercept, point-slope and standard form, the y- and x-intercepts, the angle, the percent grade, the perpendicular slope and the working with your numbers. Fractions stay exact, so a slope of 2/3 is shown as 2/3, not 0.6666666667.

  1. Pick how you know the line beside Line (buttons on a computer, a drop-down on a phone): Two points, Point and slope, Equation, or Rise and run, %, angle to convert between slope forms.
  2. Type the numbers. Coordinates and slopes take whole numbers, decimals, negatives and fractions (3/4, -1 1/2). An equation can be in any linear form: y = 2x + 3, y = -x/2 + 1, 2x + 3y = 6, 3x - 4y + 12 = 0 or x = 5.
  3. Read Slope (m) and Slope-intercept form at the top, then the other forms, the intercepts, the angle and the percent grade. Working shows each step with your numbers, and the triangle below the figures draws the rise over the run.
  4. Copy all or Download keeps every figure. A marked field says what is wrong with it, such as two points that are the same.

The slope and equation of the line through (1, 2) and (5, 8).

Input
x₁: 1
y₁: 2
x₂: 5
y₂: 8
Output
Slope (m): 3/2 = 1.5
Slope-intercept form: y = (3/2)x + 1/2
Point-slope form: y - 2 = (3/2)(x - 1)
Standard form: 3x - 2y = -1
Angle: 56.3099°
Percent grade: 150%
y-intercept: (0, 0.5)
x-intercept: (-1/3, 0)
Perpendicular slope: -2/3 ≈ -0.666667
Distance between the points: √52 ≈ 7.2111
Midpoint: (3, 5)

Working:
m = (y₂ - y₁) / (x₂ - x₁)
  = (8 - 2) / (5 - 1)
  = 6 / 4
  = 3/2 = 1.5
b = y₁ - m × x₁ = 2 - (3/2) × 1 = 1/2

How do you find the slope from two points?

Subtract the y values and the x values in the same order and divide: m = (y₂ - y₁) / (x₂ - x₁). For (1, 2) and (5, 8) that is (8 - 2) / (5 - 1) = 6/4, which reduces to 3/2 = 1.5.

How do you convert slope to percent and to degrees?

Percent grade is the slope × 100; the angle is arctan(slope). A slope of 3/4 is 75% and 36.8699°. Going from degrees to percent, take the tangent and multiply by 100: 30° is ≈ 57.735%. The same rise over run, percent and angle apply to a roof, a ramp or a road.

What is point-slope form?

y - y₁ = m(x - x₁), the equation of a line written from one point (x₁, y₁) and the slope m. The point (2, -1) with slope 3/4 gives y + 1 = (3/4)(x - 2); solved for y it is y = (3/4)x - 5/2.

What is the slope of a vertical line?

Undefined. A vertical line has a run of 0, and dividing the rise by 0 has no value. Its equation is x = c (through (3, 1) and (3, 7) it is x = 3); a horizontal line, by contrast, has a slope of 0.

How do you find the slope and y-intercept from an equation?

Solve the equation for y to get y = mx + b; m is the slope and b the y-intercept. For 3x - 4y + 12 = 0 that is y = (3/4)x + 3: slope 3/4 = 0.75, crossing the y-axis at (0, 3). The Equation mode does this for you and shows the steps.

Runs entirely in your browser. Nothing is uploaded.