Slope Calculator
Slope (m): 1
- Slope (m)
- 1
- Angle θ
- 45°
- Rise (Δy)
- 1 units
- Run (Δx)
- 1 units
- Distance
- 1.414214 units
- Y-intercept (b)
- 0 units
Slope diagram
What this calculator does
The Slope Calculator measures the steepness and direction of a straight line through two points. Given the coordinates of both points, it returns the slope, the angle of inclination, the vertical rise, the horizontal run, the distance between the points, and the line's y-intercept.
Slope is a basic concept in algebra, geometry, engineering, economics, and data analysis. It describes how much one quantity changes when another changes by one unit. On a graph, slope is often called rise over run. In real-world settings, the same idea describes a ramp, a roof, a road grade, or a trend line.
How to use this calculator
- Enter the x and y coordinates of point 1.
- Enter the x and y coordinates of point 2.
- Click Calculate.
- Review the slope, angle, rise, run, distance, and y-intercept.
The default points are (1, 1) and (2, 2). The slope is 1, the angle is 45 degrees, the rise and run are both 1, the distance is about 1.4142, and the y-intercept is 0. This is the line y = x.
Slope formulas
Rise: Δy = y₂ − y₁
Run: Δx = x₂ − x₁
Slope: m = Δy / Δx
Angle: θ = arctan(m)
Distance: d = √(Δx² + Δy²)
Y-intercept: b = y₁ − m × x₁
The angle is measured from the positive x-axis and is reported in degrees. For a line, the angle is usually taken between 0 and 180 degrees. The y-intercept is the y-value where the line crosses the y-axis.
What the results mean
The highlighted result is the slope. A positive slope means the line rises from left to right. A negative slope means it falls. A slope of zero means the line is horizontal. The rise and run show the signed vertical and horizontal changes between the two points.
The distance row is the straight-line length between the points. It is not the distance along the x-axis or y-axis. The y-intercept is useful for writing the line in slope-intercept form, y = mx + b.
Assumptions and limitations
- The two points must have different x-coordinates. A vertical line has an undefined slope, and the calculator reports an error.
- Coordinates may be positive, negative, or zero, but they must be finite numbers.
- The x and y coordinates must use consistent units for the distance and intercept to be meaningful.
- The calculator works in two dimensions. It does not calculate slope for a line in three-dimensional space.
- The angle is the line's inclination, not necessarily the direction of travel from point 1 to point 2. Reversing the points gives the same line and the same slope.
- Results are rounded for display.
Frequently asked questions
Why is the slope undefined for a vertical line?
Slope is the change in y divided by the change in x. On a vertical line, the x-coordinate does not change, so the denominator is zero. Division by zero is undefined, and the line cannot be written as y = mx + b. The calculator stops with a clear message instead of returning infinity.
How does reversing the two points affect the result?
Reversing the points changes the signs of both the rise and the run, so the slope remains the same. The distance also remains the same. The y-intercept is unchanged because it describes the same line. The reported rise and run swap signs, but the line itself does not change.
What does a negative slope mean?
A negative slope means the line falls as it moves from left to right. The angle of inclination is greater than 90 degrees. For example, a slope of −1 corresponds to a 135-degree angle when measured from the positive x-axis. Real-world examples include a downhill ramp or a decreasing trend line.
Reference table
Slope angle formula
| arctan( | ΔY | ) |
|---|---|---|
| θ | ΔY | ΔX |
| Angle from the positive x-axis | Rise (y₂ − y₁) | Run (x₂ − x₁) |
Slope m = ΔY ÷ ΔX. The angle θ = arctan(m), adjusted to the 0–180° range. A vertical line has an undefined slope because ΔX = 0.
Source
Reference: Calculator.net — Slope Calculator.
This page is for general educational and estimation purposes. Verify coordinates and units before using slope results for design or construction.
Math Calculators
- Scientific Calculator
- Fraction Calculator
- Percentage Calculator
- Percent Error Calculator
- Random Number Generator
- Exponent Calculator
- Binary Calculator
- Hex Calculator
- Half-Life Calculator
- Quadratic Formula Calculator
- Log Calculator
- Ratio Calculator
- Root Calculator
- Least Common Multiple Calculator
- Greatest Common Factor Calculator
- Factor Calculator
- Rounding Calculator
- Matrix Calculator
- More Math Calculators