Algebra guide

Slope and Intercept Explained

Slope measures a line's rate of change; the intercept locates its vertical-axis crossing. Follow worked examples, check exact equations, and handle horizontal and vertical lines with confidence.

Worked examples · Exact fractions · Graphing checks

Try the two-point example

What slope and intercept actually mean

For two distinct points (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) with x1≠x2x_1\ne x_2, slope is vertical change divided by horizontal change. These signed changes are often called rise and run. Read the coordinate values on the axes, rather than counting squares without checking their scale.

m=ΔyΔx=y2−y1x2−x1m=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1}

In slope-intercept form y=mx+by=mx+b, the letter bb is a number, while the vertical-axis intercept is the point (0,b)(0,b). A positive slope rises from left to right; a negative slope falls. Moving the line up or down changes its intercept but leaves its slope unchanged.

Definitions: OpenStax on slope and slope-intercept form.

Slope-intercept form

y=mx+by=mx+b

Best when you know the rate mm and vertical-axis crossing (0,b)(0,b).

Point-slope form

y−y1=m(x−x1)y-y_1=m(x-x_1)

Best when you know a finite slope mm and any point (x1,y1)(x_1,y_1) on the line.

Standard form

Ax+By=CAx+By=C

Can describe vertical lines too. At least one of AA and BB must be nonzero.

Example one: find a line from two points

Find the line through P=(1,5)P=(1,5) and Q=(3,9)Q=(3,9). Neither point is on the vertical axis, so neither given vertical coordinate is automatically the intercept. Keep the calculation exact and verify the final equation using both points.

  1. 1. Find rise and run

    Δx=3−1=2\Delta x=3-1=2Δy=9−5=4\Delta y=9-5=4

    Subtract coordinates in the same point order. Reversing both differences gives the same slope; reversing only one changes its sign.

  2. 2. Divide to find slope

    m=42=2m=\frac{4}{2}=2

    The line rises two units for every one unit to the right. Using the opposite point order also gives m=(−4)/(−2)=2m=(-4)/(-2)=2.

  3. 3. Solve for the intercept

    b=y1−mx1b=y_1-mx_1b=5−2(1)=3b=5-2(1)=3

    Therefore y=2x+3y=2x+3, and the vertical-axis intercept is (0,3)(0,3). Point-slope form gives the same result: y−5=2(x−1)y-5=2(x-1).

  4. 4. Check both original points

    2(1)+3=52(1)+3=52(3)+3=92(3)+3=9

    Both substitutions return the given vertical coordinates. That confirms the equation independently of how the graph looks.

Slope two, vertical-axis intercept threeEqual scale on both axes. The line y equals two x plus three passes through the round point at one, five and the square point at three, nine. The dashed triangle moves two units right, then four up. The diamond marks zero, three. The cross marks negative one and a half, zero. Arrowheads indicate that the line continues beyond this window.
−3-3
−2-2
−1-1
11
22
33
44
55
00
22
44
66
88
1010
xx
yy
y=2x+3y=2x+3
Round point
P=(1,5)P=(1,5)
Square point
Q=(3,9)Q=(3,9)
Dashed step
Δx=2\Delta x=2, then Δy=4\Delta y=4.
Diamond: vertical-axis crossing
(0,3)(0,3)
Cross: horizontal-axis crossing
(−32,0)\left(-\frac{3}{2},0\right)
Each grid interval is one unit; horizontal and vertical units have equal visual size. The triangle shows m=4/2=2m=4/2=2. The arrowheads show continuation, not endpoints of the mathematical line.

Find the other intercept

The horizontal-axis intercept occurs where y=0y=0. Substitute zero for the output, then solve for the input. For a nonhorizontal line, the general expression is x=−b/mx=-b/m; it requires m≠0m\ne0.

0=2x+3⟹x=−320=2x+3\quad\Longrightarrow\quad x=-\frac{3}{2}

