About the Slope Intercept Form Calculator
The slope-intercept form of a straight line is y = mx + b, where m is the slope, the steepness of the line, and b is the y-intercept, the height at which the line crosses the y-axis. If you know two points on a line, or one point and the slope, you can find m and b and write the equation. This calculator does that in a click. It also gives you the line in standard form Ax + By = C, the x-intercept, the slope of a perpendicular line, and the angle the line makes with the x-axis. Vertical lines, which have no slope, and horizontal lines are handled correctly.
Updated October 2026
How to use the Slope Intercept Form Calculator
- 1Choose whether you know two points, or the slope and one point.
- 2Enter the coordinates, and the slope if you have it.
- 3Read the equation in slope-intercept form.
- 4Check the standard form, the intercepts and the perpendicular slope.
- 5Copy the equation.
Worked example
A taxi charges a fixed 3 plus 2 per kilometre. Two points on the cost line are (1, 5) and (4, 11). The slope is (11 − 5) ÷ (4 − 1) = 2, and b = 5 − 2 × 1 = 3. The line is y = 2x + 3. The y-intercept 3 is the fixed charge and the slope 2 is the price per kilometre. The x-intercept is −1.5, which has no practical meaning here because distance cannot be negative.
Different forms of a line
- Slope-intercept: y = mx + b.
- Point-slope: y − y1 = m(x − x1).
- Standard: Ax + By = C.
- Vertical line: x = a.
- Horizontal line: y = b.
Checking your answer
Substitute both of your points into the equation and make sure each gives a true statement. Plot the intercepts: the line should cross the y-axis at b and the x-axis at −b divided by m. If a line you expect to rise falls, check the order of subtraction in the slope. Always subtract the coordinates in the same order for top and bottom.
Related tools
The Slope Calculator focuses on the slope and distance between two points, the Midpoint Calculator finds the middle of a segment, the Linear Equations Solver handles pairs of equations and the Linear Regression Calculator fits a line to many points.
Features
- Two points or slope and a point
- y = mx + b and Ax + By = C
- x-intercept and y-intercept
- Perpendicular slope
- Angle with the x-axis
- Handles vertical and horizontal lines
Frequently asked questions
How do I find the equation of a line from two points?
First find the slope: m = (y2 − y1) ÷ (x2 − x1). Then find b by putting one point into y = mx + b. For the points (1, 3) and (4, 9) the slope is 2 and b is 1, so y = 2x + 1.
What is the slope?
The slope is the rise over the run, how much y changes when x increases by 1. A slope of 2 means the line climbs 2 units for every 1 unit to the right. A negative slope falls from left to right.
What is the y-intercept?
The point where the line meets the y-axis, where x = 0. In y = 2x + 1 it is 1, so the line passes through (0, 1).
What if my two points have the same x?
The line is vertical, with an undefined slope, and its equation is x = a constant. It cannot be written as y = mx + b. The calculator gives x = value for this case.
What is the slope of a perpendicular line?
The negative reciprocal. A line with slope 2 has perpendicular lines with slope −1/2. A horizontal line has a vertical perpendicular, whose slope is undefined.
How do I convert to standard form?
Move the x term to the left: y = 2x + 1 becomes 2x − y = −1. The calculator clears fractions where it can, so a slope of 0.5 gives whole-number coefficients such as x − 2y = −6.