How to Write a Line in Slope-Intercept Form (y = mx + b) from Any Starting Point
Find y = mx + b from two points, a point and slope, or standard form; convert between forms and get parallel and perpendicular lines, with worked examples.
%20from%20Any%20Starting%20Point&c=%234338ca&k=education)
How to Write a Line in Slope-Intercept Form (y = mx + b) from Any Starting Point
Straight lines appear everywhere in school algebra, and most questions about them come down to one equation: y = mx + b. Once you can produce it from whatever information a question gives, the rest (graphs, intercepts, parallel lines) follows quickly. This guide walks through each starting point and shows how to check your answer with the slope-intercept form calculator, which keeps fractions exact and draws the line for you.
What m and b mean
The slope m measures steepness: the change in y when x increases by one. A slope of 2 means the line rises 2 units for every unit to the right; a slope of −1/3 means it falls one unit for every three to the right. The intercept b is where the line crosses the y-axis, the value of y when x is 0. With those two numbers you can sketch the line without a table: mark (0, b), then use the slope to step to a second point.
Starting from two points
This is the most common exam question. For the points (1, 2) and (4, 8):
- Slope: m = (y₂ − y₁) ÷ (x₂ − x₁) = (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2.
- Substitute one point into y = mx + b: 2 = 2 × 1 + b.
- Solve: b = 0.
- Write the line: y = 2x.
- Check with the other point: 2 × 4 + 0 = 8. Correct.
Keep the subtraction in the same order for the top and the bottom of the slope fraction. Swapping the order in only one of them flips the sign, which is the classic mistake. If both points have the same x-value, the run is zero and the slope is undefined: the line is vertical and is written x = constant. It has no slope-intercept form at all.
Starting from a point and a slope
Point-slope form is made for this case: y − y₁ = m(x − x₁). With slope −2 through (3, 1) you get y − 1 = −2(x − 3). Expand the bracket, y − 1 = −2x + 6, and add 1 to both sides: y = −2x + 7. A quicker route is b = y₁ − m × x₁ = 1 − (−6) = 7.
Starting from standard form
Standard form is Ax + By = C with whole numbers. For 3x − 2y = 6, subtract 3x from both sides to get −2y = −3x + 6, then divide every term by −2: y = (3/2)x − 3. In general m = −A ÷ B and b = C ÷ B. If B is 0, as in 2x = 8, the line is vertical again: x = 4.
Going the other way, from y = −(2/3)x + 5/3 to standard form, multiply through by the common denominator 3 to clear fractions and collect terms: 2x + 3y = 5. Textbooks usually want A positive and the three numbers with no common factor, which is how the calculator writes it.
Fractions are normal
Real questions rarely give whole-number slopes. Through (−2, 3) and (4, −1) the slope is (−1 − 3) ÷ (4 − (−2)) = −4 ÷ 6 = −2/3, and b = 3 − (−2/3)(−2) = 3 − 4/3 = 5/3. Rounding to −0.67 and 1.67 makes the check fail by a little, so keep fractions until the end. The calculator accepts inputs such as −3/4, 1 1/2 or 0.25 and works exactly throughout.
Intercepts, angle, parallel and perpendicular
The x-intercept is where y = 0, so x = −b ÷ m; for y = −(2/3)x + 5/3 it is 5/2. The angle with the x-axis is the inverse tangent of the slope. Parallel lines share a slope, and perpendicular lines have slopes whose product is −1. To find the perpendicular to y = 2x through (0, 5), use slope −1/2 and b = 5, giving y = −(1/2)x + 5. Tick the parallel and perpendicular option in the tool, type the extra point, and both new lines are drawn on the same graph.
Using the graph and table
After you calculate, glance at the graph. Does the line pass through the given points? Does it cross the y-axis at b? Is it rising when the slope is positive? These checks catch sign errors faster than re-reading algebra. The table of values for x from −3 to 3 is handy when a question asks you to complete a table before plotting.
Practising
The Practice tab produces questions on each skill: slope from two points, the intercept from a point and slope, the x-intercept, an equation through two points, and conversion from standard form. Answers can be typed as fractions, and every question has a worked solution. Print worksheet gives ten fresh questions with an answer key for homework or a quick class starter.
Limits
The calculator deals with straight lines only. It does not fit a line of best fit through scattered data, and it does not handle curves. A vertical line has no slope-intercept form and is shown as x = a number. Use the steps and graph to understand the method; exams usually expect your own working and your own sketch.