The horizontal-axis intercept is (−32,0)\left(-\frac{3}{2},0\right), not (0,3)(0,3). Writing each crossing as a coordinate pair prevents the two intercepts from being swapped.

Check these exact points in the slope calculator

Example two: a negative fractional slope

Now use (−2,5)(-2,5) and (4,2)(4,2). Moving right increases the horizontal coordinate, while the vertical coordinate decreases. A negative slope is therefore expected before doing any arithmetic.

  1. 1. Keep the negative coordinate in parentheses

    m=2−54−(−2)=−36=−12m=\frac{2-5}{4-(-2)}=\frac{-3}{6}=-\frac12

    The run is 66, not 22: subtracting a negative coordinate increases the difference. Preserve the fraction rather than rounding during the next step.

  2. 2. Calculate the intercept

    b=5−(−12)(−2)=4b=5-\left(-\frac12\right)(-2)=4y=−12x+4y=-\frac12x+4

    The line crosses the vertical axis at (0,4)(0,4). Starting there, moving two units right and one down reaches another point on the line.

  3. 3. Verify both points

    −12(−2)+4=5-\frac12(-2)+4=5−12(4)+4=2-\frac12(4)+4=2

    Setting y=0y=0 gives x=8x=8, so the horizontal-axis intercept is (8,0)(8,0). A negative slope does not require a negative intercept.

Load the negative-slope example

Example three: rearrange standard form

For Ax+By=CAx+By=C with B≠0B\ne0, isolate yy before reading the slope. The coefficient of xx in the original standard form is not generally the slope.

y=−ABx+CBy=-\frac{A}{B}x+\frac{C}{B}
  1. 1. Start with the equation

    3x+2y=123x+2y=12
  2. 2. Subtract the horizontal term

    2y=−3x+122y=-3x+12
  3. 3. Divide every term by the vertical coefficient

    y=−32x+6y=-\frac32x+6

The slope is −32-\frac32, the vertical-axis intercept is (0,6)(0,6), and the horizontal-axis intercept is (4,0)(4,0). Check the crossings in the original equation: 3(0)+2(6)=123(0)+2(6)=12 and 3(4)+2(0)=123(4)+2(0)=12.

If B=0B=0 and A≠0A\ne0, the equation instead gives the vertical line x=C/Ax=C/A. If A=B=0A=B=0, it does not specify a unique line: C=0C=0 allows every point, while C≠0C\ne0 allows no point.

See OpenStax: Find the Equation of a Line for the method. The Linear Equation Solver can check a single-variable intercept calculation.

How to graph a line from slope and intercept

  1. 1. Label axes and scale

    Choose a readable interval for each axis. Equal coordinate units should occupy equal lengths if the visual angle is to represent the numerical slope. With different axis scales, calculate from coordinates rather than judging steepness by eye.

  2. 2. Mark the intercept

    For y=2x+3y=2x+3, plot (0,3)(0,3). The intercept is on the vertical axis because its horizontal coordinate is zero. A negative intercept goes below the origin, not to its left.

  3. 3. Use rise and run

    Rewrite the slope as m=2/1m=2/1. Move one unit right and two up to (1,5)(1,5); repeat to reach (2,7)(2,7). You can also move one left and two down. For negative slope, a rightward step goes down.

  4. 4. Draw and check

    Connect the points with a straight line and extend it in both directions unless a stated domain restricts it. Check another point by substitution. Two marked points do not turn an unrestricted line into a finite segment.

Use square graph paper for a hand sketch. The Letter graph paper guide explains accurate printing; assign a mathematical value to each grid interval before plotting.

Equal-unit graph of y equals two x plus three, with points at one, five and three, nine, a two-unit run and four-unit rise, and a vertical-axis crossing at three.
The same y=2x+3y=2x+3 line on equal axis scales: the dashed step moves two units right and four up, so m=2m=2. The diamond marks (0,3)(0,3); arrows show continuation.

Horizontal, vertical and identical-point cases

Horizontal: zero slope

