Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Grade and Slope Calculator (Percent, Degrees, Roof Pitch and Ratio, with Lengths)

Choose how to enter the slope and enter a value. The run and rise below can be left blank (if you enter one, the rise, run and length along the slope for it are calculated too).

%
Also calculate lengths (optional)
Enter the slope as a positive number without a sign, whether it goes up or down. The angle must be less than 90°.
Result and figure
Enter a slope on the left (as a percent, angle, roof pitch, ratio, or rise and run) and press "Calculate". The result will appear here.

What you can do on this page

  • Enter a slope in any one form, as a percent grade (%), an angle (degrees), a roof pitch (x/12), a ratio (1/12, 1/48 and so on) or a rise and run, and all the other forms are calculated at once
  • Enter a run (horizontal distance), and you get the rise at that slope and the length along the slope (the length of material you actually need)
  • Enter a rise, and you get the run needed to reach it at that slope (the length of a ramp or a pipe)
  • The slope is drawn as a right triangle, so you can see where the run, rise, sloped side and angle are
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
This page is about the slope of the ground, floors, roofs, pipes and so on, "how much it goes up (or down) for a given horizontal distance". To find the slope of a line through two points on a graph, use the "Slope Calculator". For the rise, run and angle of stairs with steps, use the "Stair Calculator" (both are linked in the related pages).

What is this calculation used for?

Building a wheelchair ramp at a home or store entrance (accessibility)

Under the ADA Standards for Accessible Design, a ramp's running slope may be no steeper than 1:12 (1 in of rise for every 12 in of run). To climb a 24 in rise at this slope, the run needed is \(24 \times 12 = 288\) in (24 ft), and the ramp surface is about 24.08 ft long.
If there is not enough room, a steeper 1:8 slope would need only 16 ft, but the angle becomes about 7.1° and the ADA allows it only in limited cases (existing sites with a rise of 3 in or less). The right slope depends on the use, the users and the rules that apply, so for public facilities check the ADA Standards and your local building code with an architect.

Giving drain pipes the right slope (plumbing and yard DIY)

Drain pipes and yard drains need a gentle downward slope so water flows by itself. US plumbing codes commonly require at least 1/4 in per foot for drain pipes 3 in or smaller, which is 1/48, or about 2.08%. For 10 ft of pipe, the two ends need a drop of \(10 \times 0.25 = 2.5\) in.
The longer the pipe, the more drop it needs, so checking "is the outlet low enough?" before you lay the pipe prevents finding out after backfilling that the slope is too flat. The right slope depends on the pipe size and use, so follow your local plumbing code and the manufacturer's instructions.

Finding the angle and rafter length from a roof pitch (building a shed)

US roofs are described by pitch, such as a "6/12 pitch" (rising 6 in for every 12 in of run). As an angle that is \(\arctan 0.5 \approx 26.57^\circ\), and as a percent grade it is 50%.
For a shed roof with an 8 ft run at a 4/12 pitch, the rise is \(8 \times 4 \div 12 \approx 2.67\) ft (32 in), and the length along the roof (a guide to the rafter length) is \(\sqrt{8^{2} + 2.67^{2}} \approx 8.43\) ft. Each roofing material has a minimum slope; asphalt shingles, for example, need at least 2/12, with extra underlayment below 4/12. Converting the slope before choosing materials speeds up planning.

Reading "6% grade" road signs and railway grades (driving, cycling and trains)

A "6% grade" sign means a hill that rises 6 ft for every 100 ft of horizontal distance, which is only about 3.4°. A 10% grade is about 5.7°, not 10°. On a bicycle, grades of 8–10% feel quite steep, so this helps when choosing a route.
Railways in Europe and Japan give grades in per mille (‰); 25‰ rises 25 m for every 1,000 m (2.5%, about 1.4°). US railroads use percent, and a main line grade of about 2% is already considered steep. The angle is small, but for a heavy train it is a big load, which is why railways measure grades so finely.

