Layout math

Rise over run calculator

Enter a rise and a run, or either one with a slope. The calculator gives the slope as rise per 12, an angle in degrees, a percent grade, and a ratio, along with the diagonal between the two ends. It uses the same right-triangle formulas as the CutOnce app, and the port is checked against the app's test vectors.

Squaring a foundation, slab, or deck from its length and width instead? Diagonal calculator

Scott Brady

By

Software engineer in Seattle and DIY builder who builds the CutOnce construction calculator.

Updated

Enter both the way your tape reads: 3, 4, 10 ft, or 3-1/2 in. Rise and run can be any matching units; the ratio is what counts.

Slope (x/12)
9/12
Angle
36.87°
Grade
75%
Ratio (rise : run)
3 : 4
Diagonal (same units)
5
App StoreGoogle Play
Free to download. 7-day trial of everything.

What rise over run is

Rise over run is the slope of a line: the vertical change divided by the horizontal change. A rise of 3 over a run of 4 is a slope of 0.75. The same slope can be written as 9/12, 36.87 degrees, or a 75 percent grade. Rise always goes on top. Run is measured level, never along the slope.

36.87°Run 4Rise 3Diagonal 5

What to enter and what you get back

Inputs

What you know
Choose rise and run to read a slope. Choose rise and slope to get the run a ramp or a stair needs, or run and slope to get the rise or fall over a distance.
Slope
Shown in the two slope modes. Pick the form you have, then enter the number: the N of a 1:N ratio, the rise per 12, the percent grade, or the angle in degrees. Fractions such as 1/4 work.
Rise
The vertical distance between the low end and the high end, measured plumb. Type it the way a tape reads: 30, 7-3/4, 2 ft 6 in, or 2' 6".
Run
The horizontal distance between the same two ends, measured level. For a ramp or a roof this is the length on plan, which is shorter than the sloped surface.
Units
Add ft and in, or foot and inch marks, to mix feet and inches. Two bare numbers can be in any unit, as long as it is the same unit for both, and the diagonal comes back in that unit. When only one entry has a unit mark, a bare number in the other is read as inches.

Results

Slope (x/12)
Rise for every 12 units of run. This is the form a framing square and a speed square use. 3 over 4 is 9/12.
Angle
The angle of the slope above level, in degrees. It is the arctangent of rise divided by run, 36.87 degrees for 3 over 4.
Grade
Rise divided by run, times 100. Site plans, ramps, drainage, and roads are specified this way. 3 over 4 is 75 percent.
Ratio (rise : run)
The two entries reduced to the smallest whole numbers when they are whole, as in 3 : 4. Otherwise it shows the rise for a run of 1.
Diagonal
The straight-line distance between the two ends, which is the hypotenuse of the triangle. It is the length of the ramp surface, the rafter line, or the brace. For 3 and 4 it is 5.

A worked example: 3 over 4

The calculator opens with a rise of 3 and a run of 4, so these rows match the results above until you change an entry. The numbers have no unit marks, so they could be inches, feet, or meters. The slope is the same in each case.

Rise3given
Run4given
Ratio0.75 (3 : 4)3 / 4
Slope (x/12)9/120.75 x 12
Grade75%0.75 x 100
Angle36.87°atan(0.75)
Angle at the top53.13°90 - 36.87
Diagonal5sqrt(3 squared + 4 squared)

A 3-4-5 triangle is the one carpenters use to square a corner, because all three sides are whole numbers. The angle at the top, between the rise and the diagonal, is the other acute angle of the triangle. It is also the slope angle you get by mistake if you swap rise and run.

Formulas for slope, angle, and grade

Every form of a slope comes from one division, rise by run. The decimal slope, x/12, and percent are that number scaled by 1, 12, and 100, so they grow in step with each other. The angle does not grow in step: a 12/12 slope has twice the rise of a 6/12 slope, but it measures 45 degrees against 26.57.

