Geometry & Line Tool

Slope Calculator from Two Points

Calculate the slope (m), angle of inclination (θ), percent grade, distance, and line equation (y = mx + b) between any two coordinate points. Includes complete step-by-step algebraic working.

2D Line & Gradient Geometry
Supports both 1.5 and 1,5 decimals
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

How to Find Slope from Two Points (Step-by-Step)

If you are wondering how to find slope from two points or reading slope from a graph, the mathematical procedure is straightforward. Finding slope from two points $(x_1, y_1)$ and $(x_2, y_2)$ requires dividing the vertical rise ($\Delta y = y_2 - y_1$) by the horizontal run ($\Delta x = x_2 - x_1$).

Our free online point slope calculator automates slope from two points calculations, instantly generating the slope $m$, inclination angle $\theta$, road grade percentage, Euclidean line distance $d$, and full slope-intercept equation ($y = mx + b$).

Equation

Slope & Line Equations

m = (y₂ - y₁) / (x₂ - x₁), θ = arctan(m), d = √[ (x₂ - x₁)² + (y₂ - y₁)² ]
Where:
  • m=Slope (gradient): The steepness ratio: m = Rise / Run = (y₂ - y₁) / (x₂ - x₁).
  • θ=Angle of inclination: The angle the line makes with the positive horizontal axis: θ = arctan(m).
  • Grade %=Percentage slope: The grade commonly used in roads and civil construction: |m| × 100%.
  • d=Euclidean distance: Straight-line length between coordinates: d = √[(x₂ - x₁)² + (y₂ - y₁)²].
  • b=Y-intercept: The y-coordinate where the line crosses the y-axis (x = 0): b = y₁ - m·x₁.

Note: If x₂ = x₁, the line is vertical and the slope is undefined. If y₂ = y₁, the line is horizontal and the slope is 0.

Step-by-Step Worked Examples

Walk through two complete real-world calculation problems or click any example to load its numbers directly into the calculator.

Example 1

Wheelchair Accessibility Ramp Grade & Slope

An architect designs an ADA-compliant accessibility ramp. The ramp starts at ground level (x₁ = 0 ft, y₁ = 0 ft) and reaches the building entrance threshold at (x₂ = 24 ft, y₂ = 2 ft). Compute the slope, grade percentage, and angle.

Given Values:
Start Point (x₁, y₁): (0, 0) ftEnd Point (x₂, y₂): (24, 2) ft
Solution Steps:
  1. Rise (Δy) = 2 - 0 = 2 ft
  2. Run (Δx) = 24 - 0 = 24 ft
  3. Slope m = Rise / Run = 2 / 24 = 1/12 ≈ 0.083333
  4. Percent Grade = (2 / 24) × 100% = 8.33% (meets 1:12 ADA maximum slope standard)
  5. Angle θ = arctan(0.083333) = 4.76°
  6. Ramp Surface Distance d = √(24² + 2²) = √(576 + 4) = √580 ≈ 24.08 ft
  7. Line Equation: y = 0.0833x
Calculated Result:m = 0.0833 (8.33% Grade, 4.76°)
Example 2

Cartesian Coordinate Geometry Line Equation

Find the slope, angle of inclination, distance, and slope-intercept equation of the line passing through points A(-3, 8) and B(5, -6).

Given Values:
Point 1 (x₁, y₁): (-3, 8)Point 2 (x₂, y₂): (5, -6)
Solution Steps:
  1. Calculate Run: Δx = 5 - (-3) = 5 + 3 = 8
  2. Calculate Rise: Δy = -6 - 8 = -14
  3. Compute Slope: m = -14 / 8 = -7/4 = -1.750000
  4. Angle of Inclination: θ = arctan(-1.75) = -60.26° (or 119.74° from positive x-axis)
  5. Calculate Y-intercept: b = y₁ - m·x₁ = 8 - (-1.75)×(-3) = 8 - 5.25 = 2.75
  6. Distance d = √(8² + (-14)²) = √(64 + 196) = √260 ≈ 16.1245
  7. Slope-Intercept Equation: y = -1.75x + 2.75
Calculated Result:m = -1.75 (y = -1.75x + 2.75)

Slope Calculator FAQs

What is the slope of a line?

The slope (often denoted m) measures the steepness and direction of a straight line on a Cartesian plane. It is calculated as the ratio of the vertical change ('rise') to the horizontal change ('run') between two distinct points: m = (y₂ - y₁) / (x₂ - x₁).

What happens if a line is vertical?

For a vertical line, the horizontal coordinate does not change (x₁ = x₂, so Δx = 0). Dividing by zero is mathematically undefined. Therefore, a vertical line has an undefined slope, a 90° angle of inclination, an infinite percentage grade, and an equation of the form x = constant.

What is the difference between slope and angle of inclination?

Slope is a dimensionless ratio (rise over run), whereas the angle of inclination is a geometric angular measurement (expressed in degrees or radians) between the line and the positive horizontal x-axis. They are directly linked by the trigonometric relation θ = arctan(m).

How do you convert slope to percent grade?

To convert slope into percentage grade (widely used in road signs, civil grading, and roofing pitch), multiply the absolute value of the slope by 100: Grade % = |m| × 100%. For instance, a slope of 0.05 equals a 5% road grade (5 feet of rise per 100 feet of run).

What does a negative slope mean?

A negative slope indicates that the line slopes downward from left to right: as x increases, y decreases. A positive slope rises from left to right, and a zero slope is perfectly horizontal.