📐Slope Calculator
Calculate the slope between two points, the line equation (y = mx + b), angle, distance, and midpoint for any two coordinate points.
Prefer to skip the form? Scroll down and Ask AI Instead. Just describe your situation and let AI handle the math for you in seconds.
Slope (m)
0.750000
Slope = 0.750000. Equation: y = 0.7500x. Distance between points: 5.0000. Midpoint: (2.0000, 1.5000).
Line Properties
0.750000
y = 0.7500x
5.0000
(2.0000, 1.5000)
Advertisement
728 × 90
✦ Ask AI Instead
Slope Calculator: Find the Slope of a Line Between Two Points
Use this slope calculator to instantly find the slope of a line between two points, build the full linear equation, and compute distance and midpoint along the way. Slope is one of the most fundamental ideas in coordinate geometry. It measures how steeply a line rises or falls and appears in everything from road grades and roof pitches to physics formulas and financial trend analysis. Enter two coordinate points and the calculator handles the slope formula, y-intercept, and more.
Slope Calculator from Two Coordinate Points
The slope formula uses rise over run: m = (y2 - y1) / (x2 - x1). Rise is the vertical change between the two points and run is the horizontal change. The result is interpreted as follows:
- Positive slope means the line climbs from left to right. The larger the value, the steeper the climb.
- Negative slope means the line falls from left to right. A slope of -3 is steeper downward than a slope of -0.5.
- Zero slope means a perfectly horizontal line. No vertical change occurs over any horizontal distance.
- Undefined slope means a perfectly vertical line. The run is zero, making division impossible. The equation takes the form x = constant.
Example: Find the slope between (1, 2) and (5, 10). Rise = 10 - 2 = 8. Run = 5 - 1 = 4. Slope m = 8/4 = 2. The gradient is 2, meaning y increases by 2 units for each 1-unit increase in x.
How to Calculate Slope Intercept Form
Once you have the slope m from two coordinate points, finding the full linear equation y = mx + b requires one more step: solving for the y-intercept b.
Substitute the slope and either known point into y = mx + b, then solve for b. Using the example above with slope 2 and the point (1, 2): 2 = 2(1) + b, so b = 0. The complete slope-intercept form is y = 2x.
If the slope were 2 and the point were (3, 7): 7 = 2(3) + b, so 7 = 6 + b, giving b = 1. The equation is y = 2x + 1. The y-intercept b always tells you where the line crosses the vertical axis (at x = 0, y = b).
Slope-intercept form y = mx + b is the most useful format because you can read both the slope and the y-intercept directly from the equation without any further algebra.
Rise Over Run Slope Calculator: Real-World Applications
Rise over run is not just an abstract math formula. The same calculation appears constantly in practical settings.
- Road grades. A 6% road grade means 6 feet of vertical rise per 100 feet of horizontal run, a slope of 0.06. Engineers limit highway grades to keep vehicles safe on steep terrain.
- Roof pitch. A 4:12 pitch means 4 inches of rise per 12 inches of run, a slope of 1/3. Steeper pitches shed water and snow faster but require more framing material.
- Wheelchair ramps. ADA guidelines require a maximum slope of 1:12, meaning no more than 1 inch of rise per 12 inches of run, a gradient of approximately 8.3%.
- Physics. Velocity on a position-versus-time graph is the slope. Acceleration on a velocity-versus-time graph is the slope. Slope is the graphical face of rate of change throughout science.
- Finance. Trend lines on price charts have slopes that indicate the direction and speed of a trend. A steeper positive slope signals faster growth; a negative slope indicates decline.
Parallel, Perpendicular, and Special Lines
Slope relationships between lines tell you whether they intersect, run side by side, or meet at right angles.
- Parallel lines have identical slopes. They never intersect and maintain a constant distance from each other.
- Perpendicular lines have slopes that are negative reciprocals: if one line has slope m, any perpendicular line has slope -1/m. A line with slope 3 is perpendicular to a line with slope -1/3. Their product is always -1.
- Horizontal lines (slope = 0) are perpendicular to all vertical lines (undefined slope).
Distance and Midpoint from Two Points
The distance between two coordinate points comes from the Pythagorean theorem applied to the coordinate plane. If the horizontal leg is (x2 - x1) and the vertical leg is (y2 - y1), the straight-line distance is the hypotenuse: d = sqrt((x2 - x1)^2 + (y2 - y1)^2).
The midpoint splits the segment exactly in half. Its coordinates are the averages of the endpoint coordinates: midpoint = ((x1 + x2)/2, (y1 + y2)/2). Both results appear automatically in this calculator alongside the slope and linear equation.
Frequently Asked Questions
What is the formula for slope?
The slope formula is m = (y2 - y1) / (x2 - x1), often described as rise over run. Rise is the vertical change between two points and run is the horizontal change. A positive result means the line goes upward left to right, a negative result means it goes downward, zero means horizontal, and an undefined result (division by zero) means a vertical line.
How do I calculate slope from two points?
Subtract the y-coordinates to get the rise: y2 - y1. Subtract the x-coordinates in the same order to get the run: x2 - x1. Divide rise by run to get the slope. For points (2, 3) and (6, 11): rise = 11 - 3 = 8, run = 6 - 2 = 4, slope = 8/4 = 2. Then substitute the slope and one point into y = mx + b to find the y-intercept and complete the linear equation.
What is a positive slope vs negative slope?
A positive slope means the line rises from left to right: as x increases, y increases. The steeper the rise, the larger the slope value. A negative slope means the line falls from left to right: as x increases, y decreases. A slope of -4 is steeper downward than a slope of -1. Both positive and negative slopes describe the gradient of a line; the sign tells you direction and the magnitude tells you steepness.
What is slope-intercept form?
Slope-intercept form is the linear equation written as y = mx + b, where m is the slope and b is the y-intercept (the value of y when x = 0). This form lets you read the slope and starting point directly without solving. For example, y = -3x + 7 has slope -3 and y-intercept 7. To convert from two points: compute m using the slope formula, then substitute m and one point into y = mx + b and solve for b.