Setting the slope of a patio, driveway or walkway (yard work)

Patios and driveways are usually finished with a slight slope so rainwater does not puddle; about 1/4 in per foot (about 2%) is a common guide. A 10 ft deep patio at this slope drops \(10 \times 0.25 = 2.5\) in from front to back. The International Residential Code also asks the ground to fall at least 6 in within the first 10 ft away from a house foundation (5%).
On the other hand, a walkway or driveway that is too steep gets slippery in the rain or scrapes the bottom of cars, so check the slope (as a percent and an angle) from the rise and run before you design it.

Seeing where tan and arctan are used (middle and high school math)

A slope is "height ÷ base", which is exactly \(\tan\theta\) of a right triangle. Finding "what angle is a 1:12 slope?" is one of the most everyday uses of the inverse trigonometric function \(\arctan\) from high school math.
Finding the length along the slope from the run and rise is the Pythagorean theorem from middle school. Check for yourself that the formulas in your textbook connect to the real sizes of ramps and roofs.

Formulas and figures

Slope (rise over run)
Figure
Standard notation (the usual math form)
\(i\) \(=\) \(h\) \(\div\) \(L\)
In words (symbols replaced with words)
③ \(i\): slope \(=\) ① \(h\): rise \(\div\) ② \(L\): run
The formula in words
① Divide the \(h\): rise
② by the \(L\): run
③ to get the \(i\): slope ("how much it rises for every 1 of run")
Quick example
The slope of a ramp that climbs a 24 in rise over a run of 24 ft (= 288 in) is
\(i\): slope \(=\) rise (24 in) \(\div\) run (288 in)
\(24 \div 288 = \dfrac{1}{12} \approx 0.0833\)
Key idea
Slope is "how much it goes up (or down) for the horizontal distance covered". As in the figure, think of a right triangle with the run \(L\) and the rise \(h\) as its two shorter sides. The slope \(i\) is "height ÷ base", which is exactly the trigonometric ratio \(\tan\theta\) (the tangent). This is the "rise over run" you may know from school. Put the rise and run in the same units before dividing (24 in ÷ 288 in, not 24 in ÷ 24 ft). With matching units, the slope is a plain number with no unit. You divide by the horizontal distance seen from above, not by the length along the slope. The difference between the two is handled in the last formula, "rise, run and length along the slope".
Percent grade (%) and roof pitch (x/12)
Standard notation (the usual math form)
\(p\) \(=\) \(i\) \(\times\) \(100\)
\(x\) \(=\) \(i\) \(\times\) \(12\)
In words (symbols replaced with words)
③ \(p\): percent grade \(=\) ① \(i\): slope \(\times\) ② 100 (per 100 of run)
⑤ \(x\): roof pitch (x/12) \(=\) \(i\): slope \(\times\) ④ 12 (per 12 of run)
The formula in words
① Multiply the \(i\): slope
② by 100
③ to get the \(p\): percent grade (it rises \(p\) for every 100 of run)
④ Multiply the same slope \(i\) by 12
⑤ to get the \(x\): roof pitch (it rises \(x\) for every 12 of run, written x/12)
Quick example
A slope of \(i = 0.5\) (a roof that rises 6 in for every 12 in of run) as a percent grade and as a roof pitch is
\(p\): percent grade \(=\) slope (0.5) \(\times\) 100
\(x\): roof pitch \(=\) slope (0.5) \(\times\) 12
\(0.5 \times 100 = 50\ (\%)\)
\(0.5 \times 12 = 6 \quad (6/12\ \text{pitch})\)
Key idea
Percent grade is "how much it rises for every 100 of run", and roof pitch is "how much it rises for every 12 of run". Both are just different ways to show the same slope \(i\). A "6% grade" road sign means a hill that rises 6 ft for every 100 ft, and a "6/12 pitch" roof rises 6 in for every 12 in (1 ft) of run, which is 50%. In the US, roof pitch is given this way because framers measure the rise in inches for each foot (12 in) of run. Since it is a ratio, a 6/12 pitch is the same slope whatever the size of the roof. A 12/12 pitch (rise 12 for run 12) is 45°. Railways in Europe and Japan give grades in per mille (‰), "how much it rises for every 1,000 of run", which is \(i \times 1000\) (25‰ = 2.5%). US railroads use percent grades.
Ratio (1/n)
Standard notation (the usual math form)
\(n\) \(=\) \(L\) \(\div\) \(h\)
In words (symbols replaced with words)
③ \(n\): denominator (the \(n\) in \(1/n\)) \(=\) ① \(L\): run \(\div\) ② \(h\): rise
The formula in words
① Divide the \(L\): run
② by the \(h\): rise
③ to get the \(n\): denominator (a slope \(1/n\) that rises 1 for every \(n\) of run)
Quick example
A ramp with a 24 in rise and a 288 in run, written as a ratio, is
\(n\): denominator \(=\) run (288 in) \(\div\) rise (24 in)
\(288 \div 24 = 12\)
\(\dfrac{1}{n} = \dfrac{1}{12}\)
Key idea
Ramp and drain slopes are customarily written as a ratio with 1 on top, such as 1/12 (also written 1:12). The denominator \(n\) means "it rises 1 for every \(n\) of run", so the larger \(n\) is, the gentler the slope. It is also the reciprocal of the slope \(i\) (\(n = 1 \div i\)). For example, 1:12 is the maximum slope for wheelchair ramps under the ADA Standards, meaning each 1 of rise needs 12 of run. A 24 in rise then needs \(24 \times 12 = 288\) in, or 24 ft, of run. When \(n\) is not a whole number, this calculator shows it as a decimal (for example, a 6/12 roof pitch is \(12 \div 6 = 2\), so 1/2; a 5/12 pitch is 1/2.4).
Angle (degrees)
Figure
Standard notation (the usual math form)
\(\theta\) \(=\) \(\arctan\) \((\) \(i\) \()\)
In words (symbols replaced with words)
② \(\theta\): angle \(=\) \(\arctan\) \((\) ① \(i\): slope \()\)
The formula in words
① Put the \(i\): slope into the arctangent \(\arctan\) (the inverse of \(\tan\))
② to get the \(\theta\): angle
Quick example
The angle of a 1:12 ramp (\(i \approx 0.0833\)) is
\(\theta\): angle \(=\) \(\arctan\) \((\) slope (1/12) \()\)
\(\theta = \arctan\dfrac{1}{12} \approx 4.76^\circ\)
Key idea
The slope \(i\) is "height ÷ base" of a right triangle, which is \(\tan\theta\) in trigonometry. So the angle \(\theta\) is found with the inverse of \(\tan\), \(\arctan\) (the arctangent; the \(\tan^{-1}\) key on a calculator). To go from an angle to a slope, use \(i = \tan\theta\). Percent grade and angle are not proportional. 10% is about 5.7°, but 100% is 45° and even 200% is only about 63.4° (as the angle gets close to 90°, the slope grows without limit). Be careful: a 10% grade is not 10°.
Rise, run and length along the slope
Figure
Standard notation (the usual math form)
\(h\) \(=\) \(L\) \(\times\) \(i\)
\(L\) \(=\) \(h\) \(\div\) \(i\)
\(s\) \(=\) \(\sqrt{L^{2} + h^{2}}\)
In words (symbols replaced with words)
③ \(h\): rise \(=\) ① \(L\): run \(\times\) ② \(i\): slope
⑤ \(L\): run \(=\) ④ \(h\): rise \(\div\) \(i\): slope
⑦ \(s\): length along the slope \(=\) ⑥ square root of run \(L\) squared plus rise \(h\) squared
The formula in words
① Multiply the \(L\): run
② by the \(i\): slope
③ to get the \(h\): rise (when you know the run)
④ The other way around, divide the \(h\): rise by the slope \(i\)
⑤ to get the \(L\): run (when you know the rise)
⑥ Take the square root of run \(L\) squared plus rise \(h\) squared (the Pythagorean theorem)
⑦ to get the \(s\): length along the slope (the actual length of the slope)
Quick example
For a 1:12 ramp climbing a 24 in (2 ft) rise, the run needed and the length along the slope are
\(L\): run \(=\) rise (2 ft) \(\div\) slope (1/12)
\(s\): length along the slope \(=\) square root of run (24 ft) squared plus rise (2 ft) squared
\(L = 2 \div \dfrac{1}{12} = 2 \times 12 = 24\ (\mathrm{ft})\)
\(s = \sqrt{24^{2} + 2^{2}} = \sqrt{576 + 4} = \sqrt{580} \approx 24.08\ (\mathrm{ft})\)
Key idea
Rearranging the slope formula \(i = h \div L\) gives the rise from the run (\(h = L \times i\)) and the run from the rise (\(L = h \div i\)). Practical questions such as "how long a ramp do I need to climb this step at this slope?" or "how much fall does this length of pipe give?" are both this rearrangement. The length along the slope \(s\) is the actual length of the slope, the length of material you need for ramp boards, roof rafters, pipe and so on. It is the hypotenuse of the right triangle with the run and rise as its sides, so it is found with the Pythagorean theorem. For gentle slopes it is almost the same as the run (only about 0.35% longer for 1:12), but for steep slopes such as roofs the difference grows (about 11.8% longer for a 6/12 pitch and about 41% for a 12/12 pitch, 45°).
Everything about slopes starts from "rise ÷ run". Percent grade (× 100), roof pitch (× 12, written x/12), per mille (× 1000) and the ratio 1/n (denominator = run ÷ rise) are different ways to show the same value; only the angle is found with \(\arctan\) (percent and angle are not proportional). Lengths are found with \(h = L \times i\), \(L = h \div i\) and the slope length \(s = \sqrt{L^{2} + h^{2}}\).

