Slope, Distance and Equation Calculator
A calculator for determining the slope of a road is located here.
When 2 Points Are Known
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 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
Now, if we want to calculate the slope angle we merely take the arc tangent of the
slope. In this case, arc tangent(.5) = 26.565...degrees.
Utilizing the Pythagorean Theorem, the distance between
the two points is:Distance = Square Root ( (X difference)2 + (Y difference)2 )
Distance = Square Root ( 22 + 42 )
Distance = Square Root ( 20 )
Distance = 4.4721 ...
We can now formulate a linear equation, the standard form of which is:
y = mx + b
We know the slope so now we must 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
(NOTE: b is also the y-intercept, which is the y-value where the equation intersects
As a double check, we can use the other point (5,4) and get
b= 4 -.5*5 = 4 -2.5 = 1.5y = .5x + 1.5
So, the equation shown in the above graph is:
When Slope and 1 Point Are Known
Example: A line has a slope of 9 and passes through the point (7,5).b = y - mx
b = 5 - 9•7
b = -58
Putting this in standard form:
What is the equation?
From the above example, we can use the formula:
y = 9x -58
Use this example in the calculator below.
Return To Home Page
Copyright © 1999 -
1728 Software Systems