Slope as a decimal
Divide the rise by the run. 3 / 4 is 0.75.
Slope as x/12
Multiply the decimal slope by 12. 0.75 x 12 is 9, written 9/12.
Percent grade
Multiply the decimal slope by 100. 0.75 x 100 is 75 percent.
Angle in degrees
Take the arctangent of the decimal slope. atan(0.75) is 36.87 degrees. On a phone or scientific calculator the key is marked atan or tan with a small -1, and the calculator must be in degree mode.
Ratio as 1:N
Divide the run by the rise. A 2 ft 6 in rise over a 30 ft run is 360 / 30, which is 1:12. Ramps, drainage, and metric drawings use this form.
Rise from a slope and a run
Multiply the run by the slope. A drain that falls 1/4 in per foot over 20 ft drops 1/4 x 20, which is 5 in. The run and slope mode of the calculator does this.
Run from a slope and a rise
Divide the rise by the slope. A 2 ft rise at 1:12 needs 24 ft of run. The rise and slope mode of the calculator does this.
Slope from an angle
Take the tangent of the angle. tan(42) is 0.9004, so a 42 degree slope is 10.80 in 12 and a 90.0 percent grade.
Diagonal
Square the rise and the run, add them, and take the square root. For 3 and 4: sqrt(9 + 16) is 5.

The slope for common angles. Use it when a digital level or a phone gives you degrees and the drawing asks for a pitch, a grade, or a ratio.

AngleRise per 12GradeRatio
1°0.21/121.7%1:57.29
2°0.42/123.5%1:28.64
3°0.63/125.2%1:19.08
5°1.05/128.7%1:11.43
10°2.12/1217.6%1:5.67
15°3.22/1226.8%1:3.73
20°4.37/1236.4%1:2.75
25°5.60/1246.6%1:2.14
30°6.93/1257.7%1:1.73
35°8.40/1270.0%1:1.43
40°10.07/1283.9%1:1.19
45°12.00/12100.0%1:1
50°14.30/12119.2%1:0.84
60°20.78/12173.2%1:0.58

Slope chart: ratio, pitch, angle, and grade

Low slopes, the kind used for drainage, flatwork, walks, and ramps. They are usually given as a rise per foot or as a 1:N ratio. The last column is the total rise over 10 ft of level run.

Rise per footRatioGradeAngleRise in 10 ft
1/8 in1:961.0%0.60°1-1/4 in
1/4 in1:482.1%1.19°2-1/2 in
1/2 in1:244.2%2.39°5 in
0.60 in1:205%2.86°6 in
3/4 in1:166.3%3.58°7-1/2 in
1 in1:128.3%4.76°10 in
1-1/2 in1:812.5%7.13°1 ft 3 in
2 in1:616.7%9.46°1 ft 8 in
3 in1:425%14.04°2 ft 6 in

Whole pitches from 1/12 to 12/12, the range for most roofs and stairs. The diagonal column is the sloped length for each 1 unit of run. Multiply a run by it to get the length along the slope.

PitchRatioAngleGradeDiagonal per 1 of run
1/121:124.76°8.3%1.0035
2/121:69.46°16.7%1.0138
3/121:414.04°25%1.0308
4/121:318.43°33.3%1.0541
5/121:2.422.62°41.7%1.0833
6/121:226.57°50%1.1180
7/121:1.7130.26°58.3%1.1577
8/121:1.533.69°66.7%1.2019
9/121:1.3336.87°75%1.2500
10/121:1.239.81°83.3%1.3017
11/121:1.0942.51°91.7%1.3566
12/121:145°100%1.4142

For pitches up to 24/12 with hip and valley multipliers, see the roof pitch chart.

