Quick Answer
The slope between points (1, 2) and (4, 8) is 2, meaning the line rises 2 units for every 1 unit it moves to the right.
Common Examples
| Input | Result |
|---|---|
| (1, 2) and (4, 8) | Slope: 2, Distance: 6.71 |
| (0, 0) and (3, 4) | Slope: 1.33, Distance: 5 |
| (-2, 3) and (5, -1) | Slope: -0.57, Distance: 8.06 |
| (2, 5) and (2, 10) | Slope: Undefined (vertical line) |
| (0, 3) and (6, 3) | Slope: 0 (horizontal line) |
How It Works
The Formula
The slope (m) of a line passing through two points (x1, y1) and (x2, y2) is defined as the ratio of the vertical change to the horizontal change:
m = (y2 - y1) / (x2 - x1)
This is often described as “rise over run.” A positive slope means the line goes upward from left to right. A negative slope means the line goes downward from left to right. A slope of zero is a horizontal line. When x1 equals x2, the line is vertical and the slope is undefined.
Angle of Inclination = arctan(m), converted from radians to degrees. This gives the angle the line makes with the positive x-axis.
Distance between the two points uses the Euclidean distance formula derived from the Pythagorean theorem:
d = sqrt((x2 - x1)^2 + (y2 - y1)^2)
Midpoint = ((x1 + x2) / 2, (y1 + y2) / 2), the point exactly halfway between the two given points.
Slope-Intercept Form: y = mx + b, where b is the y-intercept found by substituting one point into the equation.
Point-Slope Form: y - y1 = m(x - x1), using the slope and one of the given points.
Worked Example
For points (1, 2) and (4, 8): Slope = (8 - 2) / (4 - 1) = 6 / 3 = 2. Angle = arctan(2) = 63.43 degrees. Distance = sqrt((4-1)^2 + (8-2)^2) = sqrt(9 + 36) = sqrt(45) = 6.71. Midpoint = ((1+4)/2, (2+8)/2) = (2.5, 5). For slope-intercept form: 2 = 2(1) + b, so b = 0, giving y = 2x. Point-slope form: y - 2 = 2(x - 1).
Related Calculators
Circle Calculator
Calculate the area, circumference, and diameter of a circle from any known value.
Area Calculator
Calculate the area of common shapes: rectangle, triangle, circle, trapezoid, and ellipse.
Pythagorean Theorem Calculator
Solve for any side of a right triangle using the Pythagorean theorem, plus calculate area and perimeter.
CalculateY