Skip to main content

Slope Calculator – Gradient from Two Points

Quick answer

m=(y₂−y₁)/(x₂−x₁): the line through (2,3) and (6,11) has slope 2 and angle atan(2)≈63.4°.

  • Parallel and perpendicular checks included.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How the Slope Calculator Works

m = (y₂ − y₁) / (x₂ − x₁) | angle θ = arctan(m) | perpendicular slope = −1/m

Slope is rise over run — how fast y climbs per unit of x. Through (2,3) and (6,11), the rise is 11−3 = 8 and the run is 6−2 = 4, so m = 8/4 = 2: the line rises 2 units for each step right. The inclination angle follows from arctan(2) ≈ 63.43°, which roofers and ramp designers use directly. The calculator classifies the result — positive like +2 (rising), negative (falling), zero (horizontal), or undefined (vertical, when x₂−x₁ = 0). It also computes the perpendicular slope −1/m = −0.5, the number a normal line must carry, and the y-intercept b = y₁ − m·x₁ = 3 − 2×2 = −1, completing the equation y = 2x − 1.

  1. 1

    Enter two points

    Provide (x₁,y₁) and (x₂,y₂) on the line

  2. 2

    Compute rise and run

    Rise = y₂−y₁, run = x₂−x₁, both displayed

  3. 3

    Divide for slope

    m = rise/run, classified as rising, falling, flat or vertical

  4. 4

    Derive angle & intercept

    θ = arctan(m) and b = y₁ − m·x₁ complete the line equation

Use Cases

Ramp & Roof Design

ADA ramps need slope ≤ 1:12 (m ≈ 0.083); roofs pitch in rise/12

Economics Margins

Marginal cost is the slope between two output-cost points

Physics Graphs

Velocity from a distance-time plot: slope of (1,2)→(3,10) is 4 m/s

Tips

  • 1

    m = 0 is horizontal; undefined slope (run 0) is vertical

  • 2

    Parallel lines share m; perpendicular lines satisfy m₁ × m₂ = −1

  • 3

    The angle in degrees is arctan(m), not m itself

Common Mistakes

  • Flipping the formula to (x₂−x₁)/(y₂−y₁), which inverts the slope

  • Subtracting inconsistently: (y₂−y₁) must pair with (x₂−x₁)

  • Treating a vertical line as slope 0 — it has no slope (undefined)

  • Forgetting the sign flip for perpendicular slopes, −1/m not 1/m

FAQs

What is the slope through (2,3) and (6,11)?

m = (11−3)/(6−2) = 8/4 = 2 — the line rises 2 units per unit right.

What slope is perpendicular to m = 2?

−1/2. Perpendicular slopes multiply to −1: 2 × (−0.5) = −1.

What angle does a slope of 2 make?

arctan(2) ≈ 63.43° above the horizontal.

What if both points share the same x?

The run is 0, so the slope is undefined — a perfectly vertical line.

How do I get the full line equation?

b = y₁ − m·x₁ = 3 − 4 = −1, so the line is y = 2x − 1.