Enter two points to find slope, distance, midpoint, and the equation of the line.
Slope measures the steepness and direction of a line. It is defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line. A slope of 2 means the line rises 2 units for every 1 unit it moves to the right. A slope of -1 means the line falls 1 unit for every 1 unit to the right. A slope of 0 is a perfectly horizontal line, and an undefined slope is a vertical line.
Enter the coordinates of two points: (x₁, y₁) and (x₂, y₂). The calculator instantly computes the slope (as both a decimal and a fraction), the angle of inclination in degrees, the distance between the two points, the midpoint, and the equation of the line in both slope-intercept form (y = mx + b) and point-slope form (y - y₁ = m(x - x₁)). The interactive graph updates in real time as you change the inputs.
Positive slope: The line rises from left to right. Both variables increase together. Examples include speed vs. time when accelerating, and revenue vs. units sold at a fixed price.
Negative slope: The line falls from left to right. As one variable increases, the other decreases. Examples include altitude vs. time when descending, and remaining battery charge vs. usage time.
Zero slope: A horizontal line where y does not change regardless of x. The equation is y = b (a constant). Example: a car parked at a constant elevation.
Undefined slope: A vertical line where x does not change. Division by zero makes the slope undefined. The equation is x = a (a constant). Example: dropping an object straight down.
Slope-intercept form is the most common way to write the equation of a line. In y = mx + b, m is the slope and b is the y-intercept (the point where the line crosses the y-axis). To find b, substitute the slope and one known point into the equation and solve: b = y₁ - m * x₁. This form is especially useful for graphing because it immediately tells you where the line starts (b) and how steeply it rises or falls (m).
Point-slope form is useful when you know the slope and one point but do not need the y-intercept immediately. It is often the fastest way to write the equation of a line in exam settings. To convert to slope-intercept form, distribute m and isolate y. Both forms describe the same line and are interchangeable.
The distance between two points uses the Pythagorean theorem: d = sqrt((x₂ - x₁)² + (y₂ - y₁)²). The midpoint is the average of the coordinates: M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2). Both formulas are essential in coordinate geometry, physics, and engineering. The Quadratic Equation Solver handles parabolas and curves where slope varies at each point.
Slope appears throughout science and daily life. In physics, velocity is the slope of a position-time graph, and acceleration is the slope of a velocity-time graph. In construction, roof pitch is expressed as slope (a 6:12 pitch means the roof rises 6 inches for every 12 inches of horizontal run). Road grades are slopes expressed as percentages: a 6% grade means 6 feet of rise per 100 feet of horizontal distance. In economics, the slope of a demand curve shows how price changes affect quantity demanded. In statistics, the slope of a regression line quantifies the relationship between two variables.
Parallel lines have equal slopes. If line A has slope 3, any line parallel to it also has slope 3. Perpendicular lines have slopes that are negative reciprocals of each other: if line A has slope 3, a perpendicular line has slope -1/3. The product of perpendicular slopes always equals -1 (except for horizontal and vertical lines, which are perpendicular but one slope is 0 and the other is undefined). These relationships are fundamental in geometry, CAD design, and navigation.