Math and school
How to find the slope of a line from two points
Slope tells you how steep a line is and which way it goes: how much y changes for each step in x. You will work it out from two points, write the line's equation in the three usual forms and check special cases such as vertical lines.
Keep the points in the same order on top and bottom: (y₂ − y₁) over (x₂ − x₁). Swapping only one of them flips the sign.
Open Slope calculatorContents
Open the Slope calculator on cv.cm
You need two points on the line, such as (1, 2) and (4, 8). Coordinates can be whole numbers, decimals or fractions.
Open Slope calculatorFind the rise and the run
The rise is the change in y: 8 − 2 = 6. The run is the change in x: 4 − 1 = 3. The slope is rise over run: m = 6 ÷ 3 = 2, so y goes up 2 for every 1 to the right.
Slope is rise over run between the two points. Read the sign
A positive slope rises from left to right, a negative one falls, and a slope of 0 is a horizontal line. When the run is 0 the line is vertical and the slope is undefined.
Find the y-intercept
Put one point into y = mx + b and solve for b: 2 = 2 × 1 + b, so b = 0 and the line is y = 2x. The calculator keeps fractions exact, so a slope of 2/3 is not rounded to 0.67.
Write the other forms
Point-slope form uses a point directly: y − 2 = 2(x − 1). Standard form puts x and y on one side with whole numbers: 2x − y = 0. All three describe the same line.
Three ways to write the same line. Use the extras
The angle (63.43° here) and the grade (200%) describe steepness for ramps and roads. The distance between the points is √(Δx² + Δy²) = √45 = 3√5, and the midpoint is (2.5, 5).
FAQ
What is the slope formula?
m = (y₂ − y₁) ÷ (x₂ − x₁): the change in y divided by the change in x between two points.
What is the slope of a horizontal line?
Zero. The rise is 0, so y stays the same whatever x is, and the equation is y = a number.
How is slope related to angle?
The slope is the tangent of the angle to the x-axis: a slope of 1 is 45°, a slope of 2 is about 63.4°.
What does a slope of 2/3 mean?
y rises 2 units for every 3 units to the right.
How do I turn slope into a percent grade?
Multiply by 100. A slope of 0.05 is a 5% grade: 5 m up for every 100 m along.