CalculateMyRoof

Gambrel Roof Calculator

Where the knuckle sits, how tall the roof stands, how long each rafter is and the angles to cut it, plus the roof area, the gable ends and the headroom in the attic.

By Marko Visic, BSc Physics · Updated November 25, 2026

The building

Layout

All four rafters the same length, at the two pitches you choose.

Pitches, entered in

Overhangs

Your gambrel drawn to scale7 ft5 ft24 ftridge 12 ft7.61 ft60°30°

Slopes: the lower one rises tan(60°) = 1.7321 per unit of run, or 12 × 1.7321 = 20.79 in 12; the upper one tan(30°) = 0.5774, or 12 × 0.5774 = 6.93 in 12. Cosines 1 ÷ √(1 + 1.7321²) = 0.5 and 1 ÷ √(1 + 0.5774²) = 0.866, and sines 1.7321 × 0.5 = 0.8661 and 0.5774 × 0.866 = 0.5, turn a rafter's length into its run and rise.

Rafters: half the width is 24 ÷ 2 = 12 ft, which the two runs share, so each rafter is 12 ÷ (0.5 + 0.866) = 8.785 ft (8 ft 9 7/16 in) on the theory line. The knuckle sits 8.785 × 0.5 = 4.393 ft in from the wall and 8.785 × 0.8661 = 7.609 ft up; the upper rafter runs 8.785 × 0.866 = 7.608 ft and rises 8.785 × 0.5 = 4.393 ft, so the ridge stands 7.609 + 4.393 = 12.002 ft above the plate.

Between the knuckles the attic is 24 − 2 × 4.393 = 15.214 ft wide.

Cuts, off square: the lower rafter's level cut at its foot is 90 − 60 = 30°. The knuckle turns 60 − 30 = 30°, so a joint that splits the turn cuts each rafter 30 ÷ 2 = 15°. The upper rafters meet at the ridge on plumb cuts at the upper slope's angle, 30°.

Eave tail: a level 12 in overhang runs 12 ÷ 0.5 = 24 in along the lower slope and drops 12 × 1.7321 = 20.79 in below the plate.

Roof surface: one side runs 24 ÷ 12 = 2 ft of tail plus the two rafters, 8.785 + 8.785 + 2 = 19.57 ft from the eave edge to the ridge, and with the gable overhangs the roof is 30 + 2 × 12 ÷ 12 = 32 ft long: 2 × 19.57 × 32 = 1,252.48 sq ft, or 1,252.48 ÷ 100 = 12.52 squares.[2]

Gable ends: each end above the plate is two triangles under the lower rafters and two trapezoids under the upper ones, 4.393 × 7.609 + 7.608 × (7.609 + 12.002) = 182.63 sq ft, and 2 × 182.63 = 365.26 sq ft for both; the space under the roof is 182.63 × 30 = 5,478.9 cu ft.

Headroom, from the plate to the theory line:

  • At 7 ft the line is 7 ÷ 1.7321 = 4.041 ft in from each wall, leaving 24 − 2 × 4.041 = 15.918 ft of floor, 15.918 × 30 = 477.54 sq ft.[8]
  • At 5 ft the line is 5 ÷ 1.7321 = 2.887 ft in from each wall, leaving 24 − 2 × 2.887 = 18.226 ft of floor, 18.226 × 30 = 546.78 sq ft.[8]

The code asks 7 ft over habitable space, and under a sloped ceiling at least 5 ft over the room's required floor area, with half of it at 7 ft.[8] The finished floor, the rafters below the line and the ceiling all take height away, so these widths are upper limits.

Shingles: the lower slope, 12 × 1.7321 = 20.79 in 12, is not past 21:12, where the code hands asphalt shingles over to the maker's instructions.[3] The upper slope, 12 × 0.5774 = 6.93 in 12, meets the code's minimum for asphalt shingles, 2:12.[3]

A gambrel roof calculator turns a building's width and two pitches into the knuckle's position, the ridge height, both rafter lengths and the angles to cut them. Equal rafters at 60° and 30° on a 24 ft building come out at 12 ÷ (0.5 + 0.866) = 8.785 ft each, with the ridge 12.002 ft above the wall plate.

A half circle across a 24 ft span with the eaves, knuckles and ridge on it: slopes of 67.5° and 22.5°, four 9.18 ft rafters, ridge 12 ft high
With the eaves, both knuckles and the ridge on a half circle across the span, the roof stands half as tall as it is wide; split each quarter of the circle evenly and the four rafters match.

