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.
All formulas and computation matrices for this calculator execute directly in your browser with zero latency. Enter your parameters to see instant results.
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).
An architect designing a commercial access ramp rising 2.5 feet over a horizontal run of 30.0 feet.
A civil engineer surveying a mountain road descending 360 vertical meters over a 6,000-meter horizontal road segment.
A roofing contractor framing a roof that rises 6 inches vertically for every 12 inches of horizontal run (6/12 pitch).
Standard Slope Representations, Gradients & Regulatory Benchmarks
Comparative slope representations across construction and engineering standards.
| Application / Regulatory Benchmark | Slope Fraction (Rise/Run) | Slope Decimal (m) | Percentage Grade (%) | Angle of Inclination (θ) |
|---|---|---|---|---|
| ADA Maximum Wheelchair Ramp | 1 : 12 | 0.0833 | 8.33% | 4.76° |
| Standard Sidewalk Cross-Slope | 1 : 50 | 0.0200 | 2.00% (Drainage cap) | 1.15° |
| Plumbing Sewer Drain Pipe Pitch | 1/4" per foot (1 : 48) | 0.0208 | 2.08% | 1.19° |
| Low-Slope Residential Roof | 3 : 12 | 0.2500 | 25.00% | 14.04° |
| Standard Conventional Roof Pitch | 6 : 12 | 0.5000 | 50.00% | 26.57° |
| Steep-Slope Gable Roof Pitch | 9 : 12 | 0.7500 | 75.00% | 36.87° |
| Severe 45-Degree Grade | 12 : 12 (1 : 1) | 1.0000 | 100.00% | 45.00° |
| Vertical Wall | 1 : 0 | Undefined (∞) | Infinite | 90.00° |
* ADA Standards for Accessible Design Section 405 (Ramps).
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₂).
Rate of vertical change per unit horizontal change.
y₂ - y₁ (positive is upward, negative is downward).
x₂ - x₁ (must be non-zero for finite slope).
Angle formed with positive horizontal x-axis.
Step-by-Step Worked Examples with Real Numbers
Worked Example 1: Slope Between Two Cartesian Points
Vertical rise.
Horizontal run.
Slope is +2.0.
Angle with horizontal.
Slope-intercept form.
Worked Example 2: Roof Pitch to Percentage Grade Conversion
Rise over run.
Road grade equivalent.
Roof pitch angle.
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
- Inverting rise and run (calculating run / rise, which is cotangent instead of slope).
- Confusing 100% slope with a 90° vertical cliff; a 100% slope is a 45° angle (rise = run).
- Assuming perpendicular lines have the same slope; perpendicular slopes are negative reciprocals (m_perp = -1/m).