Slope Calculator

Calculate slope, gradient, angle, and equation of a line between two points

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

Slope Results:

Slope (m): 1

Rise: 4

Run: 4

Angle: 45.00°

Gradient: 100.00%

Line Equation:

Slope-intercept form: y = 1x - 1

Point-slope form: y - 3 = 1(x - 2)

Standard form: x - y - 1 = 0

Additional Information:

Distance between points: 5.66 units

Midpoint: (4, 5)

Slope type: Positive (increasing)

Related Geometry Calculators

Slope Calculator: Quick Framework

1. Core Relationships

  • m = (y₂ − y₁)/(x₂ − x₁)
  • Angle θ = atan(m); m = tan θ
  • Gradient % = 100·m
  • Distance between points: √(Δx² + Δy²) (reuse if needed)

2. Classification

m > 0 increasing • m < 0 decreasing • m = 0 horizontal • Δx = 0 vertical (undefined).

3. Equation Forms (fast)

  • Slope‑intercept: y = mx + b ; b = y₁ − m x₁
  • Point‑slope: y − y₁ = m(x − x₁)
  • Vertical: x = constant (no slope value)

4. Quick Flow

  1. Compute Δx, Δy.
  2. If Δx = 0 → vertical (stop).
  3. m = Δy/Δx; derive angle / % only if needed.
  4. Need equation? Pick preferred form; compute intercept once.

5. Parallel / Perpendicular Guardrails

  • Parallel: m₁ = m₂ (or both vertical).
  • Perpendicular: m₂ = −1/m₁ (except when one vertical, other horizontal).

6. Shortcuts

  • Use simplified fraction for rise/run (e.g., 8/12 → 2/3).
  • Avoid atan if you only need gradient % (m·100).
  • Batch lines: precompute Δx, store reciprocal for repeated perpendicular checks.

7. Pitfalls

  • Dividing in wrong order (run / rise).
  • Reporting 0 instead of undefined for vertical.
  • Dropping the sign on Δy.
  • Confusing gradient % with angle degrees.

8. Micro Examples

(2,3)→(6,7): Δx=4 Δy=4 → m=1 → θ=45° → % = 100%

(4,5)→(4,10): vertical line → slope undefined → equation x=4

9. Mini FAQ

  • Negative gradient? Just means descending left→right.
  • Angle for vertical? 90° (slope undefined, not ∞).
  • Can slope be fraction? Yes—store as reduced rational for exact math.

10. Action Tip

When only comparing steepness, compare |Δy| vs |Δx| or use squared ratio before full floating division to avoid tiny rounding issues.