Drawing: CalculateMyRoof · CC BY 4.0 · How to reuse

How it works

A gambrel roof has two slopes on each side, a steep lower one and a flatter upper one, which meet at the knuckle. The calculator works on the rafters' theory line from the top of the wall plate at the outside of the wall, the way a framer lays out a common rafter: the total run is half the span, and each rafter's line length is the hypotenuse of its rise and run.[1] On a gambrel the two runs share that half span, and the two rises add up to the height.

The width and two pitches don't fix the knuckle on their own, so the tool takes one more rule. Equal rafters makes all four pieces the same length. Two pitches and a height takes the ridge's height above the plate. Half circle puts the eaves, the knuckles and the ridge on a half circle across the width, which sets both the height and the upper pitch from the lower one. Pitches go in as degrees or as rise in 12, and the results give both.

Worked example

A building 24 ft wide and 30 ft long, equal rafters at 60° and 30°, with 12 in eave and gable overhangs:

  • Slopes: tan(60°) = 1.7321 and tan(30°) = 0.5774; cosines 1 ÷ √(1 + 1.7321²) = 0.5 and 1 ÷ √(1 + 0.5774²) = 0.866, sines 1.7321 × 0.5 = 0.8661 and 0.5774 × 0.866 = 0.5.
  • Rafters: half the width 24 ÷ 2 = 12 ft, so each rafter is 12 ÷ (0.5 + 0.866) = 8.785 ft (8 ft 9 7/16 in).
  • Knuckle: 8.785 × 0.5 = 4.393 ft in from the wall and 8.785 × 0.8661 = 7.609 ft up. The upper rafter runs 8.785 × 0.866 = 7.608 ft and rises 8.785 × 0.5 = 4.393 ft, so the ridge stands 7.609 + 4.393 = 12.002 ft above the plate, and the attic is 24 − 2 × 4.393 = 15.214 ft wide between the knuckles.
  • Cuts: a level cut of 90 − 60 = 30° off square at the foot; the knuckle turns 60 − 30 = 30°, so each rafter is cut 30 ÷ 2 = 15° there; the upper rafters meet the ridge on 30° plumb cuts.
  • Eave tail: the level 12 in overhang runs 12 ÷ 0.5 = 24 in down the lower slope and drops 12 × 1.7321 = 20.79 in below the plate.
  • Roof surface: 24 ÷ 12 = 2 ft of tail, so a side is 8.785 + 8.785 + 2 = 19.57 ft from eave edge to ridge and the roof 30 + 2 × 12 ÷ 12 = 32 ft long: 2 × 19.57 × 32 = 1,252.48 sq ft, or 1,252.48 ÷ 100 = 12.52 squares.[2]
  • Gable ends: 4.393 × 7.609 + 7.608 × (7.609 + 12.002) = 182.63 sq ft each above the plate, 2 × 182.63 = 365.26 sq ft for both, and 182.63 × 30 = 5,478.9 cu ft under the roof.
  • Headroom: the theory line is 7 ft up at 7 ÷ 1.7321 = 4.041 ft from each wall, leaving 24 − 2 × 4.041 = 15.918 ft of floor, and 5 ft up at 5 ÷ 1.7321 = 2.887 ft, leaving 24 − 2 × 2.887 = 18.226 ft.[8]

The half-circle layout

Draw a half circle across the building with the width as its diameter, and put the eaves, both knuckles and the ridge on it. The ridge then stands half the width above the plate, at the top of the circle. The two slopes are tied as well. The angle inside the knuckle, between the two rafters, is an inscribed angle: half the 270° arc that runs from the eave around the bottom of the full circle to the ridge, or 135°. So the roof turns 45° at the knuckle wherever it sits, and the upper slope is always the lower slope less 45°.

The lower rafter is the width times the lower slope's cosine, since the triangle from one eave to the knuckle to the other eave has a right angle at the knuckle. Split the quarter circle from the eave to the ridge evenly and the lower slope is 90 − 45 ÷ 2 = 67.5°, with tan(67.5°) = 2.4142, cosine 1 ÷ √(1 + 2.4142²) = 0.3827 and sine 2.4142 × 0.3827 = 0.9239. On a 24 ft building the lower rafter is 24 × 0.3827 = 9.185 ft, which puts the knuckle 9.185 × 0.3827 = 3.515 ft in and 9.185 × 0.9239 = 8.486 ft up, under a ridge 24 ÷ 2 = 12 ft up. The upper rafter runs 12 − 3.515 = 8.485 ft and rises 12 − 8.486 = 3.514 ft, so it is √(8.485² + 3.514²) = 9.184 ft long: the four rafters match, to the rounding shown.

Choose the knuckle anywhere else on the circle and the rafters differ in length, but the height and the 45° turn stay. A lower slope of 45° or flatter has no upper slope left, so the tool asks for a steeper one.

Cutting the rafters

The tool gives each cut's angle off a square cut, so 0° is square. A lower rafter that sits on the plate or on a truss's bottom chord takes a level cut at its foot, 90° less the lower slope. At the knuckle the roof turns by the difference between the two slopes; a joint that splits the turn evenly cuts each rafter at half of it, so the two cut faces of rafters of the same depth match. At the ridge each upper rafter takes a plumb cut at the upper slope's angle.

Trusses are engineered: the code has wood trusses designed to accepted engineering practice, metal-plate-connected ones to ANSI/TPI 1, and its truss section covers roof slopes from 3:12 to 12:12.[7] The example's lower slope, 12 × 1.7321 = 20.79 in 12, is steeper than that. Rafters are sized from the code's span tables, by species, grade, spacing and load.[7] This calculator lays the roof out; it sizes no lumber, gussets or connections.

Shingles on a gambrel

Past 21:12, a 175 percent slope, the code has asphalt shingles installed by the manufacturer's approved instructions.[3] A 60° lower slope is 12 × 1.7321 = 20.79 in 12, just short of it. The evenly split half circle's 67.5° lower slope, 12 × 2.4142 = 28.97 in 12, is past it.

  • Owens Corning's Duration instructions call for 6 fasteners and 4 spots of asphalt roof cement per shingle on slopes over 21:12.[4]
  • CertainTeed's Landmark manual calls for 6 nails and 4 spots of asphalt roofing cement on steep slopes over 21:12.[5]
  • GAF's Timberline instructions treat 21:12 and steeper as mansard: nail about 6 in from the bottom of the shingle and hand-seal it.[6]

The upper slope falls under the low-slope rules instead: no asphalt shingles below 2:12, and double underlayment from 2:12 to 4:12.[3] The calculator checks both slopes against these lines.

Headroom in a gambrel attic

How much of a gambrel attic can be a room comes down to headroom. For habitable space the code asks for a ceiling height of 7 ft.[8] Under a sloped ceiling the room's required floor area needs a ceiling at least 5 ft high, and at least 50 percent of it 7 ft.[8] A habitable room needs at least 70 sq ft of floor and at least 7 ft across in every direction, and the parts under a sloping ceiling lower than 5 ft don't count toward that area.[8]

The calculator gives the floor width under each height, measured from the top of the plate to the theory line. The finished floor, the depth of the rafters below that line and the ceiling finish all come off it, so read the widths as upper limits and check the room against your framing.

Gambrel or gable: the attic

A gable of the same 24 ft width and 12.002 ft height has a slope of 12.002 ÷ 12 = 1.0002, so its roof is 7 ft up at 7 ÷ 1.0002 = 6.999 ft from each wall and leaves 24 − 2 × 6.999 = 10.002 ft of floor at that height.[8] The worked example's gambrel leaves 15.918 ft, 15.918 − 10.002 = 5.916 ft more, because its steep lower slope gains height close to the walls.

Gambrel roof formulas

  • Total run = width ÷ 2; the two runs add up to it and the two rises to the height.[1]
  • Rafter line length = √(run² + rise²).[1]
  • Equal rafters: each = total run ÷ (cos lower + cos upper).
  • Two pitches and a height: knuckle run = (height − total run × tan upper) ÷ (tan lower − tan upper).
  • Half circle: height = total run; upper slope = lower slope − 45°; lower rafter = width × cos lower.
  • Cuts off square: foot 90° − lower; knuckle (lower − upper) ÷ 2 on each rafter; ridge plumb cut = upper.
  • Eave tail = level overhang ÷ cos lower; it drops the overhang × tan lower.
  • Roof area = 2 × (lower + upper + tail) × (length + 2 × gable overhang).
  • Gable end = knuckle run × knuckle height + upper run × (knuckle height + ridge height).

Common questions

What are the angles of a gambrel roof?

