Find the slope of a line from two points, or from a point and a known slope. The calculator also returns the angle of incline, the percentage grade, the distance between the points, and the equation of the line in the form y = mx + b.
The slope calculator finds the slope of a straight line and everything that goes with it — the angle the line makes with the horizontal, its steepness as a percentage grade, the distance between the two points, and the full equation of the line in slope-intercept form, y = mx + b. Enter the coordinates of two points, or switch to the second tab to work from a single point and a known slope. Whether you are studying algebra, checking the pitch of a roof, or working out the grade of a road, this tool gives you a complete picture of the line in one step.
Slope is one of the most fundamental ideas in coordinate geometry. It measures how steep a line is and in which direction it tilts. A large slope means a steep line; a slope of zero means a flat, horizontal line; and a negative slope means the line falls as you move from left to right. Understanding slope is the gateway to linear equations, calculus, physics, engineering, and countless real-world applications.
The slope of a line, usually written as the letter m, is the ratio of the vertical change to the horizontal change between any two points on the line. In plain language, it is "rise over run" — how much the line goes up (or down) for every unit it moves across. Because a straight line has a constant steepness, this ratio is the same no matter which two points you pick along it.
A positive slope rises from left to right, a negative slope falls from left to right, a slope of zero is perfectly horizontal, and a vertical line has an undefined slope (because the horizontal change is zero and you cannot divide by zero). The larger the absolute value of the slope, the steeper the line.
Given two points, (x₁, y₁) and (x₂, y₂), the slope is calculated with the slope formula:
m = (y₂ − y₁) / (x₂ − x₁) = Δy / Δx = rise / run
Here Δy (delta y) is the difference in the y-coordinates and Δx (delta x) is the difference in the x-coordinates. The order of the points does not matter, as long as you are consistent: if you start with point 2 in the numerator, you must start with point 2 in the denominator too. Subtracting them in opposite orders in top and bottom would flip the sign and give the wrong answer.
For example, take the points (1, 5) and (7, 6). The change in y is 6 − 5 = 1, and the change in x is 7 − 1 = 6. So the slope is m = 1 / 6 ≈ 0.166667. This is a gentle upward slope: for every 6 units you move to the right, the line rises 1 unit.
From the two points you enter, the slope calculator returns a full set of related values:
These three quantities describe the same steepness in different languages, and it helps to see how they relate. The slope is a pure ratio (rise over run). The angle converts that ratio into degrees using the arctangent function: θ = arctan(m). And the percentage grade simply multiplies the slope by 100.
For instance, a slope of 1 corresponds to an angle of 45° and a grade of 100% — the line rises exactly as fast as it runs. A slope of 0.5 is an angle of about 26.57° and a 50% grade. A road sign warning of a "6% grade" means a slope of 0.06, or an angle of roughly 3.43°. Note that a 100% grade is not "vertical" as people sometimes assume — it is a 45° incline. This is a common source of confusion, and the calculator makes the relationship explicit.
Once you know the slope and one point, you can write the equation of the entire line. The most common format is slope-intercept form, y = mx + b, where m is the slope and b is the y-intercept (the y-value where the line crosses the vertical axis). The calculator finds b by rearranging: since the line passes through (x₁, y₁), we have y₁ = m · x₁ + b, so b = y₁ − m · x₁.
Using our example points (1, 5) and (7, 6): the slope is 0.166667, so b = 5 − 0.166667 × 1 = 4.83333. The equation of the line is therefore y = 0.166667x + 4.83333. You can plug any x-value into this equation to find the corresponding y-value on the line, which is exactly what the second tab of the calculator does.
The second tab handles the reverse problem: you already know the slope of a line and one point on it, and you want the line's equation or a second point. This is the situation you meet with point-slope problems, and with real-world grades where the slope (as a ratio or a percentage) is given and you need to project how high a line reaches at a certain distance.
Enter your known point (x₁, y₁) and the slope m. The calculator returns the y-intercept, the angle, the percentage grade, and the equation y = mx + b. It also lets you enter the x-coordinate of a second point to find its matching y-coordinate, using y₂ = y₁ + m(x₂ − x₁). For example, with the point (9, 12) and a slope of 0.12, the line reaches y = 10.92 when x = 0 — so its y-intercept is 10.92 and its equation is y = 0.12x + 10.92.
Finding a slope by hand is straightforward once you know the formula. Here is the full process:
A few special situations are worth remembering. A horizontal line has a slope of 0, because the y-value never changes (Δy = 0). Its equation is simply y = b. A vertical line has an undefined slope, because Δx = 0 and division by zero is not allowed; its equation is written x = a instead of y = mx + b.
Two parallel lines always have equal slopes — they rise and fall at exactly the same rate, so they never meet. Two perpendicular lines have slopes that are negative reciprocals of each other, meaning their product is −1. If one line has a slope of 2, a line perpendicular to it has a slope of −1/2. These relationships are used constantly in geometry to test whether lines are parallel or meet at right angles.
Slope is not just an abstract classroom idea — it appears everywhere:
It can help to memorize a few reference points that connect slope, angle, and grade, so you can sanity-check any result:
Notice that grade and angle are not the same thing: doubling the grade does not double the angle. As lines get steeper, small increases in grade produce smaller and smaller increases in angle, until the angle approaches 90° only as the grade races toward infinity. This is why a "45° slope" (100% grade) already feels dramatically steep in real life — it is far steeper than most roads or roofs you will ever encounter.
When you enter your two points, remember that the sign of each coordinate matters. Negative x-values sit to the left of the origin and negative y-values sit below it. The calculator accepts decimals and negatives in every field, so you can work with any points on the plane. If you get an "undefined" slope, check whether your two x-values are identical — that produces a vertical line. If you get a slope of exactly zero, your two y-values match, giving a horizontal line. Both are valid results, not errors.
In calculus, slope becomes even more powerful. The slope of a straight line is constant, but the "slope" of a curve changes from point to point. The derivative of a function gives the slope of the line tangent to the curve at any point — the instantaneous rate of change. The basic slope formula you use here, the ratio of a small change in y to a small change in x, is exactly the idea that, taken to its limit, defines the derivative. Mastering slope with straight lines is the essential first step toward understanding rates of change in calculus.
Subtract the y-coordinates to get the rise, subtract the x-coordinates (in the same order) to get the run, then divide: m = (y₂ − y₁) / (x₂ − x₁). For the points (1, 5) and (7, 6), the slope is (6 − 5) / (7 − 1) = 1/6 ≈ 0.167.
A negative slope means the line falls as you move from left to right — the y-values decrease as the x-values increase. The steeper the fall, the larger the absolute value of the (negative) slope.
A vertical line has the same x-value at every point, so the run (Δx) is zero. Since the slope formula divides by Δx, and division by zero is undefined, a vertical line has no defined slope. Its equation is written as x = a.
Take the arctangent (inverse tangent) of the slope: θ = arctan(m). A slope of 1 gives 45°, a slope of 0 gives 0°, and a slope of about 0.577 gives 30°. The calculator does this conversion automatically and reports the angle in degrees.
They describe the same steepness. Slope is the plain ratio of rise to run, while grade is that ratio expressed as a percentage (slope × 100). A slope of 0.05 is a 5% grade.
Yes. Parallel lines rise and fall at exactly the same rate, so they always have equal slopes. Perpendicular lines, by contrast, have slopes that are negative reciprocals (their product is −1).
Yes — use the second tab. With one point (x₁, y₁) and the slope m, the y-intercept is b = y₁ − m · x₁, and the equation is y = mx + b. You can then find the y-value at any x, or the x-value at any y.
This Slope Calculator is provided for educational and general informational purposes. While it uses the standard slope, distance, and line-equation formulas, you should verify results independently for critical engineering, construction, or academic work.