How to measure rise and run

  1. 01

    Set a level line

    Start at the high end and run a level reference toward the low end. A 4 ft level on a straight board works for short distances. Use a string with a line level, a laser, or a water level for longer ones.

  2. 02

    Measure the run along the level line

    The run is the horizontal distance between the two ends. Pull the tape along the level line, never along the ground or the sloped surface.

  3. 03

    Measure the rise plumb

    At the low end, measure straight down from the level line to the surface. That distance is the rise. Keep the tape plumb. A tape that leans reads long.

  4. 04

    Enter both numbers

    Put the rise and the run in the calculator above. On a long slope, measure in sections and add the rises and the runs. If the slope changes along the way, each section has its own slope, and the total gives only the average.

If you can only measure along the surface, that length is the diagonal. Using it as the run makes the slope read low. On a gentle slope the error is small: a 10 ft rise measured over 100 ft of surface has a level run of 99.5 ft, so the grade is 10.1 percent while the shortcut gives 10. On a steep slope it is large: a 6 in rise over 12 in of surface is 6.9/12, and the shortcut gives 6/12.

Ramp example: a 2 ft 6 in rise at 1:12

The steepest slope allowed for a new accessible ramp is 1:12, which is 1 in of rise for every 12 in of run. A 2 ft 6 in rise at that slope needs 30 ft of run. Set the calculator to rise and slope, enter 2 ft 6 in and a ratio of 1:12, and it returns the run with the rest of these results.

Rise2 ft 6 inthe height to climb
Run30 ft30 in x 12
Slope (x/12)1/12rise / run x 12
Ratio1:12run / rise
Grade8.3%rise / run x 100
Angle4.76°atan(rise / run)
Ramp surface30 ft 1-1/4 insqrt(rise squared + run squared)

The ramp surface is only 1-1/4 in longer than the run, because the slope is so low. To make a ramp less steep, add run. The table gives the run for common rises at 1:12, 1:16, and 1:20.

RiseRun at 1:12Run at 1:16Run at 1:20Surface at 1:12
6 in6 ft8 ft10 ft6 ft 1/4 in
1 ft12 ft16 ft20 ft12 ft 1/2 in
1 ft 6 in18 ft24 ft30 ft18 ft 3/4 in
2 ft24 ft32 ft40 ft24 ft 1 in
2 ft 6 in30 ft40 ft50 ft30 ft 1-1/4 in
Houses under the IRC
A ramp serving the required egress door is limited to 1:12. Other ramps may be as steep as 1:8, and 1:8 is also allowed at the egress door where site constraints make 1:12 technically infeasible (R311.8.1). A ramp steeper than 1:12 needs a handrail on at least one side (R311.8.3). A landing is required at the top and bottom, where a door opens onto the ramp, and where the ramp changes direction. It must be at least 36 in wide, measured across the ramp (R311.8.2).
Public and commercial work under the ADA Standards
The running slope is limited to 1:12 and the cross slope to 1:48 (405.2, 405.3). At an existing site where space is limited, Table 405.2 allows 1:10 for a rise of up to 6 in and 1:8 for a rise of up to 3 in. A single run may rise no more than 30 in (405.6), and each run needs a landing at least 60 in long at the top and bottom (405.7). A run that rises more than 6 in needs handrails on both sides (405.8). The ADA Standards do not apply to a private single-family house, but they are the usual design target when a ramp is built for a wheelchair.

Slope limits in the building codes

Residential work has a handful of slope limits, and each one is written in its own form. The table converts them to a grade and an angle so they can be compared. The limits are from the 2021 IRC, the 2010 ADA Standards, and OSHA's construction rules. Your jurisdiction may enforce a different edition or its own amendments, so check locally before you build.

