# Roof pitch, slope and diagonals

> Pitch to angle, grade per cent, slope angle, common rafter length and the diagonal that squares a layout, with the calculators' pinned vectors.

Page: https://craftquantities.com/formulas/roof-pitch-and-slope/ (formula reference). This is the page's Markdown copy; the HTML page is the canonical version.

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.

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

- [This family as JSON](https://craftquantities.com/formulas/roof-pitch-and-slope.json)
- [All formula families](https://craftquantities.com/formulas/)

## Pitch to angle

`pitch-to-angle`

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

θ=arctan⁡(x 12)

_θ = arctan(x / 12)_

### Symbols

**Pitch to angle: Symbols**

| Symbol | Meaning | Metric | Imperial |
|---|---|---|---|
| _θ_ | Angle from horizontal, degrees | ° | ° |
| _x_ | Rise per 12 of run | — | — |

#### Worked example

A pinned test vector of the [Roof Pitch to Angle Calculator](https://craftquantities.com/calculators/measurements-conversions/roof-pitch-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

- [Roof Pitch to Angle Calculator](https://craftquantities.com/calculators/measurements-conversions/roof-pitch-angle-calculator/) — its headline answer
- [Roof Pitch to Degrees Calculator](https://craftquantities.com/calculators/renovation-construction/roof-pitch-to-degrees-calculator/) — its headline answer

### Test vectors

**Pitch to angle: Test vectors**

| Calculator | Inputs | Formula | Calculator returns |
|---|---|---|---|
| [Roof Pitch to Angle Calculator](https://craftquantities.com/calculators/measurements-conversions/roof-pitch-angle-calculator/) | _x_ = 6 | 26.5651 | 26.5651°pinned |
| [Roof Pitch to Angle Calculator](https://craftquantities.com/calculators/measurements-conversions/roof-pitch-angle-calculator/) | _x_ = 4 | 18.4349 | 18.4349°pinned |
| [Roof Pitch to Degrees Calculator](https://craftquantities.com/calculators/renovation-construction/roof-pitch-to-degrees-calculator/) | _x_ = 6 | 26.5651 | 26.5651°pinned |
| [Roof Pitch to Degrees Calculator](https://craftquantities.com/calculators/renovation-construction/roof-pitch-to-degrees-calculator/) | _x_ = 60 | 78.6901 | 78.6901°pinned |

## Grade in per cent

`grade-percent`

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

p=100×Δh L

_p = 100 × (Δh / L)_

### Symbols

**Grade in per cent: Symbols**

| Symbol | Meaning | Metric | Imperial |
|---|---|---|---|
| _p_ | Grade, per cent | % | % |
| _Δh_ | Rise | m | ft |
| _L_ | Horizontal run | m | ft |

#### Worked example

A pinned test vector of the [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/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

- [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) — its headline answer

### Test vectors

**Grade in per cent: Test vectors**

| Calculator | Inputs | Formula | Calculator returns |
|---|---|---|---|
| [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) | _Δh_ = 1 · _L_ = 12 | 8.33333 | 8.33333%pinned |
| [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) | _Δh_ = 0.5 · _L_ = 2 | 25 | 25%pinned |

## Slope angle

`slope-angle`

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

θ=arctan⁡(Δh L)

_θ = arctan(Δh / L)_

### Symbols

**Slope angle: Symbols**

| Symbol | Meaning | Metric | Imperial |
|---|---|---|---|
| _θ_ | Angle from horizontal, degrees | ° | ° |
| _Δh_ | Rise | m | ft |
| _L_ | Horizontal run | m | ft |

#### Worked example

A pinned test vector of the [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/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

- [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) — its breakdown line “Angle”

### Test vectors

**Slope angle: Test vectors**

| Calculator | Inputs | Formula | Calculator returns |
|---|---|---|---|
| [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) | _Δh_ = 1 · _L_ = 12 | 4.76364 | 4.76364° |
| [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/slope-grade-calculator/) | _Δh_ = 0.5 · _L_ = 2 | 14.0362 | 14.0362° |

## Common rafter length

`common-rafter-length`

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

L r=(B 2+o)×1+(x 12)2

_Lᵣ = (B / 2 + o) × √(1 + (x / 12)²)_

### Symbols

**Common rafter length: Symbols**

| Symbol | Meaning | Metric | Imperial |
|---|---|---|---|
| _L_r | Rafter length along the slope | m | ft |
| _B_ | Building width, wall to wall | m | ft |
| _o_ | Horizontal overhang | m | ft |
| _x_ | Pitch, rise per 12 of run | — | — |

#### Worked example

A pinned test vector of the [Common Gable Rafter Length Calculator](https://craftquantities.com/calculators/materials-quantities/common-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 _L_r = **4.91935 m (16.1396 ft)**. The calculator's own compute function returns 4.91935 m.

### Calculators that run it

- [Common Gable Rafter Length Calculator](https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/) — its headline answer

### Test vectors

**Common rafter length: Test vectors**

| Calculator | Inputs | Formula | Calculator returns |
|---|---|---|---|
| [Common Gable Rafter Length Calculator](https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/) | _B_ = 8 · _o_ = 0.4 · _x_ = 6 | 4.91935 | 4.91935 m pinned |
| [Common Gable Rafter Length Calculator](https://craftquantities.com/calculators/materials-quantities/common-rafter-length-calculator/) | _B_ = 10 · _o_ = 0.5 · _x_ = 8 | 6.61018 | 6.61018 m pinned |

## 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=a 2+b 2

_d = √(a² + b²)_

### Symbols

**Diagonal of a rectangle: Symbols**

| Symbol | Meaning | Metric | Imperial |
|---|---|---|---|
| _d_ | Diagonal | m | ft |
| _a_ | One side | m | ft |
| _b_ | The other side | m | ft |

#### Worked example

A pinned test vector of the [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/).

- _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

- [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/) — its headline answer

### Test vectors

**Diagonal of a rectangle: Test vectors**

| Calculator | Inputs | Formula | Calculator returns |
|---|---|---|---|
| [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/) | _a_ = 4 · _b_ = 3 | 5 | 5 m pinned |
| [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/) | _a_ = 8 · _b_ = 5 | 9.43398 | 9.43398 m pinned |
| [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/) | _a_ = 7.3152 · _b_ = 4.8768 | 8.79178 | 8.79178 m pinned |

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](https://craftquantities.com/calculators/measurements-conversions/roof-pitch-angle-calculator/)
2. Roof pitch expressed as rise per 12 units of run; angle = arctan(rise / 12)Cited by: [Roof Pitch to Degrees Calculator](https://craftquantities.com/calculators/renovation-construction/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](https://craftquantities.com/calculators/renovation-construction/roof-pitch-to-degrees-calculator/)
4. Grade percent = (rise / run) x 100; angle in degrees = arctangent(rise / run)Cited by: [Slope & Grade Calculator](https://craftquantities.com/calculators/measurements-conversions/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 ridge Cited by: [Common Gable Rafter Length Calculator](https://craftquantities.com/calculators/materials-quantities/common-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²)](https://mathcs.clarku.edu/~djoyce/elements/bookI/propI48.html)Cited by: [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/)
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 lines](https://www.quikrete.com/PDFs/Projects/LayoutBasicsForSlabsAndFooters.pdf)Cited by: [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/)
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 follow](https://dlmf.nist.gov/4.42)Cited by: [Squaring Calculator for Layout and Setting Out (3-4-5 Rule)](https://craftquantities.com/calculators/measurements-conversions/layout-squaring-calculator/)

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](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/

---
Source: https://craftquantities.com/formulas/roof-pitch-and-slope/
Craft Quantities: free to read, cite and link to; the pages are not licensed for republication. Quantities only: no prices, no design and no certification.
