Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Slope-Intercept Equation
y = 2x + -1
y-intercept b = -1
Slope (m) 2
Point used (3, 5)
y-intercept (b) -1

What this calculator does

This tool writes a straight line in slope-intercept form, \(y = mx + b\), when you already know the slope (\(m\)) and the coordinates of one point on the line (\(x_1, y_1\)). The slope tells you how steep the line is, and the point pins it to a specific location, so together they uniquely determine the line and its y-intercept \(b\).

How to use it

Enter the slope \(m\), then the x and y coordinates of any point that lies on the line. The calculator solves for the y-intercept \(b\) and assembles the complete equation \(y = mx + b\). You can use decimals or negative numbers for any field.

The formula explained

Every point on the line satisfies \(y = mx + b\). Substituting your known point gives \(y_1 = m \cdot x_1 + b\). Rearranging for the unknown intercept yields $$b = y_1 - m \cdot x_1$$ Once \(b\) is known, the slope-intercept equation is simply $$y = mx + b$$

Advertisement
Coordinate plane showing a line through a given point with y-intercept b and slope m
The known point and slope fix the line; the y-intercept \(b\) is where the line crosses the vertical axis.

Worked example

Suppose \(m = 2\) and the line passes through \((3, 5)\). Then $$b = 5 - 2 \times 3 = 5 - 6 = -1$$ The equation is \(y = 2x - 1\). You can verify it: at \(x = 3\), \(y = 2(3) - 1 = 5\), which matches the point.

Right triangle under a line showing rise and run that define slope
Slope \(m\) equals rise over run between two points on the line.

FAQ

What if the slope is zero? A slope of 0 gives a horizontal line \(y = b\), where \(b\) equals \(y_1\).

Can I use this for a vertical line? No. Vertical lines have an undefined slope and cannot be written as \(y = mx + b\); they take the form \(x = \text{constant}\).

Does the point need to be the y-intercept? No. Any point on the line works — the calculator computes the intercept for you.

Last updated: