webby.tools

Slope Calculator

Enter two points and instantly find the slope between them along with the full equation of the line. Working with whole-number ratios instead of coordinates? Try the LCM and GCF Calculator. Need to solve two equations together instead of finding one line's slope? Try the System of Equations Solver.

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

What Is Slope?

Slope measures how steep a line is — how much it rises or falls as it moves from left to right. It is defined as rise over run: the change in the vertical (y) direction divided by the change in the horizontal (x) direction between two points. Given two points (x₁, y₁) and (x₂, y₂), the formula is:

m = (y₂ - y₁) / (x₂ - x₁)

For example, between the points (1, 2) and (4, 8), the rise is 8 - 2 = 6 and the run is 4 - 1 = 3, so the slope is 6/3 = 2. That means for every 1 unit you move to the right, the line climbs 2 units.

Types of Slope

Positive Slope

A line with a positive slope rises from left to right. As x increases, y also increases. Think of a hiking trail heading uphill — the further you walk, the higher you climb.

Negative Slope

A line with a negative slope falls from left to right. As x increases, y decreases. This is like a ski slope — moving forward means moving downward.

Zero Slope

A line with a slope of exactly 0 is perfectly horizontal. There is rise of zero no matter how far you run. Picture a flat, level road — you move forward without ever gaining or losing elevation.

Undefined Slope

When the two points share the same x-coordinate, the run (x₂ - x₁) is 0, and dividing by zero is undefined. The line is perfectly vertical. A good analogy is a vertical wall — you can go straight up or down, but there's no "left to right" travel at all, so a rise-over-run ratio simply doesn't exist.

Writing the Equation of a Line

Slope-Intercept Form

Slope-intercept form, y = mx + b, is the most common way to write a line's equation. Here, m is the slope and b is the y-intercept — the value of y where the line crosses the y-axis (where x = 0). Once you know the slope, you can find b by plugging either point back into the equation and solving: b = y₁ - m·x₁. This form is especially convenient when you want to graph a line quickly or compare the steepness of multiple lines at a glance.

Point-Slope Form

Point-slope form, y - y₁ = m(x - x₁), is often faster to write down because it skips the step of solving for the y-intercept. It's the natural choice when you're given a slope and a single point and just need an equation immediately — for example, in the middle of a word problem — before deciding whether you need to convert it to slope-intercept form for graphing.

Frequently Asked Questions

What does it mean if the slope is undefined?

An undefined slope means the line is vertical — both points share the same x-coordinate. Since the run (the change in x) is 0, the rise-over-run formula would require dividing by zero, which has no defined value. A vertical line's equation is simply x = (that shared x-coordinate); it cannot be written in the form y = mx + b.

How do I find slope from an equation instead of two points?

If the equation is already in slope-intercept form, y = mx + b, the slope is just the coefficient m in front of x. If it's in another form, such as Ax + By = C, you can rearrange it to solve for y and then read off the coefficient, or pick any two points that satisfy the equation and apply the slope formula directly.

What's the difference between slope-intercept and point-slope form?

Both describe the same line, just organized differently. Slope-intercept form (y = mx + b) is built around the y-intercept and is best for graphing. Point-slope form (y - y₁ = m(x - x₁)) is built around a specific known point and is often quicker to write immediately after calculating a slope, before any further simplification.

How is slope used in real life?

Slope shows up constantly outside the classroom. A road's "grade" is its slope expressed as a percentage (rise over run × 100). A roof's "pitch" describes how steeply it slants, usually as inches of rise per 12 inches of run. Wheelchair ramps are built to strict maximum slopes for safety and accessibility. In each case, the same rise-over-run idea from this calculator is doing the work.

Can two points have a slope of exactly zero — what does that look like?

Yes. If two points have the same y-coordinate but different x-coordinates, the rise (y₂ - y₁) is 0, making the slope exactly 0. Graphically, this is a perfectly flat, horizontal line — for example, the points (2, 5) and (9, 5) both sit at height 5, so the line connecting them never rises or falls.

This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.