Education
y = mx + b Calculator
Last updated: June 19, 2026
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
Slope-Intercept Equation
y = 2x + 1
Slope (m) = 2, Y-Intercept (b) = 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
| x | y |
|---|---|
| -3 | -5 |
| -2 | -3 |
| -1 | -1 |
| 0 | 1 |
| 1 | 3 |
| 2 | 5 |
| 3 | 7 |
Step-by-Step Solution
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
- Slope Calculator to find the rise, run, and steepness between two coordinates.
- Slope Intercept Form Calculator to build the y = mx + b equation step-by-step.
- Point Slope Form Calculator to write equations of lines using a single point and a slope.
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.
Related calculators
Education
Slope Calculator
Find the slope of the line through two points using m = (y₂ − y₁) / (x₂ − x₁). Handles positive, negative, zero, and undefined (vertical) slopes.
Education
Slope Intercept Form Calculator
Build the slope-intercept equation y = mx + b from two points, a slope and one point, or a standard-form equation Ax + By = C. Returns the slope, y-intercept, and step notes.
Education
Point Slope Form Calculator
Build the point-slope equation y − y₁ = m(x − x₁) from a slope and a point, or from two points. Also converts to slope-intercept form as a secondary output.