Slope Intercept Form Calculator

Find the equation of a line in slope-intercept form y = mx + b from two points, a point and a slope, or standard form. Get the slope, both intercepts, point-slope and standard forms, and a graph — and compare two lines to solve a linear system.

Line

How the Slope Intercept Form Calculator works

  1. Enter. Point 1: (1, 2) · Point 2: (3, 5)
  2. Graph. The tool samples the function in your browser and draws it without connecting across breaks.
  3. Read the result. Slope m = 3/2; y = 3/2 x + 1/2; x-intercept (−1/3, 0); standard form 3x − 2y = −1.
Line through (1, 2) and (3, 5) with the rise of 3 and run of 2 drawn and the y-intercept 1/2 marked.
Example: what you enter, the graph the slope intercept form calculator draws, and the results it reports.

Examples to load

Slope and the equation of a line

m = (y₂ − y₁) ⁄ (x₂ − x₁)    y = mx + b    y − y₁ = m(x − x₁)    Ax + By = C

All four describe the same straight line. Slope-intercept form is best for graphing: start at (0, b) and use the slope as rise over run. Point-slope form is quickest when you know any point and the slope. Standard form uses integers and makes intercepts easy: set y = 0 to get the x-intercept C ⁄ A and x = 0 to get the y-intercept C ⁄ B.

Worked example: the line through (1, 2) and (3, 5)

  1. Slope: m = (5 − 2) ⁄ (3 − 1) = 3 ⁄ 2. The rise is 3 and the run is 2 — the dashed triangle on the graph.
  2. Intercept: substitute (1, 2): 2 = (3⁄2)(1) + b, so b = 1⁄2.
  3. Equation: y = (3⁄2)x + 1⁄2. Multiply by 2 and rearrange for standard form: 3x − 2y = −1.
  4. x-intercept: set y = 0: (3⁄2)x = −1⁄2, so x = −1⁄3.

Check: (3, 5) gives (3⁄2)(3) + 1⁄2 = 5 ✓.

Common mistakes

  • Mixing the order of the points. Subtract in the same order on top and bottom: (y₂ − y₁) with (x₂ − x₁).
  • Reading b as the x-intercept. b is where the line meets the y-axis.
  • Forcing a vertical line into y = mx + b. x = 2 has no slope and no y-intercept.

Read more: slope-intercept form, point-slope form, how to find slope and solving systems by graphing.

Questions

What is slope-intercept form?

It is y = mx + b, where m is the slope (rise over run) and b is the y-intercept — the y-value where the line crosses the y-axis.

How do I find the equation of a line from two points?

Find the slope m = (y₂ − y₁) ⁄ (x₂ − x₁), then substitute one point into y = mx + b to solve for b. The calculator does both and shows the rise and run on the graph.

What if the line is vertical?

A vertical line has an undefined slope and cannot be written as y = mx + b. Its equation is x = c. The calculator graphs it and reports this instead of an incorrect formula.

How do I tell if two lines are parallel or perpendicular?

Tick “Compare with a second line”. Parallel lines have equal slopes (and no solution as a system); perpendicular lines have slopes whose product is −1.

Guides that use this calculator

Related calculators

Graphing Calculator

Plot several functions, points and inequalities; find roots, intersections and turning points.