Student Calculator

Linear Equation Plotter (y = mx + b)

Enter a slope and an intercept to draw the straight line y = mx + b, and see how each number changes the graph.

Maintained by Kumara Samigari LokeshMethod: y = mx + b plotted from x = −10 to 10Methods and limitations

What this tool does

Enter a slope m and a y-intercept b, then plot. The tool draws the line y = mx + b for x from −10 to 10. It is a quick way to see the shape of a linear equation or check homework.

Slope-intercept form

y = mx + b

m (slope) is how much y changes when x increases by 1. Positive slopes rise to the right, negative slopes fall, and a slope of 0 is a flat line.

b (intercept) is where the line crosses the y-axis, the value of y when x = 0.

Worked example

For y = 2x + 5 (the default values):

  • At x = 0, y = 5, so the line crosses the y-axis at 5.
  • At x = 5, y = 15; at x = −5, y = −5.
  • It crosses the x-axis where 2x + 5 = 0, at x = −2.5.

Getting an equation into this form

Many equations need rearranging first. For 2x + 3y = 12: subtract 2x from both sides (3y = −2x + 12), then divide by 3 (y = −0.667x + 4). Enter m = −0.667 and b = 4. To find the slope from two points (x1, y1) and (x2, y2), use m = (y2 − y1) ÷ (x2 − x1), then b = y1 − m × x1.

Things to try

  • Keep b fixed and change m: the line rotates around the y-intercept.
  • Keep m fixed and change b: the line slides up and down, staying parallel.
  • Lines with the same slope are parallel; slopes whose product is −1 are perpendicular.

Limitations

The plotter draws straight lines only. Vertical lines such as x = 3 cannot be written as y = mx + b, so they cannot be plotted here. For quadratics, use the quadratic solver to find roots and the vertex. The graph needs the chart library to load from a public CDN.

FAQs

What is slope-intercept form?

Writing a straight line as y = mx + b, where m is the slope and b the y-intercept.

How do I find the x-intercept?

Set y = 0 and solve: x = −b ÷ m.

Can it plot curves?

No. It plots straight lines only.

Why can’t I plot x = 3?

A vertical line has an undefined slope and cannot be written as y = mx + b.

What range of x is shown?

From −10 to 10.