Symbols and terms

Symbols

\(i\) eye The slope (rise ÷ run). It is said to come from the first letter of "inclination", and civil engineering drawings sometimes write slopes as \(i\). It is a plain number with no unit, equal to \(\tan\theta\).
\(h\) aitch The rise. From the first letter of "height". It is, for example, the height of a step, the height of a roof from eave to ridge, or the difference in height between the two ends of a pipe.
\(L\) ell The run (horizontal distance). This page uses the first letter of "length". It is the length of the slope seen from directly above, not the length along the slope (\(s\)).
\(p\) pee The percent grade. From the first letter of "percent". \(p = i \times 100\) means "it rises \(p\) for every 100 of run".
\(x\) ex The roof pitch. \(x = i \times 12\) means "it rises \(x\) for every 12 of run", written x/12 (for a 6/12 pitch, \(x = 6\)).
\(n\) en The denominator of the ratio \(1/n\). \(n = L \div h = 1 \div i\) means "it rises 1 for every \(n\) of run" (for 1:12, \(n = 12\)).
\(\theta\) theta The angle of the slope from the horizontal (the angle of inclination). The Greek letter theta, often used for angles. Found with \(\theta = \arctan i\).
\(s\) ess The length along the slope (the hypotenuse). This page uses the first letter of "slope". Found with \(s = \sqrt{L^{2} + h^{2}}\).
\(\tan\) tangent The tangent, the value "height ÷ base" of a right triangle. The slope \(i\) is exactly \(\tan\theta\).
\(\arctan\) arctangent, inverse tangent The arctangent. It returns "the angle whose \(\tan\) is this value", and is also written \(\tan^{-1}\). Use it to find the angle from a slope.
\(\sqrt{\ }\) square root The square root, "the positive number that gives this number when squared". It is used to find the hypotenuse with the Pythagorean theorem (example - \(\sqrt{25} = 5\)).
\(\approx\) approximately equal to The symbol for "approximately equal". It is used when a value that does not divide evenly, or the result of \(\arctan\), is rounded to a decimal.

