All calculators

Education

y = mx + b Calculator

Last updated: May 31, 2026

Written by Blake Boege

A y = mx + b calculator solves linear equations to determine the slope-intercept form of a straight line. By providing either the slope and y-intercept, two distinct coordinates, or one coordinate and the slope, the calculator outputs the slope (m), y-intercept (b), standard equation form, and lets you query coordinates on the line.

Solve linear equations and graph lines using slope-intercept form, two coordinate points, or point-slope values.

Quick Answer

Find the linear equation y = mx + b for any straight line. Enter a slope and intercept, two coordinate points, or a point and slope.

e.g. 2

e.g. 1

Line Equation

Slope-Intercept Equation

y = 2x + 1

Slope (m) = 2, Y-Intercept (b) = 1

Slope (m)2
Y-Intercept (b)1
X-Intercept-0.5
Standard Form-2x + y = 1

Query Points on this Line

Enter an X coordinate to calculate its corresponding Y, or vice-versa.

e.g. 5

e.g. 10

Resulting point: (5, 11)

Line Coordinate Table

xy
-3-5
-2-3
-1-1
01
13
25
37

Step-by-Step Solution

Step 1:Use the slope-intercept form equation: y = mx + b
Step 2:Substitute m = 2 and b = 1:
Step 3:Equation: y = 2x + 1
Step 4:Find the x-intercept by setting y = 0: 0 = 2x + 1 ⇒ x = -b/m = -0.5
Was this helpful?

Examples

Two Points: (1, 3) and (4, 9)

y = 2x + 1 (m=2, b=1)

Point-Slope: P(2, 5), m=-3

y = -3x + 11 (m=-3, b=11)

Slope-Intercept: m=2, b=1

y = 2x + 1 (x-int = -0.5)

How it works

The Geometry of Linear Equations

Any non-vertical straight line in a 2D Cartesian coordinate plane can be uniquely described by its steepness (slope) and its crossing point on the vertical axis (y-intercept). This leads to the standard formula:

The Slope-Intercept Equation

y = mx + b

To fit a line to multiple messy data points, visit our linear regression calculator or use our trigonometry solvers like the Law of Sines calculator to analyze geometric shapes and angles.

Finding Intercepts

The y-intercept occurs where x = 0, giving the point (0, b). The x-intercept occurs where y = 0, giving the point (-b/m, 0) (for non-horizontal lines where m ≠ 0). These two points are the easiest coordinates to locate when graphing the line manually on graph paper.

Related Calculators

More tools from Education

Frequently asked questions

This is the slope-intercept form of a linear equation, where 'm' is the slope of the line (representing its steepness) and 'b' is the y-intercept (the point where the line crosses the y-axis, located at (0, b)).

The slope (m) is calculated as the change in y divided by the change in x: m = (y₂ − y₁) / (x₂ − x₁). This is often called the 'rise over run'.

If the slope m = 0, the line is perfectly flat or horizontal. Its equation is simplified to y = b, meaning y has the same value for every x coordinate.

For a vertical line, all points on the line share the same x-value (x₁ = x₂). Because the denominator in the slope formula (x₂ − x₁) becomes zero, the slope is undefined. The equation of a vertical line is written as x = c, where c is the x-intercept.