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$$
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.
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.