Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Total Rafter Length (per side)

    Total Rafter Length (per side): Gambrel Roof Calculator

    Sum of lower and upper rafter run divided by the cosine of each slope angle

Advertisement

Results

Lower Rafter Length
20.47
feet (per lower section)
Upper rafter length 9.24 ft
Total rafter per side 29.7 ft
Total roof height (rise) 23.85 ft

What Is a Gambrel Roof Calculator?

A gambrel roof — often called a barn roof — has two distinct slopes on each side: a steep lower slope and a shallower upper slope that meet at a ridge. This double-pitch design maximizes headroom in attics and lofts. This calculator works out the rafter lengths for both sections, the total vertical rise, and the combined rafter length per side, using nothing more than the roof span, the upper section width, and the two slope angles.

Cross-section of a symmetric gambrel barn roof showing two slope angles
A gambrel roof has two slopes per side: a shallow upper slope and a steep lower slope.

How to Use It

Enter the total span (the full width the roof covers), the upper section width (the horizontal distance between the two ridge-side break points), and the lower and upper slope angles measured from the horizontal. The tool returns each rafter length, the roof's total rise, and the sum of both rafters on one side so you can estimate lumber.

The Formula Explained

Each rafter is the hypotenuse of a right triangle. The lower section has a horizontal run of \(w/2 - t/2\), so its rafter length is that run divided by the cosine of the lower angle. The upper section runs \(t/2\) horizontally, giving \((t/2)/\cos\theta_U\). The vertical rise of each section equals its run times the tangent of its angle; adding them gives the total roof height.

$$H = \left(\frac{W - T}{2}\right)\tan\theta_L + \left(\frac{T}{2}\right)\tan\theta_U$$$$L = \frac{\dfrac{\text{Width} - \text{Upper Width}}{2}}{\cos\text{Lower Angle}} + \frac{\dfrac{\text{Upper Width}}{2}}{\cos\text{Upper Angle}}$$
Geometry diagram with span, upper width, rise, and rafter lengths labeled
Each rafter length comes from its horizontal run divided by the cosine of its slope angle.

Worked Example

For a 30 ft span, 16 ft upper width, a 70° lower slope and a 30° upper slope: lower run = 15 − 8 = 7 ft, so lower rafter = 7 / cos 70° ≈ 20.47 ft. Upper rafter = 8 / cos 30° ≈ 9.24 ft. Total rise = 7·tan 70° + 8·tan 30° ≈ 19.23 + 4.62 = 23.85 ft.

$$\text{lower run} = 15 - 8 = 7 \text{ ft}$$$$\text{lower rafter} = \frac{7}{\cos 70°} \approx 20.47 \text{ ft}$$$$\text{upper rafter} = \frac{8}{\cos 30°} \approx 9.24 \text{ ft}$$$$\text{total rise} = 7\cdot\tan 70° + 8\cdot\tan 30° \approx 19.23 + 4.62 = 23.85 \text{ ft}$$

FAQ

What angles should I use? Traditional gambrel roofs use roughly 60–75° for the lower slope and 25–35° for the upper slope, but you can enter any values your design calls for.

Is the result for one side? Yes — rafter lengths are per side. A symmetric gambrel uses the same lengths on the opposite side.

Does this include overhang? No. Add your desired eave overhang to the lower rafter length separately.

Last updated: