Formula library

CC BY 4.0 · JSON

Roof pitch, slope and diagonals

A slope is written three ways on site, as a pitch of rise per 12 of run, a grade in per cent or an angle, and every one of them is a right triangle. The equations convert between them, give the length along the slope and the diagonal that proves a corner square.

  • 5Formulas
  • 5Calculators that run them
  • 13Test vectors

Pitch to angle

pitch-to-angle

The angle of a roof from its pitch in rise per 12.

θ=arctan⁡(x12)
θ = arctan(x / 12)

Symbols

Pitch to angle: Symbols
SymbolMeaningMetricImperial
θAngle from horizontal, degrees°°
xRise per 12 of run——

Worked example

A pinned test vector of the Roof Pitch to Angle Calculator.

  • x = 6 (Rise per 12 of run)

gives θ = 26.5651°. The calculator's own compute function returns 26.5651°.

Calculators that run it

Test vectors

Pitch to angle: Test vectors
CalculatorInputsFormulaCalculator returns
Roof Pitch to Angle Calculatorx = 626.565126.5651°pinned
Roof Pitch to Angle Calculatorx = 418.434918.4349°pinned
Roof Pitch to Degrees Calculatorx = 626.565126.5651°pinned
Roof Pitch to Degrees Calculatorx = 6078.690178.6901°pinned

Grade in per cent

grade-percent

The grade of a slope from its rise and horizontal run.

p=100×ΔhL
p = 100 × (Δh / L)

Symbols

Grade in per cent: Symbols
SymbolMeaningMetricImperial
pGrade, per cent%%
ΔhRisemft
LHorizontal runmft

Worked example

A pinned test vector of the Slope & Grade Calculator.

  • Δh = 1 m (3.28084 ft) (Rise)
  • L = 12 m (39.3701 ft) (Horizontal run)

gives p = 8.33333%. The calculator's own compute function returns 8.33333%.

Calculators that run it

Test vectors

Grade in per cent: Test vectors
CalculatorInputsFormulaCalculator returns
Slope & Grade CalculatorΔh = 1 · L = 128.333338.33333%pinned
Slope & Grade CalculatorΔh = 0.5 · L = 22525%pinned

Slope angle

slope-angle

The angle of a slope from its rise and horizontal run.

θ=arctan⁡(ΔhL)
θ = arctan(Δh / L)

Symbols

Slope angle: Symbols
SymbolMeaningMetricImperial
θAngle from horizontal, degrees°°
ΔhRisemft
LHorizontal runmft

Worked example

A pinned test vector of the Slope & Grade Calculator.

  • Δh = 1 m (3.28084 ft) (Rise)
  • L = 12 m (39.3701 ft) (Horizontal run)

gives θ = 4.76364°. The calculator's own compute function returns 4.76364°.

Calculators that run it

Test vectors

Slope angle: Test vectors
CalculatorInputsFormulaCalculator returns
Slope & Grade CalculatorΔh = 1 · L = 124.763644.76364°
Slope & Grade CalculatorΔh = 0.5 · L = 214.036214.0362°

Common rafter length

common-rafter-length

The length of a common rafter along the slope, overhang included.

Lr=(B2+o)×1+(x12)2
Lᵣ = (B / 2 + o) × √(1 + (x / 12)²)

Symbols

Common rafter length: Symbols
SymbolMeaningMetricImperial
LrRafter length along the slopemft
BBuilding width, wall to wallmft
oHorizontal overhangmft
xPitch, rise per 12 of run——

Worked example

A pinned test vector of the Common Gable Rafter Length Calculator.

  • B = 8 m (26.2467 ft) (Building width, wall to wall)
  • o = 0.4 m (1.31234 ft) (Horizontal overhang)
  • x = 6 (Pitch, rise per 12 of run)

gives Lr = 4.91935 m (16.1396 ft). The calculator's own compute function returns 4.91935 m.

Calculators that run it

Test vectors

Common rafter length: Test vectors
CalculatorInputsFormulaCalculator returns
Common Gable Rafter Length CalculatorB = 8 · o = 0.4 · x = 64.919354.91935 mpinned
Common Gable Rafter Length CalculatorB = 10 · o = 0.5 · x = 86.610186.61018 mpinned

Diagonal of a rectangle

diagonal-of-a-rectangle

The diagonal of a rectangle, or the hypotenuse of a right triangle, from its two sides.

d=a2+b2
d = √(a² + b²)

Symbols

Diagonal of a rectangle: Symbols
SymbolMeaningMetricImperial
dDiagonalmft
aOne sidemft
bThe other sidemft

