Skip to content
    Algebra

    How to Find the Slope of a Line (Step-by-Step)

    Why do some wheelchair ramps feel gentle while others feel like a wall? It's all down to one number: slope. Give this guide two points and you'll be able to find the slope of any line in under a minute.

    Math Solver Academic Editorial Board4 min read

    Key takeaways

    • Slope is m = (y₂ - y₁) / (x₂ - x₁), or rise over run.
    • Keep the point order consistent: don't take y₂ - y₁ but x₁ - x₂.
    • A vertical line (x₁ = x₂) has an undefined slope, not a slope of 0.
    • Positive slope goes uphill left to right; negative slope goes downhill.
    In this guide
    1. 01What is slope?
    2. 02Why does slope matter?
    3. 03The formula
    4. 04How to find slope step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you'll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is slope?

    Slope measures steepness: how many units a line rises (or falls) for every unit it moves sideways. A steep mountain road has a big slope. A flat road has a slope close to 0. A line going downhill has a negative slope.

    Why does slope matter?

    Slope isn't just a graphing exercise — it's how you describe steepness with a single number instead of a picture. Builders use it for roof pitch and ramp angles, drivers use it for road grades, and in algebra it's the number that tells you how fast y changes as x changes.

    Two lines can look almost the same on a small graph, but a slope of 1 rises one unit for every unit across, while a slope of 5 rises five times as fast. Small differences in slope add up quickly over distance.

    The formula

    m = (y₂ - y₁) / (x₂ - x₁)
    SymbolWhat it meansExample
    mThe slope you're solving for3
    (x₁, y₁)The first point on the line(1, 2)
    (x₂, y₂)The second point on the line(4, 11)

    How to find slope step by step

    1. 1Label your two points. Call one (x₁, y₁) and the other (x₂, y₂). It doesn't matter which is "first", as long as you stay consistent.
    2. 2Find the rise. Subtract the y-values: y₂ - y₁.
    3. 3Find the run. Subtract the x-values in the same order: x₂ - x₁.
    4. 4Divide rise by run. That gives you m.

    Try your own two points in the calculator below and watch every step appear.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Algebra
    Middle School

    Slope Formula

    Calculate the slope between two points

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

    (0, -1)
    m = 3b = -1
    0.120
    120
    120
    124

    💡 Example

    Reference
    Inputs:x1=1, y1=2, x2=3, y2=8
    Result:3
    Open the full Slope Formula calculator

    Common mistakes to avoid

    • Dividing by zero. If x₁ = x₂, the line is vertical and the slope is undefined — not zero.
    • Swapping rise and run. Rise (the y-change) always goes on top of the fraction.
    • Rounding too early. Keep full decimals until the last step if your points aren't whole numbers.

    Tips and tricks

    • To check your work, plug both points back into y = mx + b and confirm you get the same b for both.
    • Working backwards? If you know the slope and one point, you can find the full line equation with the linear equation solver.
    • Need the exact middle of your two points instead of the steepness? Use the midpoint calculator.

    Where you'll use it in real life

    • Construction: roof pitch and wheelchair ramp angles are both slopes in disguise.
    • Driving: road signs showing a percentage grade are describing slope as a percent.
    • Algebra and graphing: slope tells you the shape of a line before you even plot it.
    • Distance problems: pair slope with the distance formula calculator to fully describe a segment between two points.

    Quick summary

    Slope is rise over run: subtract the y-values, subtract the x-values in the same order, then divide. A vertical line has no slope, and the sign tells you whether the line climbs or falls. Use the calculator above to check your work with every step shown.

    Worked example

    A wheelchair ramp starts at ground level, point (1, 2), and reaches the doorway at point (4, 11), measured in meters across and up. How steep is the ramp?

    1. 01m = (y₂ - y₁)/(x₂ - x₁)
    2. 02m = (11 - 2)/(4 - 1)
    3. 03m = 9/3
    4. 04m = 3

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    How do I find the slope from two points?

    Subtract the y-values to get the rise, subtract the x-values in the same order to get the run, then divide rise by run: m = (y₂ - y₁) / (x₂ - x₁).

    What does a negative slope mean?

    A negative slope means the line goes downward as you move from left to right — as x increases, y decreases.

    What is a slope of zero?

    A slope of 0 means the line is perfectly flat (horizontal) — y stays the same no matter how x changes.

    Can slope be a fraction?

    Yes. A slope like 1/2 means the line rises 1 unit for every 2 units it moves across — perfectly normal and very common.

    #Algebra#Middle School#Slope Formula
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX