Calculate the slope between two points, along with the line's y-intercept and angle of inclination.
📖 Slope Formula (Rise Over Run)Fill in the fields on the left with your information, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.
The slope calculator calculates the "slope" of the straight line connecting two points on a coordinate plane, a measure of how steep or flat the line is. The slope is calculated by dividing the difference in the y-axis by the difference in the x-axis between the two points — known as the "rise over run" principle. A positive slope means the line rises from left to right, a negative slope means it descends, while a slope of zero means a perfectly horizontal line. If the two x-values are identical, the line is perfectly vertical and its slope is mathematically undefined. In addition to the slope, the calculator computes the line's y-intercept and its full equation in slope-intercept form (y=mx+b), and the line's angle of incline in degrees — values fundamental to algebra, analytic geometry, and graphing linear functions. A steeper line, whether rising or falling, always has a slope with a larger absolute value, regardless of its sign.
Slope answers a single, intuitive question in a precise numerical way: for every step taken horizontally along a line, how much does the line rise or fall vertically? This 'rise over run' description is exactly what the slope formula calculates — the vertical change (rise) divided by the horizontal change (run) between any two points on the line.
The sign of the slope carries clear visual meaning. A positive slope means the line climbs as it moves from left to right, matching the everyday sense of an uphill road. A negative slope means the line descends moving left to right, like a downhill road. A slope of exactly zero describes a perfectly flat, horizontal line — no rise at all regardless of how far the run extends.
A vertical line is the one case the slope formula cannot handle: because every point on a vertical line shares the same x-coordinate, the 'run' in the rise-over-run calculation becomes zero, and dividing by zero is undefined. This is not a flaw in the formula so much as a genuine mathematical fact — a vertical line simply does not have a slope in the ordinary sense, and its equation must be written differently (as x equals a constant) rather than in the standard y=mx+b form.
The magnitude of the slope, separate from its sign, indicates how steep the line is. A slope of 5 describes a much steeper line than a slope of 0.5, since the line with slope 5 rises five units for every one unit of horizontal movement, compared to just half a unit for the shallower line. Converting slope into an angle of incline (using the inverse tangent function) provides a more intuitive, everyday sense of steepness for anyone more comfortable thinking in degrees than in a rise-over-run ratio.
Slope calculations are foundational well beyond pure algebra: physics uses slope to represent velocity on a position-versus-time graph, and acceleration on a velocity-versus-time graph. Economics uses slope to represent marginal cost or marginal rate of substitution on supply and demand curves. Construction and engineering use slope, often expressed as a percentage grade, to describe road inclines, roof pitches, and wheelchair ramp requirements, where building codes frequently specify a maximum allowable slope for safety and accessibility.
A negative slope means the line goes downward as you move from left to right on the graph.
Slope requires dividing by the horizontal change, and for a vertical line that change is zero, making division undefined.
It's the angle the line makes with the positive x-axis, showing how steep the line is in degrees rather than as a ratio.