UnitCompiler
📈

Slope Calculator

Compute line slope (rise/run), incline angle in degrees, and linear equations.

Slope & Line Equation Calculator

Calculate slope m, line equation y = mx + b, incline angle, distance, and rise/run.

📈
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
Examples:
Slope (m = Δy / Δx)
2.0000
Rise: 6, Run: 3 (6 / 3)
Slope-Intercept Equation
y = 2x + 0
y = mx + b format
Angle of Incline (θ)
63.43°
Percent Grade
200.0%
Distance (d)
6.7082
y-Intercept (b)
(0, 0)

Slope & Coordinate Geometry Formulas

Slope Formula
m = (y₂ - y₁) / (x₂ - x₁)
Distance Formula
d = √[(x₂ - x₁)² + (y₂ - y₁)²]
Slope-Intercept Form
y = mx + b

How This Calculation Works

Slope m quantifies the steepness and direction of a straight line passing through two Cartesian coordinates (x₁, y₁) and (x₂, y₂) as rise divided by run. Together with Euclidean segment distance and inclination angle θ = arctan(m), slope defines the linear equation y = mx + b used in algebra, civil grading, and physics kinematics.

Core Formulas & Identities

Two-Point Slope
m = Δy / Δx = (y₂ − y₁) / (x₂ − x₁)
Slope-Intercept & Distance
y = mx + b | d = √((x₂ − x₁)² + (y₂ − y₁)²)
Incline Angle & Grade
θ = arctan(m) | % Grade = m × 100%

Variable Legend:(x₁, y₁) and (x₂, y₂) are distinct points; vertical lines where x₁ = x₂ have undefined infinite slope.

Step-by-Step Worked Examples

Example1

Line through (1, 2) and (4, 8)

  1. Compute rise Δy = 8 − 2 = 6 and run Δx = 4 − 1 = 3.
  2. Divide Δy / Δx = 6 / 3 = 2.
  3. Solve b = y₁ − mx₁ = 2 − 2(1) = 0 → y = 2x.
Result:m = 2, θ ≈ 63.43°
Example2

Road Grade of 8% over 500 m Run

  1. Convert 8% grade into slope m = 0.08.
  2. Multiply rise = 0.08 × 500 = 40 m elevation gain.
  3. Calculate angle θ = arctan(0.08) ≈ 4.57°.
Result:40 m rise (θ ≈ 4.57°)

Practical Applications & Accuracy Tips

  • Keep the point subtraction order identical in numerator and denominator: (y₂ − y₁) over (x₂ − x₁).
  • Parallel lines share equal slopes (m₁ = m₂); perpendicular lines obey m₁ · m₂ = −1.
  • Horizontal lines have m = 0; vertical lines have zero Δx and undefined slope.