Slope, Distance and Equation Calculator

A calculator for determining the slope of a road is located here.

When 2 Points Are Known

X1=
X2=
Y1=
Y2=

Distance=
Slope=
Angle=
Equation=

I N S T R U C T I O N S

In mathematics, slope (designated by the letter 'm') is defined as the ratio of the 'Y' axis to the 'X' axis between 2 points. In less formal terms this is called the "rise over the run".
The formula for determining the slope between 2 points is:
Slope = m = (Y2 -Y1) ÷ (X2 -X1)
In the above graph we have 2 points where 'a' has the values of x=1 y=2 and the values of point 'b' are x=5 y=4. The math "shorthand" for this is a(1,2) and b(5,4).
Using the formula, we can determine a linear equation's slope from these 2 points.
m = (4 - 2) ÷ (5 - 1)
m = 2 / 4
m = .5

(If we needed to calculate the slope angle we merely take the arc tangent of the slope. In this case, arc tangent(.5) = 26.565...degrees).

We can now formulate a linear equation, the standard form of which is:

y = mx + b
Since we already know the slope (.5) we now can calculate b.
The equation can be re-written as:
b = y -mx

Let's take one of the 2 given points (1, 2) and "plug it in" to the formula.
b = 2 -.5*1
and therefore b=1.5
(NOTE: b is also the y-intercept, which is the y-value where the equation intersects the y-axis.)

As a double check, we can use the other point (5,4) and get b= 4 -.5*5 = 4 -2.5 = 1.5
So, the equation shown in the above graph is:

y = .5x + 1.5

In order to find the distance between the two points we utilize the Pythagorean Theorem,:
Distance = Square Root ( (X difference)2 + (Y difference)2 )
Distance = Square Root ( 22 + 42 )
Distance = Square Root ( 20 )
Distance = 4.4721 ...

When Slope and 1 Point Are Known
 Example: A line has a slope of 9 and passes through the point (7,5). What is the equation? We can calculate "b" from this equation: b = y - mx b = 5 - 9•7 b = -58 Then, we enter the value of "b" and the slope into this equation: y = mx +b y = 9x -58 Use this example in the calculator below.

X1=
Y1=
Slope=

Equation=
Angle=