Slope and Intercept Calculator

Enter two points on a line — x1, y1, x2, y2 — and get the slope (m), y-intercept (b), and x-intercept back. The Slope and Intercept Calculator also returns the full slope-intercept equation (y = mx + b), point-slope form, and standard form so you have everything you need in one place.

Results

Slope (m)

--

Y-Intercept (b)

--

X-Intercept

--

Slope-Intercept Form

--

Point-Slope Form

--

Rise (Δy)

--

Run (Δx)

--

Rise vs Run

Frequently Asked Questions

What is the slope intercept form?

The slope-intercept form of a linear equation is y = mx + b, where m is the slope of the line and b is the y-intercept (the point where the line crosses the y-axis). It is one of the most common ways to express a straight line because both key parameters — steepness and position — are immediately visible.

How do you calculate the slope from two points?

Slope (m) is calculated as the change in y divided by the change in x: m = (y2 − y1) / (x2 − x1). This is often called 'rise over run.' A positive slope means the line goes upward left to right, while a negative slope means it goes downward.

How do you find the y-intercept?

Once you have the slope m, substitute one of your known points into y = mx + b and solve for b. For example, if m = 2 and your point is (3, 7): 7 = 2(3) + b, so b = 1. The y-intercept is the value of y when x equals zero.

How do you find the x-intercept?

The x-intercept is the point where the line crosses the x-axis, meaning y = 0. Set the equation to 0 = mx + b and solve: x = −b / m. This tells you at what x-value the line hits the horizontal axis.

Is slope intercept form the same as standard form?

No. Slope-intercept form is y = mx + b, while standard form is Ax + By = C. Both describe the same line but are arranged differently. You can convert between them by rearranging the equation algebraically.

What does a slope of zero mean?

A slope of zero means the line is perfectly horizontal — there is no rise for any run. The equation simplifies to y = b, a constant. Conversely, an undefined slope (division by zero when x1 = x2) means the line is perfectly vertical.

What are parallel and perpendicular line slopes?

Parallel lines have identical slopes (m1 = m2) but different y-intercepts. Perpendicular lines have slopes that are negative reciprocals of each other — that is, m1 × m2 = −1. For example, if one line has slope 2, a perpendicular line has slope −1/2.

How is slope used in real life and machine learning?

Slope and intercept appear in economics (cost functions), physics (velocity), engineering (gradients), and data science. In machine learning, linear regression fits a line y = mx + b to data where m and b are learned parameters that minimize prediction error across many data points.

More Statistics Tools