Slope calculator
Calculate a slope from rise, percentage, angle or sloped length and get percent, degrees, 1:n ratio, rise and true length.
Slope calculation
Enter the two values you know: the calculator derives percentage, angle, rise, sloped length and ratio.
These values are calculation examples, not installation requirements.
Was this tool useful?
How does this tool work?
This slope calculator converts between every common way of describing an incline: percent grade, angle in degrees, 1:n ratio, rise, horizontal run and sloped length. Enter whichever pair of values you know (rise and run, a percentage, an angle or the length measured along the slope) and the other values are worked out instantly, with the calculation shown step by step. It suits roofs, access ramps, drainage falls, landscaping, roads and cycling climbs, and everything runs locally in your browser.
A slope is described by a right triangle: the horizontal run along the bottom, the rise (the vertical difference in height) on the side and the sloped length along the incline. Slope as a percentage, often called the grade, is rise ÷ run × 100. A grade of 2% therefore means 2 cm of rise for every metre of horizontal distance, or 2 ft per 100 ft.
The angle in degrees is the arctangent of rise ÷ run. Percent and degrees are not proportional: 5% is about 2.86°, 10% is about 5.71°, 50% is about 26.57° and 100% is exactly 45°, because the rise then equals the run. A slope steeper than 45° is more than 100%, so a percentage above 100 is perfectly valid.
The 1:n ratio states how many horizontal units correspond to one unit of rise: 1:20 is 5%, 1:12 is about 8.33% and 1:50 is 2%. The larger n is, the gentler the slope. Roofers in North America often use the related pitch notation x/12, which gives the rise in inches for 12 inches of run: a 6/12 pitch is 50%, or 26.57°.
Do not confuse the horizontal run with the sloped length. The sloped length is the hypotenuse of the triangle, √(run² + rise²), and is always longer than the run whenever there is a rise. For gentle slopes the difference is tiny (6.0012 m for 6 m at 2%), but on a steep roof it becomes significant and matters for rafters, coverings or the length of a ramp surface.
When you know the percentage or the angle, the calculator first rebuilds the rise for the horizontal run you entered. When you start from the sloped length, it must be longer than the run, otherwise no triangle exists. The results only describe geometry: maximum or minimum slopes for ramps, roofs, pipes or roads depend on the regulations, standards and product instructions that apply to your project.
A 10 cm rise over 1 m of horizontal run equals a 10% slope. Keep percentage, ratio and angle distinct: they describe the same geometry but use different numerical forms.
How to use this tool
Choose what you know
Rise, percentage, angle or sloped length, always together with the horizontal run.
Enter the values in metres
Measure the run horizontally, not along the slope; the results update as you type.
Read every representation
Percent, degrees, 1:n ratio, rise and sloped length are shown side by side, with the rise per horizontal metre.
Check the calculation
The calculation details show the formula with your own numbers so you can copy it into a quote or a site report.
Slope calculation formulas
Every value is derived from the same right triangle.
Percentage
slope (%) = rise ÷ horizontal run × 100
Example: 10 cm over 5 m = 2%.
Angle
angle = arctan(rise ÷ horizontal run)
The result is expressed in degrees.
Sloped length
L = √(run² + rise²)
A direct application of the Pythagorean theorem.
1:n ratio
n = horizontal run ÷ rise
A 1:20 slope corresponds to 5%.
The calculator provides geometric relationships. It does not replace the building codes, accessibility standards or manufacturer recommendations that apply to a given project.
Use cases
Roof pitch
Convert a roof angle into a percentage or x/12 pitch and get the rafter length from the horizontal span and rise.
Wheelchair and access ramps
Turn a target ratio such as 1:12 or a percentage into the horizontal length needed to climb a given step or threshold.
Grading and earthworks
Work out the level difference across a terrace, driveway or garden so surface water runs away from the building.
Drainage and pipe fall
Check the drop needed for a gutter, waste pipe or shower floor from a fall expressed in percent or in cm per metre.
Roads, hiking and cycling
Translate a road sign grade or a climb profile into degrees and elevation gain over a known distance.
Examples
Drainage fall of 2% over 6 m
6 × 2 ÷ 100 = 0.12 m, so the outlet must sit 12 cm lower than the start.
Input
Run: 6 m; slope: 2%Result
Rise 0.12 m · 1.15° · 1:50Ramp climbing 30 cm over 3.6 m
0.30 ÷ 3.6 × 100 = 8.33%, which is the 1:12 ratio often quoted for ramps.
Input
Rise: 0.30 m; run: 3.6 mResult
8.33% · 4.76° · 1:12 · length 3.613 m30° roof over a 4 m run
tan(30°) = 0.5774, so the rise is 4 × 0.5774 = 2.309 m and the rafter length is √(4² + 2.309²) = 4.619 m.
Input
Angle: 30°; run: 4 mResult
Rise 2.309 m · 57.74% · sloped length 4.619 mRafter of 4.5 m over a 4 m run
√(4.5² − 4²) = √4.25 = 2.062 m of rise.
Input
Sloped length: 4.5 m; run: 4 mResult
Rise 2.062 m · 51.54% · 27.27°Road grade of 8% over 1 km
An 8% road sign means 80 m of elevation gain per horizontal kilometre.
Input
Run: 1,000 m; slope: 8%Result
Rise 80 m · 4.57° · 1:12.5Tips and best practices
- Always check whether a specified slope refers to the horizontal run or to the length measured along the slope; on site, measure the run with a level line rather than along the ground.
- For gentle slopes, percent or cm per metre is easier to set out than degrees: 2% is simply 2 cm of fall per metre.
- Never treat percent and degrees as interchangeable: 45% is about 24.2°, not 45°, and 100% equals 45°.
- To find the run needed for a given rise and ratio 1:n, multiply the rise by n: 0.45 m of rise at 1:12 needs 5.4 m of run.
- For regulated work (accessible ramps, roof coverings, drainage pipes, roads), take the slope limits from the applicable code or manufacturer instructions and use the calculator only to convert and set them out.
Frequently asked questions
How do I calculate slope as a percentage?
Divide the rise by the horizontal run and multiply by 100. For example, 0.25 m of rise over 5 m of run gives 0.25 ÷ 5 × 100 = 5%.
How do I convert percent slope to degrees?
Take the arctangent of the percentage divided by 100: angle = arctan(% ÷ 100). A 5% slope is arctan(0.05) ≈ 2.86° and a 10% slope is about 5.71°.
How do I convert degrees to percent grade?
Use percent = tan(angle) × 100. A 30° angle gives tan(30°) × 100 ≈ 57.74%, and a 45° angle gives exactly 100%.
Is a 100% slope vertical?
No. A 100% slope means the rise equals the run, which is a 45° angle. A vertical wall would have an infinite percentage, so slopes above 100% are possible and simply steeper than 45°.
What does a 1:12 slope mean?
One unit of rise for every 12 units of horizontal run, or about 8.33% and 4.76°. The ratio is common for access ramps; check the local accessibility rules that apply to your ramp.
What is the difference between slope, grade and pitch?
They describe the same geometry. Grade usually means slope as a percentage (roads, landscaping), while pitch is common for roofs and is often written as rise per 12 units of run, such as 6/12, which equals 50% or 26.57°.
Is the sloped length the same as the horizontal distance?
No. The sloped length is the hypotenuse of the triangle and is always longer than the horizontal run when there is a rise. Plans usually dimension the horizontal run, while materials such as roof coverings follow the sloped length.
Can I use this calculator for a wheelchair ramp or a drain?
Yes for the geometry: it converts a required slope into rise and length. The maximum or minimum slope itself must come from the regulations, standards or product instructions that apply to your project.
Related tools
Keep going with these tools
Tools similar or complementary to this one.
Similar tools
Calculate gravel volume, weight, bags or bulk bags to buy.
Calculate steps, riser height, going, angle and the Blondel formula.
Calculate fence panels, posts and footing concrete.
Read next
How to calculate slope in percent, degrees and rise
How to calculate slope in percent, degrees and rise
Calculate stairs: risers, rise, tread depth and slope
Learn how to size a staircase from total rise, number of risers, tread depth, available run and the Blondel relationship.
How many roof tiles do you need? Area, pitch and waste
Estimate roof-tile quantities from the true roof area, pitch, effective tile coverage and an appropriate waste allowance.
Deck boards or pavers: how to calculate quantities
Calculate deck area, boards or pavers required, cutting allowance and the underlying material layers to plan.