Honey-Do Squad mascotHoney-DoSquadMy List

Roof Framing Calculator

Rafters, ridge and ties for a gable roof.

Rafters
62 rafters
Rafters
6231 per side · 16" o.c.
Rafter length
14.5 ft6/12 pitch · incl. 12" overhang
Cut from
2×8 × 16 ftextra length for plumb & bird’s-mouth cuts
Ridge board
40 ft2×10 along the peak
Material cost (est.)
$1,512rafters + ridge + ties
Doing this for work? Estimate the whole job in minutes.
JRIQ turns plans and site photos into full material + labor estimates with AI — built by the team behind these calculators.
Try it free →

A stick-framed gable roof is a pair of rafter rows leaning on a ridge board, tied at the bottom so they can’t spread. The math is trigonometry: the roof pitch turns your horizontal run into a longer rafter, and the building length sets how many rafters you need.

DifficultyAdvanced
TimeA weekend or more for a small structure (shed, garage, porch)
SkillsReading a span table, cutting accurate plumb and bird’s-mouth cuts, working safely at height
PermitsRoof framing is structural and permitted. Rafter size and spacing must meet span tables (IRC R802) for your snow/roof load — don’t guess; size the rafters from a table for your span, spacing, and lumber.

Tools you'll need

Step by step

  1. Set the span, length, and pitchEnter the building width (span), the roof length, and the pitch (rise per 12). The calculator returns the rafter length along the slope and how many rafters you need per side.
  2. Size the rafters from a span tableUse an IRC rafter span table for your lumber, spacing, and load to confirm the rafter depth (e.g., 2×8 vs 2×10). The calculator estimates 2×8 stock length — verify the depth against the table for your conditions.
  3. Cut a pattern rafterLay out the plumb cut, bird’s-mouth (seat) cut, and tail with a framing square set to your pitch, cut one rafter, and test-fit it against the ridge and wall before cutting the rest.
  4. Set the ridge and raftersBrace the ridge board at height, then install opposing rafter pairs ~16" or 24" on-center, nailing each to the ridge and seating the bird’s-mouth on the top plate.
  5. Tie it togetherAdd ceiling joists or rafter ties near the plate so the walls can’t spread, plus collar ties in the upper third, and connect every rafter to the wall with a hurricane/rafter tie. The calculator includes a tie per rafter.

Common mistakes

Undersized rafters for the span
Always check a span table — a 2×6 and a 2×10 reach very different distances. Too small and the roof sags or fails under snow load.
No rafter ties — spreading walls
Without ties at the plate line, rafter thrust pushes the walls outward. Install ceiling joists or rafter ties, not just collar ties up high.
Sloppy bird’s-mouth or plumb cuts
Cut a single pattern rafter, test-fit it, then use it as the template so every rafter seats identically.
Skipping hurricane ties
Toe-nails alone don’t resist uplift. Connect each rafter to the wall with a rated metal tie.

Safety

Frequently asked questions

How do I calculate rafter length?
Multiply the horizontal run (½ the span, plus overhang) by the pitch factor √(rise² + 12²) ⁄ 12. The calculator does this and rounds up to a stock length for the plumb and bird’s-mouth cuts.
What spacing should rafters be?
16" on-center is typical; 24" is allowed for many spans with adequately sized rafters and sheathing. The calculator supports both.
What size rafters do I need?
It depends on span, spacing, species, and roof load — read it off an IRC rafter span table. As a rough guide, longer spans step up from 2×6 to 2×8, 2×10, and beyond.
Do I need rafter ties or collar ties?
Both do different jobs: rafter ties (or ceiling joists) near the wall plate stop the walls from spreading; collar ties in the upper third resist uplift separating the rafters at the ridge.

Next steps for this project

Sources & references

Popular Roof Framing sizes