Slope calculator

Turn a rise and run into a slope ratio, a percent grade, degrees and inches per foot. Know any two of rise, run, percent and degrees and get the rest, or find the slope between two points. The sum is shown on your own numbers.

Exact trigonometry, and your slope read against the ADA ramp limit and the plumbing code's drain pipe fall.

What you know

Any two of these

Fill in any two and leave the others empty. Rise is how far it climbs; run is the level distance it covers. In inches or feet you can also type 2' 6" or 30 1/2.
Free for your own website, with no account and no ads.

Put the slope calculator on your website

Paste this code into an HTML or embed block on any page. Your visitors use the calculator right there, the same as here: free, no sign-up, no ads, and nothing they type is sent anywhere.

Preview it

It fits any width from a phone up to 640 px and grows to the calculator's height. The line under it links to this page, so your visitors can see where it comes from. Every calculator you can embed

Free calculator by Billsmith

Slope1:12
Grade8.33%
See the working

Slope, worked out

Four ways to say one slope

A slope is how far something climbs (the rise) for how far it goes level (the run). A ramp that rises 2 ft over 24 ft can be written as a ratio, 1:12; a percent grade, 8.33%; an angle, 4.76°; or 1 inch per foot. They all say the same thing, and this calculator gives every one.

The formulas

Slope = rise ÷ run, with both in the same unit.

Percent grade = rise ÷ run × 100. Angle = arctan(rise ÷ run). Ratio = 1 : (run ÷ rise). Inches per foot = rise ÷ run × 12.

Back the other way: rise ÷ run = tan(angle) = percent ÷ 100, so run = rise ÷ (percent ÷ 100) and rise = run × tan(angle).

Common slopes

Common slopes as a ratio, percent grade, angle and inches per foot
RatioGradeAnglePer foot
1:961.04%0.60°1/8 in
1:482.08%1.19°1/4 in
1:502%1.15°0.24 in
1:205%2.86°0.6 in
1:128.33%4.76°1 in
1:1010%5.71°1.2 in
1:812.5%7.13°1 1/2 in
1:425%14.04°3 in
1:250%26.57°6 in
1:1.7357.74%30°6.93 in
1:1100%45°12 in

Ramps

The 2010 ADA Standards allow a ramp run no steeper than 1:12 (405.2), and each run may rise at most 30 inches before a level landing (405.6). A walking surface steeper than 1:20 counts as a ramp (106.5). For a 1:12 ramp, every inch of rise takes a foot of run: 24 inches up needs 24 feet of ramp, before landings.

Drain pipe fall

The 2021 International Plumbing Code (Table 704.1) sets the least slope for horizontal drain pipe at 1/4 inch per foot for pipe 2 1/2 inches and smaller, 1/8 inch per foot for 3 to 6 inches, and 1/16 inch per foot for 8 inches and larger. The International Residential Code (P3005.3) sets 1/4 inch per foot for 2 1/2 inches and smaller and 1/8 inch per foot for 3 inches and larger. Some states adopt a different plumbing code with its own figures, so check yours. Over a 20 ft run, 1/4 inch per foot is 5 inches of fall.

Two points

For a line through (x1, y1) and (x2, y2), the slope is m = (y2 − y1) ÷ (x2 − x1): the change in y over the change in x. The line is y = mx + b, where b = y1 − m × x1, and the distance between the points is √((x2 − x1)² + (y2 − y1)²). When x1 equals x2 the line is vertical and its slope is undefined.

Roofs

Roofers say slope as a pitch in 12: a 6/12 roof rises 6 inches for every 12 inches of run. The roof pitch calculator works in that form, gives the rafter factor and flags pitches too flat for asphalt shingles.

Questions

How do you calculate slope?

Divide the rise by the run, measured in the same unit. A path that climbs 2 feet over 24 feet of level distance has a slope of 2 ÷ 24 = 0.0833. Times 100 that is an 8.33% grade; the arctangent gives 4.76 degrees; and 24 ÷ 2 = 12 makes it a 1:12 slope.

How do you turn a slope into a percent grade?

Multiply rise ÷ run by 100. A rise of 1 foot in a run of 20 feet is 1 ÷ 20 × 100 = 5%. A 100% grade is a 45 degree slope, where the rise equals the run.

What is a 1:12 slope in degrees and percent?

4.76 degrees and an 8.33% grade: 1 inch of rise for every 12 inches of run, which is 1 inch per foot. It is the steepest running slope the 2010 ADA Standards allow for a ramp (405.2).

What slope is 1/4 inch per foot?

1:48, a 2.08% grade, or 1.19 degrees. The 2021 International Plumbing Code (Table 704.1) sets 1/4 inch per foot as the least slope for horizontal drain pipe 2 1/2 inches and smaller, and 1/8 inch per foot for 3 to 6 inch pipe.

How do you find the slope between two points?

m = (y2 − y1) ÷ (x2 − x1). From (1, 2) to (4, 6) that is (6 − 2) ÷ (4 − 1) = 4/3. The distance between them is √(3² + 4²) = 5, and the line is y = 4/3 x + 2/3. When x1 equals x2 the line is vertical and its slope is undefined.

What is the maximum slope for a wheelchair ramp?

1:12 under the 2010 ADA Standards (405.2), with each ramp run rising at most 30 inches before a landing (405.6). Existing buildings short of space may use up to 1:10 for a rise of 6 inches or less, or up to 1:8 for 3 inches or less (Table 405.2).