Where it appliesLimitGradeAngleSource
Drain pipe 3 in and larger, minimum1/8 in per ft1.0%0.60°IRC P3005.3
Impervious surfaces within 10 ft of the foundation, minimum slope away from the building2 percent2%1.15°IRC R401.3
Drain pipe 2-1/2 in and smaller, minimum1/4 in per ft2.1%1.19°IRC P3005.3
Built-up roofing, minimum (coal-tar built-up: 1/8 in 12)1/4 in 122.1%1.19°IRC R905.9.1
Ramp cross slope, maximum1:482.1%1.19°ADA 405.3
Ground next to the foundation, minimum fall away from the building6 in in 10 ft5%2.86°IRC R401.3
A walking surface steeper than this is a ramp1:205%2.86°IRC R202, ADA 106.5
Ramp at the egress door, and new accessible ramps, maximum1:128.3%4.76°IRC R311.8.1, ADA 405.2
Other ramps at a house, maximum1:812.5%7.13°IRC R311.8.1
Asphalt shingles, minimum2 in 1216.7%9.46°IRC R905.2.2
Low-slope roof for fall protection, at or below4 in 1233.3%18.43°29 CFR 1926.500
Steepest straight stair: tallest riser on the shallowest tread7-3/4 in over 10 in77.5%37.78°IRC R311.7.5.1, R311.7.5.2

The stair row is the steepest straight stair the IRC allows, a 7-3/4 in riser on a 10 in tread. It works out to 37.78 degrees. Spiral stairs may be steeper (R311.7.10.1). The roof rows are covered in detail on the roof pitch page.

Rise over run on a framing square

A framing square is a rise over run you can hold. The body, the long blade, stands for the run, and the tongue, the short blade, stands for the rise. Lay the square on a board with 12 in on the body and the rise on the tongue both touching the same edge. A line along the tongue is the plumb cut and a line along the body is the level cut.

That is why roof and stair slopes are written over 12. A 9/12 slope is laid out by holding 9 on the tongue and 12 on the body, with no arithmetic. Any two numbers in the same proportion mark the same angle, so 3 and 4 lay out the same cut as 9 and 12. Stair stringers use the actual rise and run of one step, such as 7-1/2 and 10.

A speed square reads the same slope from its pivot. Hold the pivot corner on the edge of the board, swing the square until that edge crosses the rise number on the COMMON scale, and mark along the square's ruled edge, the one that runs out from the pivot. That line is the plumb cut. The degree scale on the same tool gives the angle for a miter saw.

For stair layout with the square, see How to lay out stairs with a framing square.

Common mistakes

Putting run over rise
Slope is rise divided by run. Swapping them turns 3 over 4 into 4 over 3, which reads 53.13 degrees and a 133.3 percent grade.
Using the sloped length as the run
The run is level. A length measured along the surface is the diagonal, and using it as the run understates the slope. A 6 in rise over 12 in of surface is 6.9/12.
Reading percent as degrees
A 75 percent grade is 36.87 degrees. A 100 percent grade is 45 degrees, because the rise equals the run. Percent keeps climbing past 100 as the slope approaches vertical, and the angle stops at 90.
Mixing feet and inches without marking them
Typed as bare numbers, a 30 in rise over a 30 ft run reads 30 over 30, which is 45 degrees. Mark the units, or convert both to the same one first.
Expecting the angle to double with the slope
Doubling the rise doubles the grade and the x/12 number. It does not double the angle. 6/12 is 26.57 degrees and 12/12 is 45.
Leaving the landings out of a ramp
Rise over run gives the sloped runs only. Landings at the top, the bottom, and each turn add level length, and they often decide whether the ramp fits the site.
Taking one slope for ground that changes
Total rise over total run is the average. A yard that is flat for half its length and steep for the rest has the same average as an even slope. Measure the steep section separately when the limit applies to the steepest part.

Common questions

