Understanding the gambrel roof calculator — concept and principle
This calculator works out the rafter lengths, pitches, roof area and gable-end area of a gambrel roof, the barn-style roof with a steep lower slope and a flatter upper slope on each side. Builders of sheds, barns and tiny houses use it to order sheathing and roofing and to cut rafters.
How it is calculated
- Lower rafter L₁ = √(run₁² + rise₁²).
- Upper run₂ = width ÷ 2 − run₁; upper rise₂ = ridge height − rise₁; upper rafter L₂ = √(run₂² + rise₂²).
- Pitch = arctan(rise ÷ run), also shown as rise per 12 units of run.
- Roof area (both sides) = 2 × (L₁ + L₂) × building length, without overhangs.
- Loft width at the break = width − 2 × run₁.
- Gable end area = run₁ × rise₁ + loft width × rise₁ + loft width × rise₂ ÷ 2 (the five-sided outline above the wall top).
The principle
Each slope of a gambrel is the hypotenuse of a right triangle, so Pythagoras gives the rafter lengths and the arctangent gives the angles. The steep lower slope raises the walls of the loft almost vertically, which is why gambrel roofs give much more usable upstairs space than a simple gable of the same ridge height. The roof surface is a set of rectangles, each rafter length long and building length wide. The gable end is a pentagon that can be split into rectangles and triangles, or found with the shoelace formula.
Worked example
Default inputs: width 8 m, length 10 m, lower rise 2.2 m, lower run 1.2 m, ridge 3.4 m above the wall top.
- L₁ = √(1.2² + 2.2²) = 2.506 m; pitch = arctan(2.2 ÷ 1.2) = 61.4° (22 in 12).
- run₂ = 4 − 1.2 = 2.8 m; rise₂ = 3.4 − 2.2 = 1.2 m; L₂ = √(2.8² + 1.2²) = 3.046 m; pitch 23.2° (5.1 in 12).
- Roof area = 2 × (2.506 + 3.046) × 10 = 111 m².
- Loft width = 8 − 2.4 = 5.6 m.
- Gable end = 1.2 × 2.2 + 5.6 × 2.2 + 5.6 × 1.2 ÷ 2 = 2.64 + 12.32 + 3.36 = 18.32 m².
| Building length (m) | Roof area, both sides (m²) |
|---|---|
| 2.5 | 27.8 |
| 5 | 55.5 |
| 7.5 | 83.3 |
| 10 | 111 |
| 12.5 | 138.8 |
| 15 | 166.6 |
| 20 | 222.1 |
How to read the result
Rafter lengths here run along the rafter line from the wall top to the break and from the break to the ridge. Add the overhang at the eaves, and allow for the plumb and seat cuts and the thickness of the ridge board. Order roofing for the roof area plus overlaps and waste; order sheathing for both gable ends using the gable area.
Common mistakes
- Making the upper slope steeper than the lower one, which is not a gambrel.
- Forgetting eave overhangs in the roof area.
- Measuring rafter length to the outside of the wall instead of the wall top line.
- Ignoring snow and wind loads on the shallow upper slope.
Frequently asked questions
What pitch is a gambrel roof?
It has two pitches, commonly a steep lower slope and a much flatter upper slope; the example uses about 61° and 23°.
How do I calculate gambrel rafter length?
Use Pythagoras for each slope: √(run² + rise²).
Why choose a gambrel roof?
The steep lower slope gives more headroom and floor space in the loft.
Sources: D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulas, 33rd ed. (2018), Geometry section