Roof Framing Calculator

Get the whole lumber list for a stick-framed gable or hip roof: every rafter, the ridge, hips and jacks, ceiling joists and collar ties, with cut lengths, the stock lengths to order, board feet and cost.

Updated Method, test cases and sources on this page

Roof framing calculator

Two planes with a ridge and gable ends: rafters, fly rafters, ridge, ceiling joists and collar ties.

ft

Outside of wall to outside of wall, along the ridge.

ft

Outside of wall to outside of wall across the ridge; up to 40 ft for stick framing.

x/12 or °

2/12 to 18/12.

in

Level projection of the rafter tails past the wall.

in

Past each gable wall; adds fly rafters and ridge length.

$ per board foot

Your supplier's price, for the material cost.

Spacing (on centre)
Rafter size
Ridge size
Ceiling joists
Collar ties

Your roof framing lumber list

Lumber, board feet

— board feet

Enter your roof to see the lumber list.

Your roof framing from aboveThe roof framing drawn to scale in plan: walls, ridge, rafters at your spacing, hips and jacks, and ceiling joists.
Your roof framing is drawn here to scale as you type.
Pieces to order
—
Material cost
—
Common rafters
—
Ridge
—
Lineal metres
—

An estimating tool based on published code methods: it does not replace a structural design or the building official. See the terms of service.

WaitingYour cut list, order lengths and board feet will appear here.

Show the math with your numbers
  1. Enter your roof to see the lumber list.

Assumptions: rectangular plan; equal pitch; ceiling joists run across the short span; the commons at the ridge ends double as king commons; hip jacks at the same spacing; no valleys or dormers; a 1.5 in ridge board; a 6 in (150 mm) cutting allowance on order lengths.

How the roof framing calculator works

The calculator builds the whole stick-framing list for a rectangular gable or hip roof: every rafter, the ridge, hips and jacks, ceiling joists and collar ties, each with its cut length and the stock length to order. Lengths use the same geometry as the rafter length calculator; quantities come from the building length and your spacing; board feet come from the nominal sizes and the order lengths.

Rafters per side = ⌈length ÷ spacing⌉ + 1

Rafter = (span ÷ 2 − ridge ÷ 2 + overhang) × √(1 + (pitch ÷ 12)²)

Board feet = Σ qty × (2 × width ÷ 12) × order length

Order lengths are the smallest stock length, from 8 to 24 ft in 2 ft steps, that leaves at least 6 in for the cuts. Ridges longer than 16 ft are split into equal pieces; ceiling joists over a 24 ft span are lapped over a centre bearing wall, two pieces per joist with 18 in of lap.

How to count rafters (and why there is always one extra)

Divide the building length by the spacing and round up to whole bays, then add one, because a rafter sits at both ends of every bay. A 40 ft roof at 16 in has 30 bays and 31 rafters per side, 62 in all. The end pairs double as the king rafters at the gable walls; fly (barge) rafters for the rake overhang are four more, outside the gable walls.

Worked example: a 24 × 40 ft gable roof

  1. Inputs40 ft long, 24 ft span, 6/12, 12 in eave and rake overhangs, 16 in on centre, 2x8 rafters, 2x10 ridge, 2x6 ceiling joists, collar ties.
  2. Rafters31 per side, 62 in all, each 14 ft 5 9/16 in on the line: order 16 ft. Plus 4 fly rafters at 16 ft.
  3. Ridge40 + 2 × 1 = 42 ft, in three 14 ft pieces jointed at rafter pairs.
  4. Ceiling joists and tiesThe 24 ft span is lapped: 31 joists × 2 = 62 pieces at 14 ft. Collar ties: 11 at 4 ft centres, each 8 ft 0 in, from 10 ft 2x4s.
  5. Board feet2,419.3 board feet in 142 pieces.

About 2,400 board feet is a normal takeoff for a 24 × 40 ft stick-framed roof with ceiling joists.

How to read the cut list and order lumber

Each line gives the piece, its size, how many, the cut (line) length and the stock length to order. Order the stock length, not the cut length: the extra covers the plumb cuts, the birdsmouth and a bad end. Add 5 to 10% more pieces for crowned, twisted or split boards, and sort the straightest for rafters and the ridge. Sheathing and roofing come next: use the roof sheathing calculator and the roofing nail calculator.

Board feet per lineal foot and per 8 ft and 16 ft piece by size
SizePer lineal ft8 ft piece16 ft piece
2x40.6675.3310.67
2x61816
2x81.33310.6721.33
2x101.66713.3326.67
2x1221632

Ridge board vs ridge beam

A ridge board is a nailing surface: the rafters lean against each other through it, and the ceiling joists or rafter ties stop the walls from spreading. It is usually one size deeper than the rafters so the full plumb cut bears on it. A ridge beam is a structural beam carried by posts at each end; it holds the rafters up so no ties are needed, which is what makes a vaulted ceiling possible. A ridge beam has to be designed for the load.