How do I turn rise over run into degrees?
Divide the rise by the run and take the arctangent of the result. A 6 in rise over a 12 in run is atan(0.5), which is 26.57 degrees. A rise of 3 over a run of 4 is atan(0.75), which is 36.87 degrees.
Is slope rise over run or run over rise?
Rise over run. The vertical change goes on top and the horizontal change goes on the bottom. A 1:12 ramp ratio is written the same way, rise first: 1 unit up for every 12 units along. Reversing them gives the slope of the same line measured from plumb, so 3 over 4 would read 53.13 degrees where the correct angle is 36.87.
What angle is a rise over run of 3/4?
36.87 degrees. The other acute angle of that triangle is 53.13 degrees, and the diagonal is 5 in the same unit. Two similar-looking slopes are much flatter: 3 in 12 is 14.04 degrees, and 3/4 in over 12 in is 3.58 degrees.
Is percent grade the same as the angle?
No. Grade is rise divided by run, times 100. A 100 percent grade is 45 degrees, and an 8.3 percent ramp is only 4.76 degrees. The two are close to proportional on low slopes, where each 1 percent is a little over half a degree, and they separate as the slope gets steeper.
What is the difference between slope, pitch, and grade?
They are three ways of writing the same rise over run. Roofers and framers say pitch and write it over 12. Site work, roads, and ramps use grade, written as a percent. Slope is the general word and is often written as a ratio such as 1:12. A drawing in degrees is giving the same information as an angle.
Why are roof and stair slopes written as x/12?
Because 12 in is one foot, and the body of a framing square is marked to lay it out directly. A slope over 12 reads straight off the square with no conversion, and it stays the same whatever the length of the rafter. It also gives the rise per foot of run at a glance.
How long does a ramp need to be?
Divide the rise by the slope, or set the calculator to rise and slope. At 1:12, multiply the rise by 12: a 2 ft rise needs 24 ft of run. A 4 ft rise needs 48 ft of run. Under the ADA Standards no single run may rise more than 30 in, so that ramp is built as 2 runs with a 60 in landing between them, and it covers at least 53 ft before the top and bottom landings.
What is 1/4 in per foot as a percent and an angle?
It is a 2.1 percent grade, 1.19 degrees, and a ratio of 1:48. Plumbing codes round it to 2 percent. Over 20 ft it falls 5 in.
What run do I use for a driveway or road grade?
The level run. A 10 ft rise over 100 ft of level run is a 10 percent grade. If the 100 ft was measured along the pavement, the level run is 99.5 ft and the grade is 10.1 percent. Survey and site plan distances are level distances.
How do I find the slope between two points?
Subtract the heights to get the rise and subtract the horizontal positions to get the run, then divide. From (2, 3) to (6, 6) the rise is 3 and the run is 4, so the slope is 0.75. A line that goes down from left to right has a negative slope. This calculator takes the rise and the run as positive measurements, so enter the size of the drop.
How do I get the rise from an angle and a run?
Multiply the run by the tangent of the angle. A 42 degree slope over 10 ft of run rises 10 ft x 0.9004, which is 9 ft 1/16 in. To skip the arithmetic, set the calculator to run and slope and choose degrees.
What does a 5/12 slope mean?
It rises 5 in for every 12 in of level run. That is 22.62 degrees and a 41.7 percent grade. Over a 10 ft run it rises 4 ft 2 in.
How steep is a 12 percent slope?
6.84 degrees. It rises 12 units for every 100 units of run, which is about 1-7/16 in per foot and a ratio of 1:8.33.
Can I use feet for one entry and inches for the other?
Yes, if you mark them. The calculator reads 2 ft 6 in over 30 ft correctly. Bare numbers are taken as the same unit, so 30 over 30 would read as a 45 degree slope.
Does it work in metric?
Yes. Enter the rise and the run as bare numbers in millimeters or meters. 150 over 1800 is 1:12, an 8.3 percent grade. The diagonal comes back in the unit you entered.

The Right Angle calculator in the CutOnce app

The app solves the triangle from any two of rise, run, diagonal, and pitch, in feet, inches, and fractions or in metric, and draws the solved triangle. It works with no signal on the jobsite. The app is free to download with a 7-day trial of every calculator.

App StoreGoogle Play

See also