Slope Calculator – Find the Angle or Equation of a Line

Use the slope calculator to do the following:

  • Calculate the slope of a line that passes through 2 points
  • Solve a coordinate given the slope and distance from a point
  • Find the x or y of a point given another point and the slope
  • Find the slope intercept form of a line.
Calculate Using the Following:

Find the Slope Given 2 Points

Find a Point Given 1 Point, Slope, and Distance

or
degrees

Find a Point Given 1 Point, Slope, and an x or y Value

or
or
degrees

Points, Slope, Angle, & Distance:

The slope of the line connecting (1, 3) and (2, 5) is 2

Slope (m):2
Angle (θ):63.4349°
Distance:2.2361
Δx:1
Δy:2
Slope Intercept Form:
(y = mx + b)
y = 2x + 1

Start with the formula to calculate slope
Slope (m)=
(y2 - y1)
(x2 - x1)
Substitute point values in the equation
m=
(5 - 3)
(2 - 1)
Simplify each side of the equation
m=
(5 - 3)
(2 - 1)
=
2
1
Solve for slope (m)
m=2


Line on a graph connecting two points

How to Find Slope of a Line Given 2 Points

Slope is the angle of a line on a graph and can be found by comparing any 2 points on the line. A point is an x and y value of a cartesian coordinate on a grid. Slope, often represented as m, can be found using the following formula:

Slope (m) =
(y2 – y1)
(x2 – x1)

To find slope, start by finding x and y values of 2 different points along the line. x is the horizontal distance of the point from the vertical y axis and y is the vertical distance of the point from the horizontal x axis.

For example, for a line that passes through the points (7,3) and (12,7) the formula to find slope would look like this:

m =
(7 – 3)
(12 – 7)

To solve:

m =
4
5

Using Slope Intercept Form

A linear line can be expressed using the slope intercept form, which is an equation representing the line. The equation of a linear line can be expressed using the formula y = mx + b where m is the slope of the line and b is the y-intercept value. The slope intercept form can be solved using the slope of a line and one point on the line.

For example, given a slope of 1/2 and a point (5,4), solve for b.

Substitute the slope for m:

y =
1
2
x + b

Substitute the point values for x and y:

4 =
1
2
× 5 + b

Solve for b:

4 = 2.5

+ b
4 b = 2.5
-b = 2.5 4
-b = -1.5
b = 1.5

Substitute b in the equation to get the slope intercept form:

y =
1
2
x + 1.5

Find a Point Given 1 Point, Slope, and Distance

Points on a line can be solved given the slope of the line and the distance from another point. The formulas to find x and y of the point to the right of the point are:

x2 = x1 +
d
1 + m2
y2 = y1 + m ×
d
1 + m2

The formulas to find x and y of the point to the left of the point are:

x2 = x1 +
-d
1 + m2
y2 = y1 + m ×
-d
1 + m2

Converting Slope to Angle

The angle of a line in degrees can be found from the inverse tangent of the slope (m).

θ = tan-1(m)

For example, if slope = 5, then the angle in degrees is tan-1(5).

Our angle unit conversion calculator can help convert the angle measurement from degrees to radians or grad.

Converting Angle to Slope

An angle in degrees can also be converted to a slope. Slope is equal to the tangent of the angle.

m = tan(θ)

For example, if angle = 72, then the slope is equal to tan(72).

Finding the Distance Between 2 Points

The formula to find the distance (d) between 2 different points is:

d = √((x2 – x1)2 + (y2 – y1)2)

Solving the Delta of x and y

The delta of x and y, expressed using the symbol Δ, is simply the absolute value of the distance between the x values or y values of 2 points.

The delta of x can be solved using the formula Δx = x2 – x1.

The delta of y can be solved using the formula Δy = y2 – y1.