Elevation Grade Calculator
Compute the steepness of a slope as a grade percentage, an angle in degrees, or a rise/run ratio given the horizontal distance and elevation gain. Used for roads, railroads, ramps, hiking trails, accessibility ramps, and any inclined surface.
Last updated: May 2026
Compare with similar
About this calculator
Slope (or grade) is the ratio of vertical change (rise) to horizontal change (run). This calculator can return three equivalent representations: (1) grade percentage = (rise / run) × 100; (2) angle in degrees = arctan(rise / run); (3) ratio = rise / run (as a decimal). All three describe the same slope from different perspectives. Variables: horizontalDistance is the run (horizontal extent of the slope); elevationGain is the rise (vertical extent); distanceUnit converts both inputs to a consistent scale (1 for metres, 1000 for kilometres, etc.); calculationType selects which output to return. Edge cases: horizontalDistance must be > 0; elevationGain can be negative (downhill) — though by convention grade is usually reported as positive magnitude with direction noted separately; very steep slopes approach 100% grade (45°), and grade is typically only useful below 30% (~17°) for roads. Beyond that, conversion to angle becomes more natural. Reference values: typical highway grades < 6%, freeway maximum often 6–8% (US Interstates); railroad maximum grades 2–4% (steeper requires cog or rack systems); ramp accessibility (ADA) maximum 1:12 = 8.33%; building stairs typical 30–37° (50–75% grade); hiking trail steepness varies — easy trails < 10% grade, moderate 10–20%, strenuous > 20%. Roof pitches usually expressed as rise/run (e.g., "4/12 pitch" = 4 inches of rise per 12 inches of horizontal = 33.3% grade = 18.4° angle); pitches below 2/12 are nearly flat, above 12/12 are quite steep (45°+). For railroad grades, the formula traditionally uses 100% × rise/horizontal, with thousands grade (per mille) used for international rail. Skiing slope ratings (green/blue/black) don't map cleanly to grades — they're a combination of grade, length, and terrain difficulty.
How to use
Example 1 — Highway grade. A road climbs 150 m over 1000 m horizontal distance. Enter Horizontal Distance = 1000, Elevation Gain = 150, Distance Unit = Meters (1), Result Type = Grade Percentage. Grade = (150 × 1) / (1000 × 1) × 100 = 15%. ✓ A 15% grade is very steep for a highway — most paved roads cap at 6–8% to keep heavy trucks safe in winter conditions and for fuel efficiency. The same slope as an angle: arctan(0.15) = 8.53°; as a ratio: 0.15 or 1:6.67. Example 2 — Wheelchair ramp accessibility. A ramp rises 0.4 m over 5 m horizontal distance. Enter 5, 0.4, Meters, Grade Percentage. Grade = (0.4 / 5) × 100 = 8%. ✓ This is slightly above the ADA maximum of 1:12 = 8.33% (just under 8.33% is required, and even slightly steeper is non-compliant). For a real ramp, target ≤ 7% with handrails, or 1:12 = 8.33% as the absolute regulatory maximum. Switching to Angle gives arctan(0.08) = 4.57°; Rise over Run gives 0.08 = 1:12.5 — confirming the slight non-compliance with strict 1:12 standards.
Frequently asked questions
What's the difference between grade percentage and angle in degrees?
Grade percentage is rise divided by run, expressed as a percentage. Angle is arctan(rise/run) measured from horizontal. Both describe the same slope but scale differently. At 0° angle, grade is 0%. At 45°, grade is 100% (rise equals run). At 90° (vertical), grade is undefined (run is zero). Between 0° and 45°, percentages exceed angle in degrees, slightly nonlinearly: 5% grade = 2.86°; 10% = 5.71°; 20% = 11.31°; 30% = 16.70°; 50% = 26.57°. Grade is preferred in transportation (roads, railways, conveyors) because it directly represents the proportion of vertical movement per unit horizontal travel — relevant to friction, fuel use, and braking distance. Angles are preferred in surveying, climbing, and engineering when the geometry matters. Both are correct; choose by convention or context.
How steep can roads, railways, and ramps actually be?
Each transport mode has practical limits driven by friction, safety, and physics. Roads: highway maximum typically 6–8% on US Interstates, 12% on Alpine mountain roads with switchbacks; cars can handle 30%+ in low gears but trucks struggle. Railroads: 2–4% for normal traction (steel-on-steel friction is low), up to 8% on rack railways with toothed gears, and there are tunnel-bound rack railways at 25%+ (Pilatus, Switzerland). Cable cars: virtually unlimited (vertical possible). Wheelchair ramps: 1:12 (8.33%) is the maximum legal grade under US ADA and similar international standards, with rest landings every 9 m of run. Stairs: residential 30–37°, commercial 30–35°. Skiing slopes: green 0–25% grade, blue 25–40%, black 40%+ — though the exact ratings vary by resort. Roofs: most pitched roofs are 4/12 to 8/12 (18°-33°); steep architectural roofs reach 12/12 (45°) or beyond.
How do roof pitches relate to grade percentages?
A roof pitch is rise/run expressed as inches-of-rise per 12-inches-of-run (or unitless in metric). A 4/12 pitch means 4 inches of vertical rise for every 12 inches of horizontal — a 33.3% grade or 18.4° angle. Conversion: pitch_in_12 / 12 = decimal slope = grade/100. Common roof pitches: 2/12 = 16.7% grade (16.7° angle) — minimum for asphalt shingles; 4/12 = 33.3% (18.4°) — common for ranch-style homes; 8/12 = 66.7% (33.7°) — typical residential gable; 12/12 = 100% (45°) — steep, often Victorian or barn architecture; 18/12 = 150% (56.3°) — very steep, rare. Pitches affect snow load, weather resistance, attic space, and material cost — steeper roofs shed water and snow better but use more materials. Most building codes specify minimum and maximum pitches for different roofing materials.
What are the most common mistakes computing slope?
The first is using horizontal distance vs distance-along-slope inconsistently — these differ for steep slopes. For a 30% slope (16.7°), the actual hiking distance is 4.4% longer than the horizontal projection. Maps usually show horizontal distance; hiking apps may show along-the-trail distance. The second is mixing units between rise and run: 100 m of rise over 1000 ft of run gives a wildly incorrect grade unless converted to a single unit. The third is confusing angle in degrees with angle in radians; arctan returns radians by default in most programming, and forgetting to convert to degrees gives results 57× too small (or radians × 180/π for degrees). The fourth is reading roof pitches as percentages directly — "4/12 pitch" is not "4%", it's 33.3%; pitches are rise-per-12-units, not rise-per-100. The fifth is forgetting that for very steep slopes, grade percentage exceeds 100%, but angle stays below 90°; reports of "300% grades" in mountain biking publications mean 71.6° angles, just very steep.
When should I not use this calculator?
Skip it for slopes that vary along their length — this calculator assumes a single average slope; real terrain has hills, dips, and switchbacks. Use GPS or topographic profiles to get distance-weighted average grade. Don't use it for grade adequacy on regulated structures (wheelchair ramps, building stairs, vehicle accessibility, building code compliance) without consulting the actual standard; different jurisdictions and use cases have different maximum-grade rules and additional requirements (handrails, landings, surface finish). It's the wrong tool for vertical or near-vertical surfaces; for climbing pitches, use degree angles directly. Avoid it for short ramps where the gross slope hides micro-features that matter (curb cuts, transitions, surface roughness). For terrain analysis from elevation models, use raster GIS tools that compute slope per cell and aggregate appropriately. Finally, for trail or road design where the maximum grade between any two points (not the average) matters, you need profile analysis, not a single-distance calculator.