Slope Intercept Form Solver
Find the slope intercept form (y = mx + b) of any linear equation. Enter two points, a point and slope, or a standard form equation. Get step-by-step solutions with an interactive graph showing your line.
Solve for y = mx + b
Enter two points to find the slope intercept form equation.
Enter a point and the slope to find the slope intercept form equation.
Enter the coefficients of the standard form equation Ax + By = C.
Solution
What Is Slope Intercept Form
Slope intercept form is the equation y = mx + b, where m represents the slope of a straight line and b represents the y-intercept. This form is one of the most widely used representations of a linear equation because it immediately reveals two critical pieces of information about the line: how steep it is and where it crosses the vertical axis.
The variable m, the slope, describes the rate of change. For every one-unit increase in x, the value of y changes by m units. When m is positive, the line rises from left to right. When m is negative, the line falls from left to right. When m equals zero, the line is perfectly horizontal. The magnitude of m determines the steepness. A slope of 5 produces a much steeper line than a slope of 0.5.
The variable b, the y-intercept, is the value of y when x equals zero. Geometrically, this is the exact point where the line crosses the y-axis. If b is positive, the line crosses above the origin. If b is negative, it crosses below. If b is zero, the line passes through the origin and the equation simplifies to y = mx.
Slope intercept form is preferred in many educational and practical contexts because of its directness. Given y = 3x + 2, you immediately know the line rises 3 units for every 1 unit of horizontal movement and crosses the y-axis at the point (0, 2). No rearranging is necessary. No substitution is required. The essential characteristics of the line are visible at a glance.
Deriving Slope Intercept Form from Two Points
The most common scenario in algebra courses is finding the equation of a line when given two points. The process requires two steps: calculate the slope, then determine the y-intercept.
Step 1: Calculate the Slope
The slope formula is m = (y2 - y1) / (x2 - x1). This formula measures the vertical change (rise) divided by the horizontal change (run) between two points. The order of the points does not matter as long as you are consistent, subtracting the same point's coordinates in both the numerator and denominator.
This gives you the "rise over run" between any two points on the line.
Step 2: Solve for b
Once you have the slope m, substitute it along with one of your points into y = mx + b and solve for b. For example, if m = 2 and one of your points is (3, 7), the substitution gives 7 = 2(3) + b, which simplifies to 7 = 6 + b, and therefore b = 1. The final equation is y = 2x + 1.
Worked Example
Given the points (1, 4) and (5, 12), the slope is m = (12 - 4) / (5 - 1) = 8 / 4 = 2. Substituting point (1, 4) into y = 2x + b gives 4 = 2(1) + b, so b = 2. The equation is y = 2x + 2. You can verify by substituting the second point: 12 = 2(5) + 2 = 12. Both points satisfy the equation, confirming the answer is correct.
The Point and Slope Method
When you already know the slope and one point on the line, finding slope intercept form is even more straightforward. This situation arises frequently in problems involving parallel and perpendicular lines, where the slope is determined by a relationship to another line.
The point-slope form of a linear equation is y - y1 = m(x - x1), where (x1, y1) is the known point and m is the known slope. To convert this to slope intercept form, distribute m on the right side and then add y1 to both sides.
For example, with slope m = -3 and point (2, 5), point-slope form gives y - 5 = -3(x - 2). Distributing: y - 5 = -3x + 6. Adding 5: y = -3x + 11. The slope intercept form is y = -3x + 11, with a slope of -3 and a y-intercept of 11.
This method is computationally efficient because it requires only one substitution and basic algebra. There is no intermediate slope calculation step since the slope is already provided.
Converting from Standard Form
Standard form for a linear equation is Ax + By = C, where A, B, and C are constants and, by convention, A is usually positive. Converting to slope intercept form involves isolating y on one side of the equation.
Conversion Process
Starting with Ax + By = C, subtract Ax from both sides to get By = -Ax + C. Then divide both sides by B to get y = (-A/B)x + (C/B). The slope is m = -A/B and the y-intercept is b = C/B.
Ax + By = C becomes y = (-A/B)x + (C/B)
Slope: m = -A/B · Y-Intercept: b = C/B
Worked Example
Convert 3x + 4y = 20 to slope intercept form. Subtract 3x from both sides: 4y = -3x + 20. Divide by 4: y = (-3/4)x + 5. The slope is -3/4 and the y-intercept is 5. The line falls 3 units for every 4 units of horizontal movement and crosses the y-axis at (0, 5).
Why Standard Form Exists
Standard form is useful in contexts where slope intercept form is less convenient. It handles vertical lines (which cannot be expressed in slope intercept form), works well for systems of equations, and is the preferred form in many application contexts like economics and physics where both x and y terms being on the same side is more natural.
Graphing Linear Equations
Slope intercept form makes graphing straightforward because it gives you a starting point and a direction. The y-intercept (0, b) is your first plotted point. The slope m tells you how to find your second point.
Plotting from Slope Intercept Form
Begin at the y-intercept (0, b) and plot that point on your coordinate plane. Then use the slope as "rise over run" to find a second point. If m = 2/3, move up 2 units and right 3 units from the y-intercept to find your second point. If m = -1/4, move down 1 unit and right 4 units. Draw a straight line through both points and extend it in both directions.
Choosing a Good Viewing Window
When graphing by hand or using technology, choosing an appropriate viewing window matters. The window should include both the y-intercept and the x-intercept (if it exists within a reasonable range), plus enough additional space to show the line's behavior clearly. For a line like y = 0.5x + 10, you would want a window that extends well above y = 10 and includes x values large enough to show the gradual rise.
Multiple Lines on One Graph
Comparing lines visually is one of the greatest strengths of slope intercept form. Lines with the same slope but different y-intercepts are parallel. Lines with slopes that multiply to -1 are perpendicular. A family of lines through the origin all have b = 0 but varying slopes. These relationships are immediately apparent when equations are in slope intercept form.
Parallel and Perpendicular Lines
Understanding the relationship between slope and the geometric properties of parallel and perpendicular lines is fundamental to algebra and geometry.
Parallel Lines
Two lines are parallel if and only if they have the same slope and different y-intercepts. If line one has equation y = 3x + 5, then any line of the form y = 3x + b (where b is not 5) is parallel to it. Parallel lines never intersect, maintaining the same distance from each other at every point.
To find a line parallel to y = 3x + 5 that passes through the point (2, 1), use the same slope m = 3 and substitute: 1 = 3(2) + b, so b = -5. The parallel line is y = 3x - 5.
Perpendicular Lines
Two lines are perpendicular if and only if the product of their slopes equals -1. If one line has slope m, the perpendicular slope is -1/m, known as the negative reciprocal. For a line with slope 2/3, the perpendicular slope is -3/2.
To find a line perpendicular to y = 2x + 4 that passes through (6, 1), calculate the perpendicular slope: -1/2. Then substitute: 1 = (-1/2)(6) + b, so b = 4. The perpendicular line is y = -1/2 x + 4. Interestingly, both lines share the same y-intercept in this case, but they intersect the y-axis at the same point heading in very different directions.
Special Cases
Not every line fits neatly into slope intercept form, and recognizing special cases helps avoid errors.
Horizontal Lines
A horizontal line has slope m = 0 and the equation simplifies to y = b. Every point on the line has the same y-coordinate. The line y = 5 is a horizontal line passing through (0, 5), (1, 5), (100, 5), and every other point where y equals 5.
Vertical Lines
Vertical lines cannot be expressed in slope intercept form because their slope is undefined (division by zero). A vertical line through x = 3 is written simply as x = 3. If you encounter two points with the same x-coordinate but different y-coordinates, such as (4, 1) and (4, 7), the line is vertical and slope intercept form does not apply.
Lines Through the Origin
When b = 0, the line passes through the origin and the equation is y = mx. These are direct proportional relationships where y is always m times x. Doubling x always doubles y. This is the mathematical foundation of many real-world proportional relationships like unit pricing, constant speed, and Ohm's law.
Real-World Applications
Linear equations in slope intercept form model numerous real-world situations where there is a constant rate of change plus a fixed starting value.
Cost Functions
The total cost of many services follows the pattern y = mx + b. A taxi ride might cost $3.00 base fare plus $2.50 per mile. The cost function is y = 2.50x + 3.00, where x is the number of miles and y is the total fare. The slope represents the per-mile rate and the y-intercept represents the base fare.
Temperature Conversion
The Fahrenheit to Celsius conversion formula, F = (9/5)C + 32, is a linear equation in slope intercept form. The slope 9/5 means that for every 1-degree increase in Celsius, Fahrenheit increases by 1.8 degrees. The y-intercept 32 reflects the fact that water freezes at 32 degrees Fahrenheit when Celsius is 0.
Depreciation
Straight-line depreciation of an asset follows y = mx + b where y is the asset's value, x is time in years, m is the negative depreciation rate, and b is the original purchase price. A $30,000 vehicle that loses $4,000 in value each year follows y = -4000x + 30000.
Science and Engineering
Linear relationships appear throughout the sciences. Hooke's law (F = kx) for spring force, the ideal gas law at constant temperature and amount, and velocity as a function of time under constant acceleration all produce linear graphs that can be expressed in slope intercept form. Scientists frequently use line fitting on experimental data to determine unknown slopes and intercepts.
Common Errors and Pitfalls
Students make several recurring errors when working with slope intercept form. Being aware of these helps you avoid them.
Swapping Rise and Run
The slope formula is rise over run, meaning (y2 - y1) / (x2 - x1), not (x2 - x1) / (y2 - y1). This is perhaps the most common mistake. Always place the y-difference in the numerator and the x-difference in the denominator.
Inconsistent Point Ordering
When calculating slope, you must subtract coordinates from the same point in both the numerator and denominator. Using (y2 - y1) / (x1 - x2) reverses the sign of the slope. Pick one point to subtract from consistently.
Sign Errors in Conversion
When converting from standard form Ax + By = C, students often forget the negative sign. The slope is -A/B, not A/B. Moving Ax to the other side of the equation changes its sign. Always double-check signs when rearranging terms.
Confusing Slope with Y-Intercept
In y = 3x + 7, the slope is 3 and the y-intercept is 7. Some students mistakenly identify the y-intercept as the number next to x. Remember: the coefficient of x is always the slope, and the constant term is always the y-intercept.