m=4−43−(−2)=0m=\frac{4-4}{3-(-2)}=0

The distinct points (−2,4)(-2,4) and (3,4)(3,4) define y=4y=4. The output never changes. There is a vertical-axis intercept at (0,4)(0,4) and no horizontal-axis crossing.

Check horizontal points

Vertical: undefined slope

Δx=2−2=0\Delta x=2-2=0

The distinct points (2,−1)(2,-1) and (2,5)(2,5) define x=2x=2. The run is zero and the rise is nonzero. Its slope is undefined, not zero or an ordinary real number called infinity. It crosses the horizontal axis at (2,0)(2,0).

Check vertical points

Identical: no unique line

Δx=0,Δy=0\Delta x=0,\quad\Delta y=0

Entering (2,5)(2,5) twice supplies only one location. The expression 0/00/0 does not choose a direction. Infinitely many lines pass through that point, so another distinct point or an independent slope is needed.

Check identical points

Axis-overlap cases deserve special care: y=0y=0 is the horizontal axis itself and has infinitely many horizontal-axis intersections. Similarly, x=0x=0 is the vertical axis and has infinitely many vertical-axis intersections. A vertical line away from that axis has no vertical-axis intercept.

Parallel and perpendicular lines

Distinct nonvertical parallel lines have equal slopes but different intercepts. Two nonvertical perpendicular lines satisfy m1m2=−1m_1m_2=-1. The negative-reciprocal rule requires a nonzero starting slope; a horizontal line is perpendicular to a vertical line instead.

For example, y=2x+3y=2x+3 and y=2x−1y=2x-1 are parallel. A line with slope −12-\frac12 is perpendicular to them. Equal slopes and equal intercepts describe the same line, not two distinct parallel lines.

Read slope with units and a meaningful domain

A constant-rate tank example

Suppose a tank starts with 12 L12\,\mathrm{L} of water and fills at 3 L/min3\,\mathrm{L/min}, with no outflow. Let tt be elapsed time in minutes and VV the volume in litres. Until the tank reaches its 72 L72\,\mathrm{L} capacity, the model is:

V(t)=3t+12,0≤t≤20V(t)=3t+12,\qquad 0\le t\le20

The slope is 3 L/min3\,\mathrm{L/min} and the initial volume is 12 L12\,\mathrm{L}. After four minutes, V(4)=3(4)+12=24V(4)=3(4)+12=24, meaning 24 L24\,\mathrm{L}. The tank reaches capacity at t=(72−12)/3=20t=(72-12)/3=20 minutes. Continuing this formula afterward would ignore the capacity assumption.

The algebraic horizontal-axis crossing is t=−4t=-4, outside the model's elapsed-time domain. An intercept can be mathematically valid without representing an observed event. Likewise, real data need not follow a constant-rate line just because two observations determine one.

Slope, midpoint and distance answer different questions

For P=(1,5)P=(1,5) and Q=(3,9)Q=(3,9), the slope is m=2m=2. Their midpoint is M=(2,7)M=(2,7), while their segment length is d=22+42=25d=\sqrt{2^2+4^2}=2\sqrt5 when both axes use compatible equal-length units. Rate, location and length are different quantities.

Use the Midpoint Calculator or Distance Formula Calculator for those quantities. The Math Formulas library connects these coordinate methods.

Check your understanding

Try each problem before opening the answer. Name the slope, give the intercept as a point, and check a substitution.

Find the line through (0,−2)(0,-2) and (4,6)(4,6).
m=6−(−2)4−0=2m=\frac{6-(-2)}{4-0}=2y=2x−2y=2x-2

The vertical-axis intercept is (0,−2)(0,-2) and the horizontal-axis intercept is (1,0)(1,0). Check the second point: 2(4)−2=62(4)-2=6.

A line has slope −34-\frac34 and passes through (4,1)(4,1). Find its intercept.
b=1−(−34)(4)=4b=1-\left(-\frac34\right)(4)=4y=−34x+4y=-\frac34x+4

