Slope Calculator - CalcVenue

Slope Calculator

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.

Point 1
X₁
Y₁
Point 2
X₂
Y₂
Point 1
X₁
Y₁
Slope
m (rise/run)
Optional
X₂ of a 2nd point

Slope Calculator: Find the Slope, Angle, and Equation of a Line

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.

What Is Slope?

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.

The Slope Formula

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.

What This Calculator Computes

From the two points you enter, the slope calculator returns a full set of related values:

  • Slope (m) — the rise over run, calculated with the slope formula above.
  • Δx and Δy — the horizontal and vertical distances between the two points.
  • Angle of incline (θ) — the angle the line makes with the horizontal x-axis, found with θ = arctan(m), expressed in degrees.
  • Percentage grade — the slope written as a percentage, equal to m × 100%. This is the form used for roads and ramps.
  • Distance (d) — the straight-line distance between the two points, from the Pythagorean theorem: d = √(Δx² + Δy²).
  • Y-intercept (b) — the point where the line crosses the y-axis, found from b = y₁ − m · x₁.
  • Equation of the line — the line written in slope-intercept form, y = mx + b.

Slope, Angle, and Percentage Grade

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.

Slope-Intercept Form: y = mx + b

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.

Using the "Point & Slope" Tab

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.

How to Find the Slope Step by Step

Finding a slope by hand is straightforward once you know the formula. Here is the full process:

  1. Label your points. Call the first point (x₁, y₁) and the second (x₂, y₂). It does not matter which is which, only that you stay consistent.
  2. Find the rise (Δy). Subtract the y-coordinates: Δy = y₂ − y₁.
  3. Find the run (Δx). Subtract the x-coordinates in the same order: Δx = x₂ − x₁.
  4. Divide. The slope is m = Δy / Δx. Simplify the fraction or convert it to a decimal.
  5. Interpret the result. A positive value rises, a negative value falls, zero is flat, and if Δx is zero the slope is undefined (a vertical line).

Special Cases: Horizontal, Vertical, Parallel, and Perpendicular Lines

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.

Real-World Applications of Slope

Slope is not just an abstract classroom idea — it appears everywhere:

  • Construction and roofing. Roof pitch is a slope, usually given as rise over a 12-unit run (for example, "4 in 12"). Ramps must meet slope limits for accessibility, commonly a maximum of 1:12 (about 8.3%).
  • Roads and railways. Highway grades are posted as percentages; a steep mountain road might be 7%, while railways rarely exceed a few percent because trains struggle on inclines.
  • Physics and motion. On a graph of distance against time, the slope is the speed; on a velocity-time graph, the slope is the acceleration.
  • Economics and data. The slope of a trend line shows the rate of change — how fast a cost, price, or quantity rises or falls.
  • Geography. The steepness of terrain, drainage, and hiking-trail difficulty are all described by slope.

Common Slope Values at a Glance

It can help to memorize a few reference points that connect slope, angle, and grade, so you can sanity-check any result:

  • Slope 0 → 0° angle, 0% grade — a flat, horizontal line.
  • Slope 0.5 → about 26.57°, 50% grade — a moderate incline.
  • Slope 0.577 → exactly 30°, about 57.7% grade.
  • Slope 1 → exactly 45°, 100% grade — rises as fast as it runs.
  • Slope 1.732 → exactly 60°, about 173.2% grade — a steep climb.
  • Slope → ∞ → 90°, undefined grade — a vertical line.

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.

Tips for Entering Coordinates

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.

Slope and Calculus

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.

Frequently Asked Questions

How do I calculate the slope between two points?

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.

What does a negative slope mean?

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.

Why is the slope of a vertical line undefined?

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.

How do I convert slope to an angle?

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.

What is the difference between slope and grade?

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.

Do parallel lines have the same slope?

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).

Can I find the equation of a line from just one point and the slope?

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.

Disclaimer

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.