How to Calculate Roof Pitch: Formula, Degrees & Examples
To calculate roof pitch from any matching rise and horizontal run, divide the rise by the run and multiply by 12. For example, a roof that rises 6 ft over a 12 ft horizontal run has a pitch of (6 ÷ 12) × 12 = 6:12. To convert the same roof to degrees, use tan−1(rise ÷ run), which gives 26.57°. This guide shows how to calculate pitch from rise and run, building height and width, a known angle, slope percentage and rafter geometry.
On this page

If your rise and run are measured in the same units:
Write the answer as x:12. A 5 ft rise over a 10 ft run gives (5 ÷ 10) × 12 = 6, so the roof pitch is 6:12.
What Does Roof Pitch Mean?
In common U.S. roofing use, roof pitch is usually written as the amount of vertical rise for every 12 units of horizontal run. A 4:12 roof rises 4 inches for every 12 inches it travels horizontally. A 9:12 roof rises 9 inches over the same horizontal run.
The underlying geometry is a right triangle:
- Rise is the vertical change in height.
- Run is the horizontal distance, not the sloping roof length.
- Rafter line is the sloping side of the triangle.
- Angle is measured above the horizontal.
How to Calculate Roof Pitch From Rise and Run
Rise and run is the most direct calculation and the main method behind a roof pitch calculator. You can use feet, inches, metres or centimetres as long as rise and run use the same unit.
- Find the vertical rise.
- Find the matching horizontal run.
- Divide rise by run.
- Multiply that result by 12.
- Write the answer as x:12.
Example: 6 ft rise and 12 ft run
Roof pitch = 6:12
Example: measurements that are not based on a 12-inch run
Suppose the roof rises 30 inches over a 72-inch horizontal run:
Roof pitch = 5:12
The 12 in the formula simply standardises the measured ratio to the usual x:12 format.
If you do not yet have the rise and run, see How to Measure Roof Pitch for attic, level-and-tape, ground/photo, speed-square and phone methods.
How to Calculate Roof Pitch in Degrees
Your Ahrefs keyword set shows that calculating roof pitch in degrees is the largest secondary intent after the main “how to calculate roof pitch” query. The conversion uses inverse tangent.
For an x:12 pitch, that simplifies to:
Example: convert 6:12 roof pitch to degrees
6:12 pitch = 26.57°
For quick lookups instead of manual trigonometry, use our Roof Pitch Chart.
How to Calculate Roof Pitch From an Angle
If the roof angle is already known from a drawing, digital level or inclinometer, reverse the degree calculation using tangent:
Example: calculate the pitch of a 30° roof
30° ≈ 6.93:12
A 30° roof therefore does not equal exactly 6:12. A true 6:12 roof is approximately 26.57°.
How to Calculate Roof Pitch From Building Height and Width
You can calculate pitch without directly measuring a 12-inch sample if you know the building dimensions. For a symmetrical gable with a centred ridge, first find one roof plane's rise and run.
Worked example: 24 ft span, 10 ft eaves, 16 ft ridge
Roof pitch = 6:12 = 26.57° = 50% slope
How to Calculate a Shed or Lean-To Roof Pitch
A simple shed, lean-to or mono-pitch roof has one continuous roof plane. Its run is the full horizontal distance between the low and high reference points.
Example: 4 ft rise over 16 ft
Shed roof pitch = 3:12
Do not halve the 16 ft distance as you would for a centred gable. The whole 16 ft is the run of the single roof plane.
How to Calculate Gable and Hip Roof Pitch
Gable roof
On a simple centred gable, calculate one side using its vertical rise and half the full span. If the ridge is offset, use the actual horizontal run for each side rather than assuming the pitches match.
Hip roof
A simple hip roof's common roof pitch is still determined from vertical rise and the horizontal run measured perpendicular to the ridge or toward the peak. Do not use the longer diagonal hip-rafter length as the horizontal run. GAF likewise describes hip-roof pitch from vertical rise relative to horizontal run.
How to Calculate Roof Pitch From Rafter Length
If you know the sloping rafter line length and the corresponding horizontal run, first solve for the rise using the Pythagorean theorem:
Then convert the rise and run to x:12:
Example: 13.416 ft rafter and 12 ft run
Roof pitch ≈ 6:12
If your main goal is rafter geometry rather than pitch conversion, use the Rafter Length Calculator.
How to Calculate Roof Pitch as a Percentage
Percentage slope is another way to express the same rise/run relationship:
For a 6:12 roof:
To convert a known percentage back to x:12 pitch:
For example, a 25% slope is:
25% slope = 3:12 pitch
Common Roof Pitch Calculations
| Roof pitch | Rise ÷ run | Angle | Slope | Pitch factor |
|---|---|---|---|---|
| 2:12 | 0.1667 | 9.46° | 16.7% | 1.014 |
| 3:12 | 0.2500 | 14.04° | 25.0% | 1.031 |
| 4:12 | 0.3333 | 18.43° | 33.3% | 1.054 |
| 5:12 | 0.4167 | 22.62° | 41.7% | 1.083 |
| 6:12 | 0.5000 | 26.57° | 50.0% | 1.118 |
| 8:12 | 0.6667 | 33.69° | 66.7% | 1.202 |
| 10:12 | 0.8333 | 39.81° | 83.3% | 1.302 |
| 12:12 | 1.0000 | 45.00° | 100.0% | 1.414 |
Values are mathematical conversions. For additional pitches and finer increments, use the full Roof Pitch Chart.
How to Calculate Roof Pitch Factor
Pitch factor, sometimes called slope factor or roof multiplier, compares the sloping length to its horizontal projection.
For a 6:12 roof:
This factor is useful in rafter and area calculations, but it does not by itself account for overhangs, multiple roof sections or material waste.
How Roof Pitch Affects Roof Area
Your keyword list also includes searches such as “how to calculate roof area with pitch” and “how to calculate roof square footage with pitch.” Those searches move into a different task: calculating the actual sloping surface area rather than finding the pitch itself.
For a simple roof plane with one uniform pitch, the basic relationship is:
We cover that calculation separately so this guide stays focused on pitch. Use the Roof Area Calculator when your goal is roof square footage, roofing squares or total surface area.
How Roof Pitch Affects Roof Height
If the pitch and horizontal run are known, roof rise is:
For a 6:12 pitch over a 12 ft run:
For total ridge or peak height from a reference level, use the Roof Height Calculator.
Common Roof Pitch Calculation Mistakes
Using the full gable span as the run
For a centred symmetrical gable, one roof plane's run is half the full span. Using the full building width produces a pitch that is only half as steep as the real roof.
Using rafter length as the run
Run is horizontal. The rafter is the sloping hypotenuse. They are not interchangeable.
Mixing measurement units
Rise and run must use compatible units before dividing. Six feet divided by 144 inches is meaningless until one value is converted so both use feet or both use inches.
Confusing degrees with x:12 pitch
A 30° roof is about 6.93:12, not 30:12. Degrees and x:12 pitch are different expressions of the same slope and require a trigonometric conversion.
Rounding too early
Keep extra decimal places during intermediate calculations and round the final answer. Early rounding can become noticeable when the result is later used for long rafters, large roof areas or height calculations.
Assuming every roof plane shares one pitch
Additions, porches, dormers, gambrels and mansards can have multiple slopes. Calculate each distinct roof plane from its own rise and run.
Roof Pitch Calculation FAQs
What is the formula to calculate roof pitch?
To convert any matching rise and run to the standard x:12 format, use Pitch rise = (Rise ÷ Run) × 12. A 6 ft rise over a 12 ft run gives 6:12.
How do I calculate roof pitch in degrees?
Use Angle = tan⁻¹(Rise ÷ Run). For a 6:12 roof, tan⁻¹(6 ÷ 12) = 26.57°.
How do I calculate roof pitch from rise and run?
Divide rise by horizontal run, multiply by 12, and write the answer as x:12. Rise and run must be in the same units.
How do I calculate a 4:12 pitch roof?
A 4:12 roof has a rise/run ratio of 4 ÷ 12 = 0.3333. Its angle is approximately 18.43°, its percentage slope is 33.3%, and its pitch factor is approximately 1.054.
How do I calculate a 30 degree roof pitch?
Multiply tan(30°) by 12. The result is approximately 6.928, so a 30° roof is about 6.93:12.
How do I calculate roof pitch from width?
Width alone is not enough; you also need a vertical rise or equivalent height information. For a centred symmetrical gable, the horizontal run is half the full span. Combine that run with the vertical rise to calculate pitch.
How do I calculate roof pitch from a photo?
A straight-on gable photo can provide an estimated rise/run ratio, but perspective can distort the result. The practical steps are covered in How to Measure Roof Pitch.
How do I calculate a lean-to roof pitch?
Subtract the low-side height from the high-side height to find rise. Use the full horizontal distance between those reference points as the run, then calculate (Rise ÷ Run) × 12.
Can I calculate roof pitch in centimetres?
Yes. The formula is unit-independent as long as rise and run use the same unit. For example, 50 cm rise over 100 cm run gives (50 ÷ 100) × 12 = 6:12.
Is roof pitch the same as roof angle?
They describe the same steepness but use different units. Pitch is commonly written x:12; angle is measured in degrees. A 6:12 roof is approximately 26.57°.
Calculate It Without Doing the Maths
Enter rise and run, building height and width, a known angle, or other compatible measurements. The calculator returns x:12 pitch, degrees, slope percentage, pitch factor and related geometry.
Use Roof Pitch Calculator →Technical References
- National Roofing Contractors Association — Roofing Glossary . Defines roof slope in terms of vertical rise and horizontal run and notes x:12 and degree formats.
- GAF — Steep-Slope Pro Field Guide . Provides a roof slope example using rise, run and half-span geometry.
- GAF — Guide to Hip Roofs . Describes hip-roof pitch from vertical rise relative to horizontal run.
About the Author
Daniel Brooks · Civil Engineer · FounderDaniel Brooks operates RoofPitchCalculator.org, where he develops practical roofing calculators and guides focused on clear geometry, transparent calculations and useful technical explanations.
Learn more about Daniel →