FreeMathCamp
Course Articles

Free Math Camp

A free course in the maths you need before calculus. Short lessons, interactive visuals, practice that adapts to you, and a record of progress on your account.

freemathcamp.app

Made by Adam Richard Turner

hello@adamrichardturner.dev

Course

  • Foundations
  • Articles
  • Start free
  • Sign in

Legal

  • Privacy
  • Terms
  • Do not sell or share

Copyright © Adam Richard Turner. All rights reserved.

  1. Articles
  2. /
  3. Graphs & Functions
Graphs & Functions

Slope (Gradient) of a Line: Rise Over Run Explained

What slope measures, how to calculate it from a graph or two points, what positive, negative, zero and undefined slopes look like, and why slope is the idea calculus is built on.

3 min read Supports 4 lessons
In short

The slope, or gradient, of a line measures its steepness: how much yyy changes for each step of 111 in xxx. Between two points, m=riserun=y2−y1x2−x1m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}m=runrise​=x2​−x1​y2​−y1​​.

Some hills are gentle and some are steep. To compare them with a number, measure how far you climb for each step you take forwards. That ratio, rise over run, is the slope.

Drag the two points below and watch the slope triangle change.

Slope formula
m=riserun=y2−y1x2−x1m = \frac{\text{rise}}{\text{run}} = \frac{y_2 - y_1}{x_2 - x_1}m=runrise​=x2​−x1​y2​−y1​​

Calculating slope from two points

  1. (1,3) and (4,−3)(1, 3) \text{ and } (4, -3)(1,3) and (4,−3)

    Label one point (x1,y1)(x_1, y_1)(x1​,y1​) and the other (x2,y2)(x_2, y_2)(x2​,y2​).

1/4
Watch out

Subtract in the same order top and bottom. y2−y1x1−x2\frac{y_2 - y_1}{x_1 - x_2}x1​−x2​y2​−y1​​ gives the right size but the wrong sign.

Tip

It does not matter which point you call the first. Swapping them flips the sign of both the rise and the run, and the slope stays the same.

What the number tells you

A positive slope climbs from left to right. A negative slope falls. The bigger the number (ignoring its sign), the steeper the line.

Steeper lines have bigger slopes; falling lines have negative slopes.

A horizontal line has slope 000: no rise at all. A vertical line has undefined slope, because its run is 000 and you cannot divide by zero.

Slope is a rate

Slope means "change in yyy per unit change in xxx". If xxx is time in hours and yyy is distance in km, the slope is a speed in km per hour. If xxx is items and yyy is cost, the slope is the price per item. Slope is a unit rate you can see.

Key idea

A straight line has the same slope everywhere. A curve does not, and calculus is the study of how to measure the slope of a curve at a single point. That slope is called the derivative.

Parallel and perpendicular

Parallel lines rise at the same rate, so they have equal slopes. Perpendicular lines have slopes that multiply to −1-1−1: if one has slope 222, a line at right angles to it has slope −12-\frac{1}{2}−21​.

Common questions

Is slope the same as gradient?

Yes. "Slope" is more common in the US and "gradient" in the UK, but they mean the same: rise divided by run.

What is the slope of a vertical line?

It is undefined. A vertical line has a run of 000, and division by zero has no answer.

Practise slope

The Slope lesson has worked examples and unlimited practice that adapts to you.

Open the lesson

On this page

  1. Calculating slope from two points
  2. What the number tells you
  3. Slope is a rate
  4. Parallel and perpendicular
  5. Common questions
Lessons on this
  • SlopeGraphs & Linear Equations
  • Slope-Intercept FormGraphs & Linear Equations
  • Writing Equations of LinesGraphs & Linear Equations
  • Average Rate of ChangeFunctions
Related reading7
Ideas this article builds on or leads to.
  • Graphs & Functions
    Equation of a Straight Line: y = mx + b and Point-Slope Form

    Every non-vertical straight line can be written y=mx+by = mx + by=mx+b, where mmm is the slope and bbb is the yyy-intercept, the height where the line crosses the yyy-axis.

  • Ready for Calculus
    Average Rate of Change and the Secant Line

    The average rate of change of a function between x=ax = ax=a and x=bx = bx=b is the change in output divided by the change in input, f(b)−f(a)b−a\frac{f(b) - f(a)}{b - a}b−af(b)−f(a)​. It is the slope of the secant line joining the two points.

  • Ratio & Proportion
    Rates and Unit Rates: Speed, Best Buys and Per-One Comparisons

    A rate compares two quantities measured in different units, such as 150150150 km in 333 hours. A unit rate scales it to one of the second quantity: 505050 km per hour.

  • Graphs & Functions
    The Coordinate Plane: Axes, Quadrants and Plotting Points

    The coordinate plane is a grid made by two perpendicular number lines, the xxx-axis and the yyy-axis. Every point has an address (x,y)(x, y)(x,y): how far across, then how far up.

  • Ratio & Proportion
    Ratios Explained: Simplifying and Sharing in a Ratio

    A ratio compares the sizes of two or more quantities. 2:32 : 32:3 means that for every 222 of the first there are 333 of the second.

  • Ready for Calculus
    What Is a Derivative? The Difference Quotient and the Slope of a Curve

    The derivative of fff at xxx is the slope of the curve at that point: the instantaneous rate of change. It is the limit of the difference quotient, f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0}\frac{f(x + h) - f(x)}{h}f′(x)=limh→0​hf(x+h)−f(x)​.

  • Geometry
    Angles Explained: Types of Angles and Angle Facts

    An angle measures an amount of turn. A full turn is 360°360°360°, a straight line 180°180°180° and a right angle 90°90°90°. Angles on a straight line add to 180°180°180° and angles around a point add to 360°360°360°.