Terms

slope How much it goes up (or down) for the horizontal distance covered, found as rise ÷ run. The same slope can be shown in many forms, as a percent grade (%), a roof pitch (x/12), per mille (‰), a ratio (1/n) or an angle (°).
rise The height difference between the start and end of a slope, such as the height of a step, the height of a roof from eave to ridge, or the difference in height between the inlet and outlet of a pipe (also called the fall or drop).
run The horizontal distance from the start to the end of a slope, seen from directly above. It is always shorter than the length measured along the slope. In slope calculations, the rise is divided by this run.
hypotenuse The longest side of a right triangle, opposite the right angle. In a slope diagram it is the slope itself, and its length is the length along the slope.
length along the slope The actual length measured along the slope (the length of the hypotenuse). It is the length of material you actually need, such as ramp boards, roof rafters and pipe. It is found from the run and rise with the Pythagorean theorem.
percent grade A way to give a slope as "how much it rises for every 100 of run". It is used on road signs (such as "6% grade") and in site grading plans. Slope × 100.
per mille Parts per thousand (symbol ‰). Railways in Europe and Japan give grades such as "25‰", which rises 25 m for every 1,000 m of run. Slope × 1000 (25‰ = 2.5%).
roof pitch The US way to give roof slopes, as the rise in inches for every 12 in (1 ft) of run, written x/12 or "x in 12". A 4/12 pitch is 33.3% (about 18.4°) and a 6/12 pitch is 50% (about 26.6°). Since it is a ratio, it works the same whatever the size of the roof.
12/12 pitch A roof pitch that rises 12 for every 12 of run. The angle is 45° and the percent grade is 100%.
slope ratio A way of writing a slope that rises 1 for every n of run as 1/n (or 1:n), as in a 1:12 ramp or a 1/48 drain (1/4 in per foot). The larger n is, the gentler the slope.
angle of inclination The angle of a slope from the horizontal. It is the slope given as an angle (°), found from the slope \(i\) with \(\arctan\). Note that percent grade and angle are not proportional (10% is about 5.7°, but 100% is 45°).
tangent The trigonometric ratio \(\tan\). It is "height ÷ base" of a right triangle, which is the slope itself.
arctangent The inverse of \(\tan\) (\(\arctan\)). It returns "the angle whose \(\tan\) is this value". On a scientific calculator it is the \(\tan^{-1}\) key, and in Excel it is the ATAN function.
Pythagorean theorem The theorem that in a right triangle, base squared + height squared = hypotenuse squared. It is used to find the length along the slope from the run and rise.
drainage slope A gentle slope given to floors, the ground and pipes so that water flows away by itself. In the US it is often given in inches per foot, such as 1/4 in per foot for small drain pipes and patios (about 2%).

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
If you get stuck, going back over these topics is the quickest way forward.

