TheCalculatorsHub

Slope Calculator

Interactive calculator coming soon!

Disclaimer: Results are estimates only. Always verify important calculations with a qualified professional before making decisions. Learn about our methodology.

The slope of a line tells you how steeply it rises or falls between two points. It is defined as the ratio of vertical change (rise) to horizontal change (run): m = (y2 minus y1) divided by (x2 minus x1). This calculator accepts two coordinate points, uses the slope formula to work out m, and then returns the full slope-intercept equation y = mx + b, the y-intercept, the angle the line makes with the x-axis, the straight-line distance between the two points, and the midpoint. Entering two points is all you need to figure out the complete picture of the line in one step without having to carry out any algebra manually.

The Slope Formula and What It Tells You

Given two points (x1, y1) and (x2, y2), the slope is m = (y2 - y1) / (x2 - x1). The numerator is the rise (vertical change) and the denominator is the run (horizontal change). A positive slope means the line rises from left to right. A negative slope means it falls from left to right. A slope of zero means the line is perfectly horizontal (no vertical change). When x1 equals x2, the denominator is zero and the slope is undefined, which means the line is vertical. Given that slope is a ratio, a value of 3 means the line rises 3 units for every 1 unit of horizontal travel. As a result, a larger absolute value of slope always indicates a steeper line. The Omni Calculator slope tool includes a visual graph that shows exactly how the steepness changes as you adjust the two input points.

Slope typeConditionDirectionExample
Positivem greater than 0Rises left to rightm = 2, line goes up
Negativem less than 0Falls left to rightm = -3, line goes down
Zerom = 0Horizontal (flat)y = 5, no rise
Undefinedx1 = x2Vertical linex = 4, no run

Finding the Line Equation in Slope-Intercept Form

Once slope m is known, the y-intercept b is found by substituting one point into y = mx + b and solving: b = y1 minus m times x1. For example, with points (1, 3) and (4, 9), m = (9 - 3) / (4 - 1) = 6 / 3 = 2. Then b = 3 minus 2 x 1 = 1. The equation is y = 2x + 1. With that in mind, this equation works for every point on the line, not just the two you entered. You can verify by substituting (4, 9): y = 2 x 4 + 1 = 9. That said, a common mistake on Quora discussions is confusing which pair of coordinates belongs to point 1 versus point 2. The formula gives the same slope regardless of which point is labelled first, because swapping both the numerator and denominator sign pairs cancel out. The CalculatorSoup slope calculator shows each substitution step clearly if you want to follow the manual working. Our System of Equations Calculator finds the intersection point of two lines when you have both line equations, which is the natural next step after identifying slope and intercept.

Distance, Angle, and Midpoint

The straight-line distance between two points comes from the Pythagorean theorem: d = sqrt((x2 - x1) squared + (y2 - y1) squared). For (1, 3) and (4, 9), d = sqrt(9 + 36) = sqrt(45) = 6.708. The angle of inclination is the angle the line makes with the positive x-axis: theta = arctan(m) in degrees. For m = 2, theta = arctan(2) = 63.43 degrees. The midpoint is the average of the coordinates: M = ((x1 + x2) / 2, (y1 + y2) / 2). On top of that, the perpendicular bisector of the segment passes through this midpoint at a slope that is the negative reciprocal of m. These three supplementary values help build up a full geometric description of the line segment rather than just its gradient. The Cuemath finding slope from two points guide covers the distance and midpoint formulas alongside the slope with colour-coded worked examples.

Parallel and Perpendicular Lines

Two lines are parallel when they have exactly the same slope (and different y-intercepts). Two lines are perpendicular when their slopes multiply to -1: if one line has slope m, the perpendicular slope is -1/m. For example, a line with slope 3 is perpendicular to a line with slope -1/3. With that in mind, once you narrow down the slope of a given line using this calculator, you can immediately determine the slope of any line parallel or perpendicular to it. In applied problems such as designing a road at a right angle to an existing one, or finding the normal to a curve at a point, this relationship is used constantly. Our Quadratic Formula Calculator is useful when the line forms part of a larger quadratic problem, such as finding where a line intersects a parabola.