Gambrel Roof Calculator

Lay out a complete gambrel barn roof from the width alone or from your own pitches: ridge height, both rafter lengths, every cut angle at the knee and ridge, roof area and the usable loft width at your headroom.

Updated Method, test cases and sources on this page

Gambrel roof calculator

Start from the width only: the half-circle layout gives four equal rafters at 67.5° and 22.5° and a ridge half the span high.

ft

Outside of plate to outside of plate. A barn roof is a gambrel.

ft

Along the ridge, wall to wall.

in

Horizontal projection of the lower rafter past the wall.

in

Past each gable-end wall; adds to the roof area.

in

Half of it comes off each upper rafter.

ft

Standing height you want in the loft, measured from the top of the wall plates.

Your gambrel profile

Ridge height above plate

—

Enter the building to see the gambrel profile.

Your gambrel barn drawn to scaleEnd elevation of the barn with both roof slopes, the knee joints, the ridge height and the loft width at your headroom.
Your gambrel is drawn here to scale as you type.
Gusset (knee) cut angle
—
Lower rafter (plate line to knee)
—
Lower rafter tail
—
Lower rafter total
—
Upper rafter (knee to ridge)
—
Knee height above plate
—
Lower run (per side)
—
Upper run
—
Upper rise
—
Lower pitch
—
Upper pitch
—
Knee joint angle
—
Upper ridge plumb cut
—
Peak angle
—
Usable loft width at headroom
—
Roof area
—
Squares
—
Rafters per frame
—

The knee joint carries thrust: use plywood gussets both sides or engineered trusses. Size members with the rafter span calculator or a truss supplier.

WaitingYour profile, cut angles and loft space will appear here.

Show the math with your numbers
  1. Enter the building to see the gambrel profile.

Assumptions: symmetrical gambrel; lengths are layout-line lengths along the top edge; plate line at the outside of the wall; eave overhang is horizontal; ridge deduction applies to the upper rafters only; loft floor at plate level; no structural design is performed.

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.

Gambrel profile: steep lower rafters from the walls to the knees, flatter upper rafters to the ridge, with the lower run, upper run, knee height and ridge heightr₁r₂Hkneeridgelowerupper
The knee is where the steep lower rafter meets the flatter upper rafter. Both are mitered to half the knee angle.

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.

Why builders like it. One pattern cuts all four rafters, and on a 16 ft shed the ridge sits 8 ft above the plates with almost 10 ft of loft floor at 6 ft of headroom.

Worked example: a 24 ft barn

  1. 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.
  2. 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.
  3. 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.
  4. 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°.
  5. 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.

Ridge height, loft width and knee angles for common gambrel pitch combinations on a 24 ft span
Layout (24 ft span)Lower / upper angleRidge above plateLoft width at 6 ft 6 inKnee jointGusset cut
Classic half-circle67.5° / 22.5°12 ft 0 in18 ft 7 3/8 in135.00°67.50°
20/12 + 6/12, 3 ft run59.0° / 26.6°9 ft 6 in12 ft 0 in147.53°73.76°
18/12 + 6/12, 3 ft run56.3° / 26.6°9 ft 0 in10 ft 0 in150.26°75.13°
24/12 + 8/12, 2 ft run63.4° / 33.7°10 ft 8 in12 ft 6 in150.26°75.13°
60° + 20°, 4 ft run60.0° / 20.0°9 ft 10 1/16 in16 ft 5 15/16 in140.00°70.00°
12/12 + 4/12, 4 ft run45.0° / 18.4°6 ft 8 in1 ft 0 in153.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.

Collar ties and floor joists matter too. A loft floor tied into the wall plates resists the outward thrust; without it, the walls must be braced another way.

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.

Published · last reviewed ·
How it is checkedFive worked test cases covering custom and classic layouts, metric units and both layout errors run through the live calculator before each update. All five match to the 1/16 in, millimetre and 0.01° shown.
Method and sourcesPlane geometry for every length, height and angle, including the half-circle construction; the International Residential Code for the shingle slope notes; gusset and knee advice from common framing practice.
CorrectionsSpotted an error or an edge case we miss? Tell us. Confirmed errors are fixed and noted in the update history.
PublisherRoof Calcly, a project by Orionix Systems Inc, 9655 S Dixie Hwy, Suite 312, Miami, FL 33156.

Update history

  • Published with Classic proportions and Custom pitches modes.

Sources

  1. 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.
  2. 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.
  3. Framing practice. Plywood gussets or engineered trusses at the knee joint; member and gusset sizing belongs to an engineer or truss supplier.
  4. International yard and pound definition. 1 ft = 0.3048 m and 1 in = 25.4 mm exactly.