Ratios and percents (Grade 6)
  • Seeing that a slope (rise ÷ run) is a kind of rate, "compared amount ÷ base amount"
  • Being able to go between decimals and percents, such as 0.05 = 5% and 0.5 = 50%
Fractions, decimals and reciprocals (Grades 5–6)
  • Being able to turn \(\dfrac{1}{12}\) into a decimal (about 0.0833), and 0.05 into a fraction such as \(\dfrac{1}{20}\)
  • Knowing that "dividing by \(\dfrac{1}{12}\)" is the same as "multiplying by 12" (multiplying by the reciprocal)
Converting units of length (Grades 4–5)
  • Knowing that 1 ft = 12 in, and being able to put the rise and run in the same units
Right triangles and the Pythagorean theorem (Grade 8)
  • Knowing that base² + height² = hypotenuse² in a right triangle (for example, 3, 4, 5)
  • Being able to picture a right triangle with the run and rise as its sides, whose hypotenuse is the length along the slope
Trigonometry, tan and inverse trig functions (Geometry, Precalculus)
  • Knowing that \(\tan\theta\) is "height ÷ base" of a right triangle, which is the slope itself
  • Knowing that \(\arctan\) (\(\tan^{-1}\)) "returns the angle from the value of \(\tan\)" (a calculator or Excel can do the arithmetic)
  • Being able to picture from the shape of the graph of \(\tan\) why percent grade and angle are not proportional (100% = 45°)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the slope (rise ÷ run)