Collar ties vs rafter ties vs ceiling joists

Rafter ties and ceiling joists, low in the roof, stop the walls spreading; collar ties, high in the roof, do not. The IRC requires rafter ties or ceiling joists in the lower third of the attic, connected to the rafters, unless a designed ridge beam carries the roof. Collar ties go in the upper third, at no more than 4 ft on centre, and resist wind uplift at the ridge. That is why the calculator warns when you choose no ceiling joists: a vaulted roof needs a structural ridge or engineered ties.

Vaulted shed or garage? Collar ties alone are the most common framing mistake in small vaulted roofs. Add rafter ties low in the roof or design a ridge beam.

Hip roof framing explained

A hip roof has a ridge shorter than the building by the span, four hip rafters running from the ridge ends to the corners, common rafters along the sides and one at each end of the ridge, and jack rafters stepping down between the hips and the walls. Each jack set has a jack at every spacing along the hip, and there are eight sets: two per hip. On a square plan the hips meet at a point, there is no ridge, and four king commons finish the peak. Hip rafters are usually one size deeper than the commons.

When trusses are cheaper than stick framing

For plain gable roofs over garages and houses, a truss package is usually cheaper once labour is counted, and it spans wider with smaller lumber. Stick framing wins for small sheds, roofs with storage or rooms in the attic, complicated hips and valleys, and jobs where trusses would take weeks to arrive. Price both: this list against the count from the roof truss calculator.

Metric units

Switch to m · mm to enter the building in metres and the overhangs in millimetres. Order lengths switch to metric stock from 2.4 to 7.2 m in 0.3 m steps with a 150 mm allowance, and board feet become cubic metres plus the lineal metres to order. Sizes stay as North American 2x sections.

When this result does not apply

The list is exact for a rectangular gable or hip roof of one pitch; it is a takeoff, not a structural design.

  • Sizes for your loads. Check rafters and joists with the rafter span calculator.
  • Valleys, dormers and L-shapes. Add their pieces separately.
  • Gambrel roofs. Use the gambrel roof calculator.
  • Spans over 40 ft. Beyond residential stick framing: use trusses or an engineered design.
  • Blocking, hangers and hardware. Not included; add them to the order.
  • Roofing materials. Use the shingle calculator.

Frequently asked questions

How many rafters do I need?

Divide the building length by the spacing, round up, add one, and double it for the two sides of a gable. A 40 ft building at 16 in needs 31 per side, 62 in all, plus four fly rafters if there is a rake overhang.

How long is the ridge board?

The building length plus the two rake overhangs on a gable roof, or the building length minus the span on a hip roof. Over 16 ft, split it into equal pieces jointed at rafter pairs: a 42 ft ridge is three 14 ft boards.

How far apart are collar ties?

No more than 4 ft on centre, in the upper third of the attic. A 40 ft roof needs 11. They resist uplift at the ridge but do not stop the walls spreading; rafter ties or ceiling joists low in the roof do that.

What is the difference between ceiling joists and rafter ties?

Both tie the rafters together low in the roof so the walls cannot spread. Ceiling joists also carry the ceiling; rafter ties are only ties. The IRC wants one or the other in the lower third of the attic unless a designed ridge beam carries the roof.

How many board feet is a roof?

A 24 × 40 ft gable roof with 2x8 rafters at 16 in, a 2x10 ridge, lapped 2x6 ceiling joists and collar ties is about 2,419 board feet; a 28 × 40 ft hip roof is about 2,916. A 10 × 12 shed roof is about 150.

What size ridge board do I need?

One size deeper than the rafters, so the whole plumb cut bears on it: a 2x10 ridge for 2x8 rafters. A ridge beam carrying the roof without ties must be sized by an engineer.

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 checkedThree worked test cases covering a gable roof with lapped ceiling joists, a full hip roof with every jack length and a small shed with no ceiling joists run through the live calculator before each update. Every quantity, length and board-foot total matches.
Method and sourcesRafter, hip and jack geometry from the rafter length method; board feet on nominal sizes; collar-tie and rafter-tie rules from the IRC roof-framing chapter; stock lengths and the 6 in allowance from common shop 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 Gable roof and Hip roof modes.

Sources

  1. Roof geometry. Rafter, hip and jack lengths, the same as the rafter length calculator.
  2. International Code Council, International Residential Code (IRC), Chapter 8, Roof-Ceiling Construction. Rafter ties or ceiling joists in the lower third of the attic, collar ties in the upper third at no more than 4 ft on centre, and ridge beams where ties are omitted.
  3. Board foot. The standard US lumber measure: 1 in × 12 in × 12 in on nominal dimensions.
  4. American Softwood Lumber Standard (PS 20). Nominal and actual sizes of dimension lumber.