Write any line as y = mx + b. Start from two points, a point and a slope, or an equation in standard form, and get the slope and y-intercept as exact fractions, the x-intercept, every other form of the equation, the working and a mini graph.
Last updated:
What do you know?
Line details
A number or fraction like 3/4 or -2. Type "undefined" for a vertical line.
For 2x + 3y = 12 enter A = 2, B = 3, C = 12. For 2x − 3y = 12 use B = −3.
Enter your values to see the result.
Advertisement
Advertisement
How to use the Slope Intercept Form Calculator
Choose what you know: two points, a point and the slope, or a standard-form equation.
Enter the numbers. Fractions such as 3/4 and negatives such as -2 are fine.
Press Calculate equation to get y = mx + b with exact fractions.
Follow the steps to see how the slope and the intercept were found.
Use the graph and the table of values to check your answer or plot the line on paper.
The three routes to y = mx + b
You know
Find m
Find b
Example
Two points (x₁, y₁), (x₂, y₂)
m = (y₂ − y₁) ÷ (x₂ − x₁)
b = y₁ − m·x₁
(1, 2), (4, 7) → y = (5/3)x + 1/3
A point and the slope
given
b = y₁ − m·x₁
(2, −1), m = 3/4 → y = (3/4)x − 5/2
Standard form Ax + By = C
m = −A ÷ B
b = C ÷ B
2x + 3y = 12 → y = −(2/3)x + 4
Slope and y-intercept
given
given
m = −2, b = 5 → y = −2x + 5
Reading a line from its equation
Slope-intercept form is popular because you can graph it without any calculation:
Plot the y-intercept (0, b) on the y-axis.
From that point, move 1 unit right and m units up (or down if m is negative). For a fractional slope such as 2/3, move 3 right and 2 up.
Draw the line through the two points.
m > 0: the line rises from left to right. m < 0: it falls. m = 0: horizontal line y = b.
The larger |m| is, the steeper the line. A slope of 1 makes a 45° angle with the x-axis.
Parallel lines have the same m and different b. Perpendicular lines have slopes that multiply to −1, such as 2 and −1/2.
The x-intercept is where y = 0: x = −b ÷ m.
Worked example: from a word problem
A phone plan charges a $15 monthly fee plus $0.10 per text. The cost y for x texts is y = 0.10x + 15: the slope 0.10 is the rate per text and the y-intercept 15 is the fixed cost when x = 0. If you only knew that 100 texts cost $25 and 300 texts cost $45, the two-point method gives m = (45 − 25) ÷ (300 − 100) = 0.10 and b = 25 − 0.10 × 100 = 15, the same equation.
Frequently asked questions
What is slope-intercept form?
It is the equation of a line written as y = mx + b, where m is the slope (rise over run) and b is the y-intercept, the y-value where the line crosses the y-axis at the point (0, b).
How do I find slope-intercept form from two points?
Find the slope m = (y₂ − y₁) ÷ (x₂ − x₁), then substitute one point into b = y − mx. For (1, 2) and (4, 7): m = 5/3 and b = 2 − 5/3 = 1/3, so y = (5/3)x + 1/3.
How do I convert standard form Ax + By = C to y = mx + b?
Subtract Ax from both sides and divide everything by B: y = (−A/B)x + C/B. For 2x + 3y = 12, y = −(2/3)x + 4, so the slope is −2/3 and the y-intercept is 4.
How do I go from point-slope form to slope-intercept form?
Start with y − y₁ = m(x − x₁), distribute m and add y₁ to both sides. With the point (2, −1) and slope 3/4: y + 1 = (3/4)(x − 2) gives y = (3/4)x − 5/2.
Can every line be written in slope-intercept form?
Every line except a vertical one. A vertical line such as x = 3 has an undefined slope and never crosses the y-axis at a single point, so it has no y = mx + b form. Horizontal lines work: y = 0x + 4 is simply y = 4.
Why does the calculator show fractions instead of decimals?
Fractions are exact. A slope of 5/3 is 1.6666…, and rounding it to 1.67 makes the line pass slightly off your points. The decimal form is shown underneath for convenience.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.