Rise h (in) 24
Run L (in) 288
Slope i =B1/B2
Table to find the percent grade (%) and roof pitch (x/12)
Slope i 0.5
Percent grade p (%) =B1*100
Roof pitch x (x/12) =B1*12
Per mille (‰) =B1*1000
Table to find the denominator of the ratio (1/n)
Rise h (in) 24
Run L (in) 288
Denominator n (slope 1/n) =B2/B1
Table to find the angle (degrees)
Slope i =1/12
Angle θ (°) =DEGREES(ATAN(B1))
Table to find the rise, run and length along the slope
Rise h (ft) 2
Slope i =1/12
Run L (ft) =B1/B2
Length along the slope s (ft) =SQRT(B3^2+B1^2)
After pasting, the upper cells in column B are your inputs and the last row is calculated automatically.
B3 of the first table is about 0.0833 (= 1/12), the second table gives 50, 6 and 500, B3 of the third table is 12, and B2 of the fourth table is about 4.76.
"ATAN" is the function for the arctangent (arctan). It returns the answer in radians, so "DEGREES" turns it into degrees. "SQRT" is the square root and "^2" means squared.
The fifth table finds the run of 24 ft as "rise ÷ slope" and the length along the slope, about 24.08 ft, with the Pythagorean theorem. To find the rise from a run instead, change the formula in B3 to "=run*B2".

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the slope (rise ÷ run)
Rise h (in) 24
Run L (in) 288
Slope i =B1/B2
Table to find the percent grade (%) and roof pitch (x/12)
Slope i 0.5
Percent grade p (%) =B1*100
Roof pitch x (x/12) =B1*12
Per mille (‰) =B1*1000
Table to find the denominator of the ratio (1/n)
Rise h (in) 24
Run L (in) 288
Denominator n (slope 1/n) =B2/B1
Table to find the angle (degrees)
Slope i =1/12
Angle θ (°) =DEGREES(ATAN(B1))
Table to find the rise, run and length along the slope
Rise h (ft) 2
Slope i =1/12
Run L (ft) =B1/B2
Length along the slope s (ft) =SQRT(B3^2+B1^2)
The same formulas as in Excel (including the ATAN, DEGREES and SQRT functions) work as is. Copy the whole table, paste it into cell A1, and replace the numbers in column B with your own.

How to calculate it in Python

import math

rise = 2          # rise h (ft)
run = 24          # run L (ft)

gradient = rise / run                          # slope i (= tan θ)
percent = gradient * 100                       # percent grade (%)
permille = gradient * 1000                     # per mille (‰)
pitch = gradient * 12                          # roof pitch (x/12)
denominator = run / rise                       # the n in the ratio 1/n
angle_deg = math.degrees(math.atan(gradient))  # angle (°). atan returns radians, so convert to degrees
hypotenuse = math.sqrt(run ** 2 + rise ** 2)   # length along the slope (ft)

print(f"Slope: {gradient:.4f}")
print(f"Percent grade: {percent:.2f} %")
print(f"Per mille: {permille:.2f} ‰")
print(f"Roof pitch: {pitch:.2f}/12")
print(f"Ratio: 1/{denominator:.1f}")
print(f"Angle: {angle_deg:.2f} °")
print(f"Length along the slope: {hypotenuse:.3f} ft")

