Barn Roof Calculator

Work out the geometry of a gambrel (barn-style) roof: lower and upper rafter lengths, ridge height, loft width, and roof surface area from the span and the two pitches.

MeasureValue

What a Gambrel Roof Is Trying to Do

The classic barn silhouette exists for one reason: headroom. A plain gable roof over a 24 ft wide building leaves a narrow triangle of usable attic, while breaking each side into a steep lower slope and a shallow upper slope pushes the walls of that attic outward and gives you a hayloft or bonus room you can actually stand up in. The price is a harder layout: each side has two rafters meeting at a break (the knuckle), and the slopes, span, and break location all depend on each other. This calculator does that bookkeeping so you can compare layouts before cutting a board.

What You Need Before You Start

The Logic Behind the Calculation

Each half of the roof is treated as two right triangles stacked side by side. The lower rafter covers a horizontal run x₁ and rises x₁ × lower pitch ÷ 12; the upper rafter covers the rest of the half-span, x₂ = span ÷ 2 − x₁, and rises x₂ × upper pitch ÷ 12. Each rafter length is the hypotenuse of its triangle, √(run² + rise²), and the ridge height above the wall plate is the sum of the two rises. In equal-rafter mode, the calculator solves for the single rafter length R that fits the half-span: R = (span ÷ 2) ÷ (cos θ₁ + cos θ₂), where the angles come from the two pitches.

For example, a 24 ft span with a 20/12 lower pitch, a 6/12 upper pitch, and the break set 4 ft in from each wall gives a lower rafter of √(4² + 6.667²) = 7.77 ft, an upper rafter of √(8² + 4²) = 8.94 ft, a ridge 10.67 ft above the plates, and a loft 16 ft wide at the knuckle. On a 36 ft long building with a 1 ft level overhang (which adds 1.94 ft of slope on the steep section), the two sides together cover 2 × 36 × (7.77 + 8.94 + 1.94) ≈ 1,344 sq ft, or about 13.4 roofing squares.

When the Number Might Not Match

These are line lengths along the top edge of the rafter, from the outside of the wall plate to the knuckle and from the knuckle to the ridge centerline. Real cut lengths need small adjustments: half the ridge board thickness comes off the upper rafter, gusset plates or a knuckle block change the joint, and bird's-mouth seat cuts depend on your lumber depth. Gable-end (rake) overhangs are not included in the area, so add their width to the building length if you have them, and add a waste allowance when ordering roofing. Most importantly, this is geometry only. It says nothing about whether a given rafter size, spacing, or connection will carry snow and wind loads; a gambrel knuckle is a structurally sensitive joint, and truss design or rafter sizing should follow your local building code or an engineer's specification.

Related calculators

Hip Roof Calculator

Enter your building's length, width, pitch, and overhang to get ridge length, common and hip rafter lengths, roof area, and roofing squares.

Chandelier Size Calculator

Get the recommended chandelier diameter and hanging height from your room's dimensions.

Foundation Squaring Calculator

Check a rectangular foundation, deck, or slab layout is truly square using the diagonal or 3-4-5 method.

Duplex Construction Cost Calculator

Get a ballpark cost estimate for building a duplex, based on total square footage and finish quality.

Unit Price Calculator

Enter the price, quantity, and unit for two products to see which is the better deal per ounce, pound, gram, or liter, and by how much.