Any two slopes with the lower one steeper; the code doesn't set them, though it does set the lowest slope each roof covering may go on. The half-circle layout ties them, the upper slope 45° flatter than the lower. The worked example uses 60° and 30°.

What is the upper pitch of a gambrel with a 60° lower pitch?

In the half-circle layout, 60 − 45 = 15°. With equal rafters or a set height you choose it, and the calculator places the knuckle to suit.

How do you calculate the rafter length on a gambrel roof?

Each rafter is the hypotenuse of its run and rise. With equal rafters, divide half the width by the sum of the two slopes' cosines: 12 ÷ (0.5 + 0.866) = 8.785 ft for the worked example.[1]

How tall is a gambrel roof?

The ridge stands the two rises above the plate: 7.609 + 4.393 = 12.002 ft in the worked example. In the half-circle layout it is always half the width.

How do you work out the square footage of a gambrel roof?

Add the two rafters and the eave tail for one side, multiply by the length with the gable overhangs, and double it: 2 × 19.57 × 32 = 1,252.48 sq ft in the worked example.

Do gambrel trusses need an engineer?

Wood trusses are designed to accepted engineering practice, with drawings from a registered design professional where state law requires it.[7] A lower slope steeper than 12:12 also sits outside the code's truss section, which covers slopes up to that.[7]

How much headroom does a gambrel attic have?

In the worked example, 24 − 2 × 4.041 = 15.918 ft of the 24 ft floor sits under at least 7 ft of height, measured to the theory line, before the floor and the ceiling take their share.[8]

Methodology & sources

The layout method is the U.S. Navy's Builder Basic (NAVEDTRA 14043A, October 2010), chapter 10, read on Nov 20, 2026: the total run and the rafter's line length as the hypotenuse of its rise and run.[1] The equal-rafter, height and half-circle rules are plane geometry, worked from slopes kept as their tangents, with each printed step carried into the next at the precision shown. The engine is tested on every build: equal rafters at 60° and 30° that reach half the width in height, a half circle split evenly into four rafters of one length with the knuckle on the circle, a height outside the two pitches' range turned down, and the headroom widths. The code requirements come from the 2024 IRC as published on ICC Digital Codes, read on Nov 17, 2026, and the shingle rules from the makers' installation instructions. A roofing square is NRCA's 100 sq ft.[2]

Assumptions: a rectangular building with the same two pitches on both sides; heights and lengths on the theory line from the top of the wall plate at the outside of the wall; a level eave overhang. The calculator sizes no rafters, trusses or gussets, and its headroom widths ignore the floor, the rafters' depth and the ceiling finish.

Sources

  1. [1] U.S. Navy, Naval Education and Training Professional Development and Technology Center. Builder Basic, NAVEDTRA 14043A (October 2010), Chapter 10: Rough Carpentry. pp. 10-51 and 10-63, pp. 10-51 to 10-52 and 10-57. Retrieved Nov 20, 2026. media.defense.gov
  2. [2] National Roofing Contractors Association. Roofing Guidelines glossary: Square. Retrieved Oct 9, 2026. nrca.net
  3. [3] International Code Council. 2024 International Residential Code, Chapter 9: Roof Assemblies (Oct 2026 version). Sections R905.1.1, R905.2.2, R905.2.6. Retrieved Nov 17, 2026. codes.iccsafe.org
  4. [4] Owens Corning. Duration Series Shingles installation instructions. Step 4. Retrieved Oct 28, 2026. owenscorning.com
  5. [5] CertainTeed. Shingle Applicator's Manual, Chapter 13: Landmark Series (13-03-5418-NA-EN, 01/26). Fastening, Fig. 13-4 and 13-5. Retrieved Oct 28, 2026. certainteed.widen.net
  6. [6] GAF. Timberline installation instructions for HDZ, UHDZ, ASII and CS (RESTL622-0423). Retrieved Oct 28, 2026. gaf.com
  7. [7] International Code Council. 2024 International Residential Code, Chapter 8: Roof-Ceiling Construction (Oct 2026 version). Sections R802.4.1, R802.10.2, R802.10.2.1. Retrieved Nov 13, 2026. codes.iccsafe.org
  8. [8] International Code Council. 2024 International Residential Code, Chapter 3: Building Planning (Oct 2026 version). Sections R312.1, R312.2, R312.3, R313.1. Retrieved Nov 17, 2026. codes.iccsafe.org

Change log: first published November 25, 2026.

Related

By Marko Visic, BSc Physics. Updated November 25, 2026.