# The other way around: the run needed from a slope and a rise
target_gradient = 1 / 12   # target slope (1:12)
rise2 = 2                  # rise (ft)
run2 = rise2 / target_gradient
print(f"Run needed to climb {rise2} ft at a 1:12 slope: {run2:.3f} ft")
Runs with the standard library only. math.atan() is the arctangent (arctan); it returns radians, so math.degrees() turns the answer into degrees. Replace the rise and run at the top with your own numbers (in the same units) and run it.

How to write it in LaTeX and other math languages (copy and paste)

Slope (rise over run)
i = h ÷ L
i = \frac{h}{L}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>i</mi>
    <mo>=</mo>
    <mfrac><mi>h</mi><mi>L</mi></mfrac>
  </mrow>
</math>
i = h / L
h/L
i := h/L;
i = h/L;
i = h/L
Percent grade (%) and roof pitch (x/12)
p = i × 100,  x = i × 12
p = 100\,i,\quad x = 12\,i
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>p</mi><mo>=</mo><mn>100</mn><mo>&#x2062;</mo><mi>i</mi>
    <mo>,</mo>
    <mi>x</mi><mo>=</mo><mn>12</mn><mo>&#x2062;</mo><mi>i</mi>
  </mrow>
</math>
p = 100 i,  x = 12 i
{100*i, 12*i}
p := 100*i;  x := 12*i;
p = 100*i; x = 12*i;  % i is the slope (run i = h/L; first)
p = 100i, x = 12i
Ratio (1/n)
n = L ÷ h
n = \frac{L}{h}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>n</mi>
    <mo>=</mo>
    <mfrac><mi>L</mi><mi>h</mi></mfrac>
  </mrow>
</math>
n = L / h
L/h
n := L/h;
n = L/h;
n = L/h
Angle (degrees)
θ = arctan(i)
\theta = \arctan i
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>θ</mi>
    <mo>=</mo>
    <mi>arctan</mi>
    <mo>&#x2061;</mo>
    <mi>i</mi>
  </mrow>
</math>
theta = arctan(i)
ArcTan[i]*180/Pi
theta := arctan(i)*180/Pi;
theta = atand(i);  % i is the slope (run i = h/L; first)
θ = tan^(-1)(i)
Rise, run and length along the slope
h = L × i,  L = h ÷ i,  s = √(L² + h²)
h = L\,i,\quad L = \frac{h}{i},\quad s = \sqrt{L^{2} + h^{2}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>h</mi><mo>=</mo><mi>L</mi><mo>&#x2062;</mo><mi>i</mi>
    <mo>,</mo>
    <mi>L</mi><mo>=</mo><mfrac><mi>h</mi><mi>i</mi></mfrac>
    <mo>,</mo>
    <mi>s</mi><mo>=</mo>
    <msqrt><msup><mi>L</mi><mn>2</mn></msup><mo>+</mo><msup><mi>h</mi><mn>2</mn></msup></msqrt>
  </mrow>
</math>
h = L i,  L = h / i,  s = sqrt(L^2 + h^2)
{L*i, h/i, Sqrt[L^2 + h^2]}
h := L*i;  L := h/i;  s := sqrt(L^2 + h^2);
h = L*i; L = h/i; s = sqrt(L^2 + h^2);  % i is the slope (run i = h/L; first)
h = Li, L = h/i, s = √(L^2 + h^2)

How to have ChatGPT  do the calculation

You are a slope calculation assistant for construction and civil engineering. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

A ramp climbs a rise of 24 in over a run of 24 ft.
Find each of the following:
1. The slope (rise ÷ run, with both in the same units)
2. The percent grade (%), per mille (‰) and roof pitch (x/12)
3. The n in the ratio 1/n
4. The angle (degrees; use arctan and convert radians to degrees)
5. The length along the slope (Pythagorean theorem)

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.