Gambrel Roof Calculator Full calculator ↗
White barn with red trim and a two-slope gambrel roof of grey shingles, on a stone foundation under a blue sky

Engineering calculator

Gambrel roof calculator

Lay a 24 ft wide barn out on a half circle and all four rafters come out the same, 9 ft 2 3/16 in on the line: the lower ones at 67.5° (about 29 / 12), the upper ones at 22.5° (about 5 / 12), with every knee cut 22.5° off square. The knee sits 3 ft 6 3/16 in in from the wall and 8 ft 5 13/16 in up, and the ridge 12 ft above the wall line. Enter your barn or shed and get every cut, the gambrel truss with its gussets, the loft headroom and the shingles, drawn and in 3D.

Enter your roof

The barn and its two slopes

Width is the wall the trusses span, outside to outside; the ridge runs along the length. Overhangs are measured level.

The framing

Most barns and sheds are framed with site-built gambrel trusses, and this gambrel truss calculator lays one out: every cut, the gussets and the count. It cuts, counts and draws the size you choose; it does not size the lumber for your snow load.

Colors for the 3D

Wooden roof trusses joined with metal connector plates, seen from below against a blue sky

Based on your result

What you'll need

Build one truss on a full-size layout, check it against both walls, and only then build the rest in a jig made from it.

Lower rafters
Two per truss plus the barge rafters on the rakes
Calculate above
Upper rafters
Two per truss plus the barge rafters
—
Bottom chords or ceiling joists
One per truss, across the building; the loft floor
—
Plywood for gussets, ½ in
Both faces at every joint (typical practice)
—
Construction adhesive Amazon
Under every gusset, with the nails
—
Hurricane ties Amazon
If required by R802.11: one per truss end on each wall
—
Roof sheathing, 4 × 8
Roof area plus 10 % for cutting
—
Asphalt shingles
Three bundles a square plus 10 %
—
Rafter square Amazon
Marks the plumb and knee cuts
1
Framing nails Amazon
8d through the gussets; the rest per IRC Table R602.3(1)
As needed

As an Amazon Associate I earn from qualifying purchases.

The maths

How this gambrel roof calculator works

A gambrel is two roofs stacked on each side: a steep lower slope from the wall to the knee and a shallow upper one from the knee to the ridge. Fix the two angles and where they meet, and every length and cut follows.

r = span ÷ 2 · half circle: upper = lower − 45°
lower run a = r (1 + cos 2·lower) · knee height = r sin 2·lower
upper run b = r − a · upper rise = b tan upper
lines = a ÷ cos lower, b ÷ cos upper
knee cut = (lower − upper) ÷ 2 off square
trusses = length ÷ spacing, rounded up, + 1
bundles = roof area ÷ 100 × 3 × 1.10
  1. 01

    The half circle

    Draw a half circle as wide as the building and put both knees on it: the four rafters are chords of the arc and the ridge is as high as the circle's radius. Each upper slope is then 45° shallower than its lower one; at 67.5° and 22.5° the four chords are equal, which is why barn builders use it. On a 24 ft span each rafter is 9 ft 2 3/16 in on the line.

  2. 02

    Your own slopes

    Pick the lower and upper angles and where the knee goes: where both rafters come out the same length, at a run in from the wall, or at a height. At 60° and 30° with equal rafters, a 24 ft barn has its knee 4 ft 4 11/16 in in from the wall.

  3. 03

    The cuts

    The knee is a miter: each rafter is cut half the change of slope off square, so the joint bisects the bend (22.5° on a half-circle roof). The ridge and tail cuts are plumb, the slope angle off square. Board lengths run between the far points of the cuts.

  4. 04

    At the wall

    On a truss the lower rafter sits on the end of the bottom chord and a gusset ties them. Rafters on a ridge board take a birdsmouth instead, the notch held to a quarter of the depth (R802.7.1); on a steep lower slope that leaves a short seat, and the page checks the 1½ in of bearing R802.6 asks for.

  5. 05

    Loft, area and the rest

    The loft floor is the top of the bottom chords; the page finds the width with 7 ft and 5 ft of headroom under the rafters or the knee tie. It does not size that floor: the bottom chord spans the whole building, so a floor on it is sized as a floor joist for its span. The four planes with their overhangs give the sheathing and shingles; gussets are counted from ½ in plywood sheets.

Gambrel truss calculator

Gambrel truss and rafter terms

Knee (break)
Where the steep lower slope meets the shallow upper one. Its position, in from the wall and up from it, sets the shape of the whole barn and the width of the loft.
Line length
A rafter's top edge from the wall line to the knee, or from the knee to the ridge center. The drawings and the cut sheet measure along it.
Board length
The whole piece between the long points of its end cuts, tail included. Buy the next stock length up.
Knee cut
The angle off square on each rafter at the knee: half the difference between the two slopes. The two cuts meet in a straight joint that a gusset covers.
Gussets
Plywood plates on both faces of every joint of a site-built gambrel truss — heel, knee, peak and any splice. A common practice is ½ in plywood, glued and nailed with 8d nails.
Knee tie
A horizontal member between the two knees: it holds them against the upper rafters' outward thrust, stiffens the bend and is the loft ceiling. It is not the IRC's collar tie (R802.4.6), a 1 × 4 or larger in the upper third of the attic.

Good to know

Gambrel and barn style roof questions

The quickest layout is the half circle: draw an arc as wide as the building and put both knees on it, so the four rafters are chords of the arc and the ridge is half the span above the wall line. Equal chords give a 67.5° lower slope and a 22.5° upper one. On a 24 ft barn that is four 9 ft 2 3/16 in rafters (on the line), knees 3 ft 6 3/16 in in from the walls and 8 ft 5 13/16 in up, and a 12 ft rise.

With knees on a half circle the upper slope is always 45° shallower than the lower one; 67.5° and 22.5° (about 29 / 12 and 5 / 12) make all four rafters equal and every knee cut 22.5°. Builders also use other pairs, such as 60° and 30°. Keep the upper slope at 2 / 12 or steeper if it takes asphalt shingles.

There is no single best gambrel roof pitch, but the half-circle pair, 67.5° below the knee and 22.5° above it (about 29 / 12 and 5 / 12), is the classic barn shape: four equal rafters, one knee cut, the most loft for the span. A flatter lower slope, such as 60°, gives a lower barn with less loft; keep the upper slope at 4 / 12 or more to avoid a second layer of underlayment, and never under 2 / 12 for shingles.

For the 24 ft half-circle barn, each rafter is 9 ft 2 3/16 in along its top edge. With 2 × 6 lumber and a 6 in eave overhang the lower board is 11 ft 7 3/16 in from the tip of the tail to the knee, cut from a 12 ft board, and the upper board is 9 ft 2 3/16 in, from a 10 ft board.

Lay one truss out full size on a flat floor, cut the four rafters and the bottom chord, and join every joint with plywood gussets on both faces. A common practice is ½ in plywood, glued and nailed with 8d nails. Screw blocks around the first truss to make a jig, and build the rest in it so they all match. Gusseted trusses are common on farm buildings that are exempt from the building code. On any permitted building the IRC asks for trusses designed to accepted engineering practice (R802.10.2), and inspectors usually want engineered truss drawings; R105.2 exempts only small accessory structures from a permit.

Yes, but above 21 / 12 the 2021 IRC sends asphalt shingles to the manufacturer's instructions for steep slopes (R905.2.6). Those call for more nails per shingle and spots of asphalt roof cement under the tabs, so the wind cannot lift them. A half-circle barn's lower slope is about 29 / 12, so it needs them.

Asphalt shingles need at least 2 / 12, and from 2 / 12 up to 4 / 12 they need two layers of underlayment (R905.2.2). The 22.5° upper slope of a half-circle roof is about 5 / 12, which takes the normal single layer.

On the 24 ft half-circle barn with 2 × 8 bottom chords and a 2 × 6 tie at the knees, the loft has 8 ft 10 1/2 in to the underside of the knee tie and 18 ft 2 7/16 in of width with at least 7 ft of headroom. That headroom is all the page checks. For a habitable room the 2021 IRC asks for a 7 ft ceiling, and under a sloped ceiling at least 50 percent of the required floor area must have 7 ft, with no part under 5 ft counted (R305.1). The floor is a separate job: a 2 × 8 bottom chord spanning 24 ft, spliced in the middle, is a tie, not a floor joist, so a loft floor needs a beam or bearing wall under it or joists sized for the span and load (IRC Tables R502.3.1(1) and (2), live loads from Table R301.5).

The model IRC exempts one-story detached accessory buildings of up to 200 sq ft from a building permit (R105.2), but many towns lower that size or require zoning approval anyway. Check with your building department before you build.

Free calculator by Renovimo

As an Amazon Associate I earn from qualifying purchases.