Roofs

Gambrel roof calculator

A gambrel roof has a steep lower slope and a shallow upper slope on each side. Fitting it inside a half circle gives 67.5° and 22.5° with four equal rafters: on a 16 ft barn each is 6′ 1-1/2″ long and the ridge is 8 ft above the walls.

Framing Calculators editorial teamUpdated 3 sources

Calculator

Gambrel roof calculator

Barn-roof geometry: knee and ridge heights, both rafter lengths and gusset angles.

ft
°
°
More options
in

Type lengths the way you read a tape: 8' 9", 7 3/4 or 7.75. Metric: 2667 mm or 2.667 m.

16′ 0″8′ 0″5′ 7-7/8″6′ 1-1/2″6′ 1-1/2″
Ridge height8′ 0″above the wall plates
Lower rafter6′ 1-1/2″
Upper rafter6′ 1-1/2″

Gambrel truss

Knee (break) height
5′ 7-7/8″
Lower section, level width
2′ 4-1/8″
Upper section, level width
5′ 7-7/8″
Lower pitch
28.97/1267.5°
Upper pitch
4.97/1222.5°
Angle at the knee (inside)
135°
Miter at the knee, each rafter
22.5°from square, for a bisected joint
Roof surface per foot of length
24.49 sq ft per ft

How it works. Lower rise = lower width × tan(lower angle); upper rise = upper width × tan(upper angle). Rafter lengths = width ÷ cos(angle). The knee joint is mitred at half the angle between the two slopes.

What is a gambrel roof?

A gambrel roof is a two-slope roof on each side of the ridge: a steep lower slope that gives headroom in the attic and a shallow upper slope above it. It is the classic barn roof, also used on sheds, garages and Dutch Colonial houses. This barn roof calculator works out both slopes from the building width.

The half-circle gambrel

The classic barn gambrel puts all four rafter joints on a half circle whose diameter is the building width: the eaves, the two knees and the ridge sit on the arc at 45° steps. That gives a 67.5° lower slope, a 22.5° upper slope and four rafters of equal length, 0.765 times half the span. It is the default in the calculator because it is easy to lay out with a string and a nail on the shop floor.

Half-circle gambrel for common shed and barn widths
WidthRidge heightKnee heightEach rafter
8′ 0″4′ 0″2′ 9-15/16″3′ 3/4″
10′ 0″5′ 0″3′ 6-7/16″3′ 9-15/16″
12′ 0″6′ 0″4′ 2-15/16″4′ 7-1/8″
16′ 0″8′ 0″5′ 7-7/8″6′ 1-1/2″
20′ 0″10′ 0″7′ 7/8″7′ 7-7/8″
24′ 0″12′ 0″8′ 5-13/16″9′ 2-3/16″

Other gambrel angles

Another common pair is 60° and 30°, and some builders set the knee height first to get headroom in a loft. Change the angles and, under More options, the width of the lower section. The upper slope must still suit the roofing: shingles need at least 2/12 (9.5°)[2], so a 22.5° upper slope (4.97/12) is fine without double underlayment.

Cutting the trusses

  • Knee joint. Each rafter is mitred at half the angle between the slopes, (lower − upper) ÷ 2 from square: 22.5° on the half-circle layout. Join with plywood gussets on both faces.
  • Ridge. The upper rafters meet at a plumb cut, (90° − upper angle) from the rafter edge, against a ridge board or each other with a gusset.
  • Seat. The lower rafter sits on the wall plate with a birdsmouth or a gusset.

Build one truss on a flat floor, check it against the diagram, and use it as the pattern. For a single-slope outbuilding the shed roof pitch calculator is simpler, and the rafter calculator handles a regular gable.

Sizing gambrel rafters

Each slope is a rafter with its own pitch and run, so size it from the rafter span tables for that slope's horizontal span[3]. The IRC measures rafter spans on the horizontal projection[1]. The steep lower rafters carry less snow but more wind. Count the panels or squares with the roof calculator one slope at a time.

Frequently asked questions

Can I use this as a barn roof calculator?

Yes. A barn roof is usually a gambrel: enter the barn width and the two slope angles to get both rafter lengths, the knee and ridge heights and the gusset angles.

What angles are used for a gambrel roof?

The half-circle layout uses 67.5° for the lower slope and 22.5° for the upper slope. 60°/30° is another common pair.

How do I calculate a gambrel roof?

Split each side into a lower and an upper section. Rise = level width × tan(angle) and rafter length = level width ÷ cos(angle) for each.

How tall is a gambrel roof on a 16 ft shed?

With the half-circle layout the ridge is half the width above the walls: 8 ft.

What is the pitch of a 22.5° roof?

4.97/12.

Sources

  1. 2021 International Residential Code, Chapter 8: Roof-Ceiling Construction (R802 rafters) · International Code Council, accessed November 13, 2026
  2. 2021 International Residential Code, Chapter 9: Roof Assemblies (R905 minimum slopes) · International Code Council, accessed November 13, 2026
  3. Span Tables for Joists and Rafters, 2024 Edition · American Wood Council, 2023