How the gambrel roof calculator works
A gambrel is two roof slopes on each side: a steep lower slope from the wall to the knee and a flatter upper slope from the knee to the ridge. The calculator splits the half span into the lower run and the upper run, works out the rise of each from its pitch, and adds them for the ridge height. Each rafter length is its run times its own pitch multiplier.
r₂ = W ÷ 2 − r₁
H = r₁ × p₁ ÷ 12 + r₂ × p₂ ÷ 12
Rafter = run × √(1 + (p ÷ 12)²)
Knee joint = 180° − (θ₁ − θ₂); gusset cut = knee ÷ 2
W is the span outside of the plates, r₁ the level run of the lower slope on each side, p₁ and p₂ the lower and upper pitches and θ₁, θ₂ their angles. The lower rafter gets the eave tail; the upper rafter loses half the ridge board. Roof area uses the same geometry as the gambrel shape in the roof area calculator.
The half-circle method: why 67.5° and 22.5°
Put the two eaves, both knees and the ridge on a semicircle whose radius is half the span, and the four rafters become equal chords. Each chord spans 45° of the semicircle, so the lower rafters stand at 67.5° and the upper rafters at 22.5°, and the ridge rises exactly half the span above the plates. That is the classic gambrel: every rafter the same length (2R × sin 22.5°), every joint cut at 22.5° or 67.5°, and plenty of loft. In pitch terms it is 28.97/12 below and 4.97/12 above.
Worked example: a 24 ft barn
- InputsSpan 24 ft, length 32 ft, lower 20/12 over a 3 ft run, upper 6/12, 12 in eave, 6 in gable overhang, 1.5 in ridge, 6 ft 6 in headroom.
- Knee and ridgeKnee height 3 × 20 ÷ 12 = 5 ft 0 in; upper run 12 − 3 = 9 ft, rising 9 × 6 ÷ 12 = 4 ft 6 in; ridge 9 ft 6 in above the plates.
- RaftersLower 3 × 1.9437 = 5 ft 10 in plus a 1 ft 11 5/16 in tail; upper (9 − 0.0625) × 1.1180 = 9 ft 11 15/16 in.
- AnglesSlopes 59.04° and 26.57°; knee joint 180 − 32.47 = 147.53°; gusset cut 73.76° on each rafter; ridge plumb cut 63.43°.
- Area and loftRoof area 1,177.2 sq ft (11.77 squares); 12 ft 0 in of loft floor at 6 ft 6 in of headroom. Ridge height: 9 ft 6 in.
A ridge about 9½ ft above the plates with 12 ft of standing loft is typical of US gambrel barns of this width.
Common gambrel pitch combinations
Sheds and barns mostly use a lower slope between about 55° and 75° and an upper slope between 15° and 30°. The table compares popular layouts on a 24 ft span, computed with the calculator's own formulas.
| Layout (24 ft span) | Lower / upper angle | Ridge above plate | Loft width at 6 ft 6 in | Knee joint | Gusset cut |
|---|---|---|---|---|---|
| Classic half-circle | 67.5° / 22.5° | 12 ft 0 in | 18 ft 7 3/8 in | 135.00° | 67.50° |
| 20/12 + 6/12, 3 ft run | 59.0° / 26.6° | 9 ft 6 in | 12 ft 0 in | 147.53° | 73.76° |
| 18/12 + 6/12, 3 ft run | 56.3° / 26.6° | 9 ft 0 in | 10 ft 0 in | 150.26° | 75.13° |
| 24/12 + 8/12, 2 ft run | 63.4° / 33.7° | 10 ft 8 in | 12 ft 6 in | 150.26° | 75.13° |
| 60° + 20°, 4 ft run | 60.0° / 20.0° | 9 ft 10 1/16 in | 16 ft 5 15/16 in | 140.00° | 70.00° |
| 12/12 + 4/12, 4 ft run | 45.0° / 18.4° | 6 ft 8 in | 1 ft 0 in | 153.43° | 76.72° |
Steeper lower slopes and longer lower runs raise the knee and widen the loft; flatter upper slopes keep the ridge low but drop the upper roof toward the shingle limits.
Building the knee joint
The knee is a hinge unless you make it rigid. Roof load pushes the knees outward, so each joint is tied with plywood or OSB gussets glued and nailed on both faces, or the whole frame is built as an engineered truss. Each rafter end is cut to half the knee angle so the two meet in a symmetrical miter, and the gusset covers the joint well onto both rafters. Gusset size, nailing and member sizes come from an engineer or a truss supplier; the roof truss calculator and the rafter span calculator help with the numbers.
How much loft space a gambrel gives
The steep lower slope keeps the roof close to vertical near the walls, so far more of the attic floor has full headroom than under a gable of the same height. On a 24 ft span with the ridge 9 ft 6 in above the plates, the 20/12 + 6/12 gambrel gives 12 ft 0 in of floor at 6 ft 6 in of headroom; a gable reaching the same ridge height (9.5/12) gives only 7 ft 6 15/16 in. The calculator gives the width at your headroom target for any layout.
Materials for the steep and shallow slopes
The lower slope is often steeper than 21/12, where many asphalt shingles need special steep-slope fastening; check the manufacturer's instructions. The upper slope can drop below 4/12, where the IRC requires a double layer of underlayment under shingles, and below 2/12 shingles are not permitted at all. Metal panels handle both slopes well; use the metal roofing calculator or turn the squares into bundles with the shingle calculator.
Gambrel vs mansard vs gable
A gambrel has two slopes on the two long sides and flat gable ends, like a barn. A mansard has two slopes on all four sides, like a hip roof with a steep lower band, and its area is in the roof area calculator. A gable has one slope per side. In the UK and Australia "mansard" is sometimes used loosely for a gambrel; this calculator is for the two-sided barn shape.
Metric units
Switch to m · mm to enter the span and runs in metres and the overhangs and ridge in millimetres, with pitches in degrees. All lengths come out to the nearest millimetre and the area in m².
When this result does not apply
The profile is exact for a symmetrical two-pitch gambrel; it is layout geometry, not a structural design.
- Asymmetrical barns. Different lower runs or pitches on each side need each side laid out separately.
- Curved or bell-cast eaves. Flared lower slopes do not follow straight-line geometry.
- Member sizes and gussets. The knee carries thrust: size rafters, gussets and ties with an engineer or truss supplier.
- Single-pitch rafters elsewhere. Dormers, porches and lean-tos use the rafter length calculator.
- Materials. Bundles, sheathing sheets and metal panels are counted on their own calculators.
- Loft headroom for a habitable room. Building codes set minimum ceiling heights and areas for rooms; check yours before planning a bedroom.
Frequently asked questions
What is the best angle for a gambrel roof?
The classic layout uses 67.5° for the lower slope and 22.5° for the upper slope, from the half-circle method. Most barns and sheds sit between about 55° and 75° below and 15° to 30° above, which gives good loft space and sheds water well.
What is the half-circle method?
Draw a semicircle with a radius of half the span and place the eaves, both knees and the ridge on it at 45° spacing. The four rafters become equal chords at 67.5° and 22.5°, and the ridge rises exactly half the span above the plates.
How do I calculate gambrel truss angles?
The knee joint angle is 180° minus the difference between the lower and upper slope angles, and each rafter is mitered at half of it. For 20/12 over 6/12 (59.04° and 26.57°) the knee is 147.53° and each gusset cut 73.76°; the classic layout gives 135° and 67.5°.
How tall is a gambrel roof?
The ridge height above the plates is the lower run times the lower pitch ÷ 12 plus the upper run times the upper pitch ÷ 12. A 24 ft barn at 20/12 over a 3 ft run and 6/12 above is 9 ft 6 in; the classic layout is always half the span.
How much loft space does a gambrel give?
Much more than a gable of the same height. A 24 ft gambrel at 20/12 + 6/12 has 12 ft of floor with 6 ft 6 in of headroom, while a gable reaching the same 9 ft 6 in ridge has under 8 ft.
What is the difference between a gambrel and a mansard roof?
A gambrel has two slopes on its two long sides and vertical gable ends, like a barn; a mansard has two slopes on all four sides. Both have a steep lower slope and a flatter upper slope.
About this calculator
Roof Calcly builds every calculator from a written method, tests it against worked cases before it goes live, and shows the formula, assumptions and sources on the page, so you can check any number yourself.
Update history
- Published with Classic proportions and Custom pitches modes.
Sources
- Roof geometry. Runs, rises, rafter lengths and joint angles from right triangles; the half-circle layout as four equal chords of a semicircle, derived in How it works and The half-circle method above.
- International Code Council, International Residential Code (IRC), Chapter 9, Roof Assemblies. Minimum slope for asphalt shingles and the double-underlayment requirement between 2/12 and 4/12.
- Framing practice. Plywood gussets or engineered trusses at the knee joint; member and gusset sizing belongs to an engineer or truss supplier.
- International yard and pound definition. 1 ft = 0.3048 m and 1 in = 25.4 mm exactly.