The vertical-axis intercept is (0,4)(0,4). Substitution gives −34(4)+4=1-\frac34(4)+4=1, which checks the supplied point.

Before accepting an answer: check point order, put negative coordinates in parentheses, isolate yy before reading coefficients, distinguish (0,b)(0,b) from (b,0)(b,0), and test for zero run before dividing. Keep exact fractions until the final display.

FAQ

Frequently Asked Questions

What is the difference between slope and the intercept?
Slope measures how much the vertical coordinate changes for each unit increase in the horizontal coordinate. The vertical-axis intercept fixes the line's position. In y=2x+3y=2x+3, the slope is m=2m=2 and the intercept value is b=3b=3, giving the point (0,3)(0,3). Changing the intercept translates this line vertically without changing its slope.
How do I find the intercept when I only know two points?
First check that the points have different horizontal coordinates. Calculate m=(y2−y1)/(x2−x1)m=(y_2-y_1)/(x_2-x_1), keeping the point order consistent, then substitute either point into b=y1−mx1b=y_1-mx_1. Check your resulting equation with the other point. If the points share a horizontal coordinate but are distinct, their line is vertical and this finite-slope calculation does not apply.
Can the slope and intercept both be negative?
Yes. In y=−2x−3y=-2x-3, the slope is m=−2m=-2 and the vertical-axis intercept is (0,−3)(0,-3). The line falls as you move right, and it crosses the vertical axis below the origin. These signs describe separate properties. A negative slope can also have a positive intercept, as the worked fractional example in this guide demonstrates.
Is an undefined slope the same as zero slope?
No. A horizontal line has zero vertical change and nonzero horizontal change, so its slope is m=0m=0. A vertical line has zero horizontal change between distinct points, so division by zero prevents a finite slope. Write a horizontal line as y=by=b and a vertical line as x=cx=c. Calling a vertical slope zero would describe a different direction.
Do identical points determine a vertical line?
No. Repeating the same point gives both Δx=0\Delta x=0 and Δy=0\Delta y=0. The quotient 0/00/0 does not identify a slope, and infinitely many lines pass through that one point. A vertical line is only one possibility. Supply a second distinct point or an independent direction before trying to calculate a unique line equation.
Does every line have exactly one intercept on each axis?
No. A nonvertical line always has one vertical-axis intercept, but a horizontal line such as y=4y=4 has no horizontal-axis intercept. The line y=0y=0 coincides with the horizontal axis, so every point on it is an intersection. Similarly, x=2x=2 has no vertical-axis intercept, while x=0x=0 coincides with the entire vertical axis.
Is slope the same as an angle or a percentage?
Slope is a ratio, not an angle. With the same physical units and equal axis scales, a slope angle satisfies m=tan⁡θm=\tan\theta; for example, m=1m=1 corresponds to θ=45∘\theta=45^\circ. A signed percent grade is 100m%100m\% under compatible length units. A graph with differently scaled axes can look steeper without changing its numerical rate of change.
How can I check a line equation without relying on its graph?
Substitute both original coordinate pairs into the final equation and check equality exactly. For y=2x+3y=2x+3, the points (1,5)(1,5) and (3,9)(3,9) give 5=2(1)+35=2(1)+3 and 9=2(3)+39=2(3)+3. This catches arithmetic or sign mistakes that a rough sketch might hide. Keep fractions exact until the final display instead of rounding the slope before finding the intercept.

Sources and calculation checks

The definitions and line-equation methods are supported by these primary textbook references. The numerical examples and graph were checked with exact fractions, substitution into the original equations, and equal coordinate scaling.

Editorial Transparency

Who maintains this page

Ownership and review

Written and maintained by the Toolarithm editorial team. The method was last reviewed on . No independent professional review is claimed.

Methodology

The editorial team checks definitions, examples, linked tools, and cited references. Dates shown here come from the page's maintained publication record.

Read the editorial methodology

Dates and sources

Published . Updated .