Uni-Sine
MathematicsGraphs

Linear graph calculator

A linear graph calculator plots a straight line from its equation, y = mx + b (y = mx + c in the UK), where m is the slope (gradient) and b is the y-intercept. Our Linear Graph calculator draws the line, shows where it crosses each axis, and lets you change the slope and intercept to see what each one does.

It opens on y = x + 2. Type a new slope and intercept in the two boxes and the line moves as you type.

Try it

Linear Graph

Plot and analyse linear functions

Go to its page

How to use the linear graph calculator

  1. Under Equation, type the slope in the first box and the y-intercept in the second. The calculator writes the equation as y = ax + b, so the first box is a (the slope, m) and the second is b. The preview shows the equation.
  2. Read the Intercepts table, which gives the two points where the line meets the axes.
  3. Under Analysis, turn on the derivative, the area under the line or the min and max, as you need them.
  4. Drag and zoom the graph to read off points.

Practice and help sets questions on straight-line graphs: the slope, the intercepts, increasing or decreasing, f(k), a perpendicular slope, and areas under the line.

The equation of a straight line

y = mx + b
PartMeaningOn the graph
mThe slope, or gradientHow far y rises for each 1 across; negative means the line falls
bThe y-interceptWhere the line crosses the y-axis, at (0, b)
x-interceptWhere y = 0At x = −b/m

A bigger m makes a steeper line. Lines with the same slope are parallel. Two lines are perpendicular when their slopes multiply to −1, so a line perpendicular to slope 2 has slope −½. Our graphing linear equations guide covers plotting by hand.

Worked examples you can check in the calculator

Example 1: intercepts

Plot y = 2x − 4. The y-intercept is (0, −4). For the x-intercept, set y = 0: 0 = 2x − 4, so x = 2, giving (2, 0). Type 2 and −4 in the boxes and the intercepts table shows both points.

Example 2: a falling line

For y = −0.5x + 3, the slope is negative, so the line falls from left to right: every 2 across, it drops 1. Its y-intercept is 3, and setting y = 0 gives 0.5x = 3, so the x-intercept is (6, 0).

Example 3: the equation from two points

A line passes through (1, 5) and (3, 9). The slope is the rise over the run:

m = \frac{9 - 5}{3 - 1} = 2 \qquad 5 = 2 \times 1 + b \Rightarrow b = 3

So y = 2x + 3. The calculator does not take two points, so work the equation out first, then type 2 and 3 and check the line passes through both. Our slope calculator guide finds the slope and equation from two points directly.

Practise reading the slope in the course, then press Mark:

Compute the slope through two plotted points, typed as a fraction or decimal.

Press Mark to have your answer marked in the Graphing Functions course.

Example 4: a perpendicular line

Find the line perpendicular to y = 2x + 3 through (4, 1). Its slope is −1 ÷ 2 = −½, and 1 = −½ × 4 + b gives b = 3. So y = −0.5x + 3, the line from Example 2. Plot both: they cross at right angles, at (0, 3).

What the calculator does not do

  • One line at a time. To find where two lines meet, solve them as simultaneous equations.
  • Slope-intercept form only. For ax + by = c, rearrange to y = mx + b first: 2x + 3y = 6 becomes y = −⅔x + 2.
  • No equation from points. Work out m and b from the points first, as in Example 3.

Common mistakes

  • Swapping rise and run. Slope is change in y over change in x, not the other way round.
  • Reading the x-intercept as b. b is where the line crosses the y-axis.
  • Getting the sign of the slope wrong. A line falling from left to right has a negative slope.
  • Forgetting to rearrange. In 2y = 4x + 6, the slope is 2, not 4: divide by 2 first.

Practise straight-line graphs in a short timed paper

Straight-line graphs come up in Geometry, Algebra 2 & SAT Math practice, and in GCSE Maths Higher in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. The Graphing Functions course has a slope and intercept explorer.

Common questions

How do you graph a linear equation?
Write it as y = mx + b. Plot the y-intercept (0, b), then use the slope to step to a second point: across 1, up m. Draw the line through them.
What does m mean in y = mx + b?
The slope: how much y changes for each 1 that x increases. A positive m rises, a negative m falls.
How do you find the x-intercept?
Set y = 0 and solve for x, which gives x = −b/m.
What is the slope of a perpendicular line?
The negative reciprocal: −1/m. For slope 2 it is −½.
Is y = mx + c the same as y = mx + b?
Yes. The UK writes c for the intercept and the US writes b.
Can the calculator find the equation from two points?
No. Find the slope with (y₂ − y₁) ÷ (x₂ − x₁), then the intercept, and type them in to check.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Linear Graph

    Plot and analyse linear functions

    Open the tool
  • Learn it

    Graphing Functions

    Graphing made easier: the patterns in numbers and functions used across STEM

    Start the course
  • Test it

    Geometry, Algebra 2 & SAT Math

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · GraphsGraphing linear equations: slope, intercepts and examplesHow to graph linear equations three ways: from slope and y-intercept, from a table of values and from the intercepts, with worked examples and live graphs.