Worked example

A pinned test vector of the Squaring Calculator for Layout and Setting Out (3-4-5 Rule).

  • a = 4 m (13.1234 ft) (One side)
  • b = 3 m (9.84252 ft) (The other side)

gives d = 5 m (16.4042 ft). The calculator's own compute function returns 5 m.

Calculators that run it

Test vectors

Diagonal of a rectangle: Test vectors
CalculatorInputsFormulaCalculator returns
Squaring Calculator for Layout and Setting Out (3-4-5 Rule)a = 4 · b = 355 mpinned
Squaring Calculator for Layout and Setting Out (3-4-5 Rule)a = 8 · b = 59.433989.43398 mpinned
Squaring Calculator for Layout and Setting Out (3-4-5 Rule)a = 7.3152 · b = 4.87688.791788.79178 mpinned

Using the equations

How to read them

Pitch is rise per 12 of horizontal run, so a 6 in 12 roof has a rise-to-run ratio of 0.5 and an angle of about 26.6°.

Grade divides the rise by the horizontal run, not by the length along the slope; at gentle slopes the two are close, at steep ones they are not.

The rafter equation multiplies the horizontal run (half the span plus the overhang) by the slope factor √(1 + (x/12)²).

The 3-4-5 rule is the same equation with sides of 3 and 4: the diagonal is exactly 5. Multiples work the same way, such as 6-8-10.

Read every symbol in one column: the equation holds in either system as long as the units are not mixed.

Each row is a registry test vector, run through the equation and through the calculator. Only rows on which the two agree are published.

These are quantity equations, not design checks. Nothing here sizes a member or confirms that a structure is safe; that is for the engineer or building official responsible for the work.

Limits

Where they stop describing the job

The rafter length is to the ridge line and the tail cut; ridge board thickness and plumb cuts are taken off separately.

  • A ramp, a drain or a roof covering has a code limit on slope that these equations do not check.
  • The equation assumes the sides are straight and level; a tape sagging over a long diagonal reads long.

Sources

What the calculators cite

The citations of the calculators that run these equations, as each calculator states them.

  1. Roofing pitch is conventionally expressed as rise per 12 in of run (e.g. '6/12'); angle in degrees = arctangent(rise / 12)Cited by: Roof Pitch to Angle Calculator
  2. Roof pitch expressed as rise per 12 units of run; angle = arctan(rise / 12)Cited by: Roof Pitch to Degrees Calculator
  3. Common reference points: 4:12 = 18.43°, 6:12 = 26.57°, 12:12 = 45°Cited by: Roof Pitch to Degrees Calculator
  4. Grade percent = (rise / run) x 100; angle in degrees = arctangent(rise / run)Cited by: Slope & Grade Calculator
  5. Standard carpentry rafter-length formula: rafter length = run × √(1 + (rise/12)²), where run is the horizontal distance from wall plate to ridgeCited by: Common Gable Rafter Length Calculator
  6. Euclid, Elements, Book I, Proposition 48 (D. E. Joyce's edition, Clark University): if the square on one side of a triangle equals the squares on the other two together, the angle between those two is right — which is why any multiple of 3, 4 and 5 makes a square corner — and Proposition 47, its converse, which gives the expected diagonal √(a² + b²)Cited by: Squaring Calculator for Layout and Setting Out (3-4-5 Rule)
  7. The QUIKRETE Companies, Layout Basics for Slabs and Footers: stake out with the 3-4-5 triangular method, any multiple such as 6-8-10 or 9-12-15 giving the same result, then double-check for squareness by measuring the diagonals between opposite corners, which should be equal; batter boards set back from the work keep the linesCited by: Squaring Calculator for Layout and Setting Out (3-4-5 Rule)
  8. NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles, the law of cosines (4.42.5): the corner angle from its two sides and the diagonal across it, and, applied to the two halves of a parallelogram, d₁² + d₂² = 2(a² + b²) and d₁² − d₂² = 4ab·cos θ, from which the racked shift and angle followCited by: Squaring Calculator for Layout and Setting Out (3-4-5 Rule)

Data

Cite or reuse this family

The same equations, symbols, calculators and vectors as one JSON file.

https://craftquantities.com/formulas/roof-pitch-and-slope.json

The text and the data of the formula library are published under the Creative Commons Attribution 4.0 licence (CC BY 4.0): reuse them, in any medium and for any purpose, with a credit to Craft Quantities and a link to the page.

Cite as: Craft Quantities, “Roof pitch, slope and diagonals”, https://craftquantities.com/formulas/roof-pitch-and-slope/