Slope Calculator
Calculate slope, angle, and line equation from two points or an equation
How to Use This Slope Calculator
- Enter the x and y coordinates for your first point (x1, y1)
- Enter the x and y coordinates for your second point (x2, y2)
- Or switch to 'From Equation' to enter coefficients ax + by + c = 0
- Click 'Calculate Slope' to get the slope, angle, and line equation
Example: For points (0, 0) and (4, 6), the slope is 6/4 = 1.5. This means the line rises 1.5 units for every 1 unit it moves right. The angle is 56.31 degrees, and the equation is y = 1.5x.
Tip: If your two points have the same x-coordinate, the line is vertical and has an undefined slope.
Why Use a Slope Calculator?
Slope tells you how steep a line is and which direction it goes. Understanding slope is essential for graphing, construction, and analyzing data trends.
- Calculate the grade of a road or ramp (a 6% grade means slope of 0.06)
- Determine roof pitch for construction projects (4:12 pitch = 0.33 slope)
- Find the rate of change in data analysis and trend lines
- Write the equation of a line for math homework
- Calculate wheelchair ramp compliance (ADA requires max 1:12 slope)
- Analyze stock price trends using linear regression
Understanding Your Results
The slope value tells you how the line behaves. Combined with the y-intercept, you have everything needed to graph or work with the line.
| Result | Meaning | Action |
|---|---|---|
| Positive slope (m > 0) | Line rises left to right | For every unit increase in x, y increases by m units |
| Negative slope (m < 0) | Line falls left to right | For every unit increase in x, y decreases by |m| units |
| Zero slope (m = 0) | Horizontal line | The y-value stays constant regardless of x |
| Undefined slope | Vertical line | The x-value stays constant; cannot be written as y = mx + b |
Meaning: Line rises left to right
Action: For every unit increase in x, y increases by m units
Meaning: Line falls left to right
Action: For every unit increase in x, y decreases by |m| units
Meaning: Horizontal line
Action: The y-value stays constant regardless of x
Meaning: Vertical line
Action: The x-value stays constant; cannot be written as y = mx + b
Note: The perpendicular slope is always -1/m. Two lines are perpendicular when their slopes multiply to -1.
About Slope Calculator
Formula
m = (y₂ - y₁) / (x₂ - x₁) Where m is slope, (x1, y1) is the first point, and (x2, y2) is the second point. The formula calculates rise over run.
Current Standards: In construction, slopes are often expressed as ratios (rise:run like 4:12) or percentages (grade = slope x 100). A 100% grade equals a 45-degree angle.
Frequently Asked Questions
What's the difference between slope and grade?
Slope is a ratio (like 0.06), while grade is slope expressed as a percentage (6%). A road with a 6% grade rises 6 feet for every 100 feet of horizontal distance. To convert slope to grade, multiply by 100. A 1:12 ramp slope equals about 8.3% grade.
How do I find the slope from an equation like 2x + 3y = 6?
Solve for y to get slope-intercept form (y = mx + b). For 2x + 3y = 6: subtract 2x to get 3y = -2x + 6, then divide by 3 to get y = -2/3x + 2. The slope is -2/3. Or use our 'From Equation' tab with a=2, b=3, c=-6 (rearranged to ax + by + c = 0).
What angle does a slope of 1 make?
A slope of 1 creates a 45-degree angle with the horizontal. Use the formula: angle = arctan(slope). For slope = 1: arctan(1) = 45 degrees. A slope of 0.5 gives about 26.57 degrees, while a slope of 2 gives about 63.43 degrees.
How do I know if two lines are parallel?
Parallel lines have identical slopes. If line 1 has slope 2/3 and line 2 has slope 2/3, they're parallel (they never intersect). Lines can have different y-intercepts but the same slope. To check: calculate both slopes and compare.
What does a negative y-intercept mean?
A negative y-intercept means the line crosses the y-axis below the origin. In y = 2x - 5, the line crosses at (0, -5). This is the starting value when x = 0. For a business context, it might represent fixed costs or a baseline below zero.