TryMyCalculators logo TryMyCalculators

Slope Calculator

Calculate slope m, rise over run, percentage grade, angle of incline, roof pitch (x:12), diagonal distance, and line equation (y = mx + b). Features interactive right-triangle diagram and mixed unit conversion.

Interactive Calculation Engine
Client-Side Live Execution

All formulas and computation matrices for this calculator execute directly in your browser with zero latency. Enter your parameters to see instant results.

Engine Mode
High-Precision 64-bit
Privacy Status
100% Private (On-Device)
Audit Verification
Standard Certified
Domain Context & Real-World Use Cases

Who Uses This Calculation & Why Accuracy Matters

Civil engineers, road surveyors, landscapers, architects, roofers, and algebra students use this slope calculator to determine line gradients (m), percentage slope, pitch ratios (rise/run), angle of inclination (θ), and linear equations (y = mx + b).

1 ADA Accessible Wheelchair Ramp Compliance

An architect designing a commercial access ramp rising 2.5 feet over a horizontal run of 30.0 feet.

Calculates slope m = 2.5 / 30 = 0.0833 (1:12 slope or 8.33%), verifying compliance with ADA accessibility codes.
2 Highway Road Grade Civil Engineering

A civil engineer surveying a mountain road descending 360 vertical meters over a 6,000-meter horizontal road segment.

Calculates a 6.0% downhill road grade, determining necessary runaway truck ramp signage.
3 Residential Roof Pitch Framing

A roofing contractor framing a roof that rises 6 inches vertically for every 12 inches of horizontal run (6/12 pitch).

Computes pitch angle θ = arctan(6/12) = 26.57° and rafter multiplier factor of 1.118.
Industry Benchmarks & Reference Ranges

Standard Slope Representations, Gradients & Regulatory Benchmarks

Comparative slope representations across construction and engineering standards.

Application / Regulatory BenchmarkSlope Fraction (Rise/Run)Slope Decimal (m)Percentage Grade (%)Angle of Inclination (θ)
ADA Maximum Wheelchair Ramp1 : 120.08338.33%4.76°
Standard Sidewalk Cross-Slope1 : 500.02002.00% (Drainage cap)1.15°
Plumbing Sewer Drain Pipe Pitch1/4" per foot (1 : 48)0.02082.08%1.19°
Low-Slope Residential Roof3 : 120.250025.00%14.04°
Standard Conventional Roof Pitch6 : 120.500050.00%26.57°
Steep-Slope Gable Roof Pitch9 : 120.750075.00%36.87°
Severe 45-Degree Grade12 : 12 (1 : 1)1.0000100.00%45.00°
Vertical Wall1 : 0Undefined (∞)Infinite90.00°

* ADA Standards for Accessible Design Section 405 (Ramps).

Mathematical Framework

Slope, Grade, Pitch & Angle Mathematical Equations

Slope is the vertical change (rise) divided by horizontal change (run) between two coordinate points (x₁, y₁) and (x₂, y₂).

Slope (m) = (y₂ - y₁) / (x₂ - x₁) = Δy / Δx = Rise / Run Angle_of_Inclination (θ) = arctan(m) = tan⁻¹(m) Percent_Grade = m × 100 = (Rise / Run) × 100 Slope-Intercept_Form: y = mx + b [where b = y₁ - m × x₁] Point-Slope_Form: (y - y₁) = m × (x - x₁) Perpendicular_Slope: m_perp = -1 / m [m ≠ 0]
m: Slope Gradient

Rate of vertical change per unit horizontal change.

Δy (Rise): Vertical Displacement

y₂ - y₁ (positive is upward, negative is downward).

Δx (Run): Horizontal Displacement

x₂ - x₁ (must be non-zero for finite slope).

θ: Angle of Inclination

Angle formed with positive horizontal x-axis.

Mathematical Verification

Step-by-Step Worked Examples with Real Numbers

Example 1

Worked Example 1: Slope Between Two Cartesian Points

Input Parameters: Find slope between Point 1: (2, 3) and Point 2: (8, 15).
1
Compute Rise (Δy)
y₂ - y₁ = 15 - 3 = 12

Vertical rise.

2
Compute Run (Δx)
x₂ - x₁ = 8 - 2 = 6

Horizontal run.

3
Calculate Slope (m)
m = 12 / 6 = 2.00

Slope is +2.0.

4
Find Angle of Inclination
θ = arctan(2.0) = 63.43°

Angle with horizontal.

5
Find Line Equation (y = mx + b)
b = y₁ - m(x₁) = 3 - 2(2) = 3 - 4 = -1; Equation: y = 2x - 1

Slope-intercept form.

Example 2

Worked Example 2: Roof Pitch to Percentage Grade Conversion

Input Parameters: Convert a 5/12 roof pitch to percent grade and angle.
1
Compute Decimal Slope
5 / 12 = 0.41667

Rise over run.

2
Compute Percentage Grade
0.41667 × 100 = 41.67%

Road grade equivalent.

3
Compute Pitch Angle
arctan(0.41667) = 22.62°

Roof pitch angle.

Boundary Conditions & Accuracy Safeguards

Assumptions, Edge Cases & Common Calculation Mistakes

ℹ Underlying Algorithm Assumptions

  • Assumes standard Cartesian coordinate system with orthogonal x and y axes.
  • Horizontal lines have a slope of zero (m = 0).
  • Vertical lines have an undefined slope (division by zero: Δx = 0).

⚠ 3 Common Mistakes to Avoid

  1. Inverting rise and run (calculating run / rise, which is cotangent instead of slope).
  2. Confusing 100% slope with a 90° vertical cliff; a 100% slope is a 45° angle (rise = run).
  3. Assuming perpendicular lines have the same slope; perpendicular slopes are negative reciprocals (m_perp = -1/m).
Formula & Methodology Verification
Last Verified: January 2026 • Reviewer: Audit Board
Verified Standard: Federal Highway Administration (FHWA) Road Design Standards and ADA Title III Accessibility Guidelines.

Frequently Asked Questions

Related Calculators

Basic Math Calculator →Scientific Calculator →Fraction Calculator →Percentage Calculator →Random Number Generator →Percent Error Calculator →