Roofing Calculators: Rafters, Trusses, Hips and Underlayment
A roof job runs on a short chain of numbers: how steep the roof is, how long each member must be, how many of them there are, and how much covering goes on top. Four calculators on this site cover that chain. This page explains what each one answers, how they fit together, which one to open first, and where roof calculators let people down.
The four tools
- Rafter length calculator. From the building width, pitch, overhang and ridge board, it gives the common rafter length, the roof angle, the ridge height and how many rafters to cut. It is the starting point for a stick-framed roof.
- Hip and valley calculator. From the pitch and the common run, it gives the hip or valley rafter length, its own pitch and angle, and the length step between jack rafters. It picks up where the common rafter leaves off.
- Roof truss calculator. For a truss roof, it estimates how many trusses a building needs, the top and bottom chord lengths, the peak height and the roof load each truss carries, with code limits shown.
- Roofing underlayment calculator. From roof area (or footprint and pitch), it gives roofing squares, the material to cover and the number of rolls, using the layer rule for asphalt shingles.
Start with pitch
Everything else depends on pitch, written in North American practice as inches of rise per 12 inches of run. A 6:12 roof climbs 6 inches for every 12 inches it travels sideways. The sloping surface is longer than the footprint it covers by a factor of √(1 + (rise ÷ 12)²): 1.118 at 6:12, 1.054 at 4:12 and 1.202 at 8:12. That one factor turns a floor-plan area into roof area and a horizontal run into a rafter length. A hip or valley runs along the diagonal of a square corner, so for each 12 inches of common run it covers 12 × √2 = 16.97 inches of horizontal run. The rafter and hip calculators do those sums, and it helps to know where the numbers come from.
Which calculator when
| You know | You want | Open |
|---|---|---|
| Building width, pitch, overhang | Length of each common rafter and how many | Rafter length |
| Pitch and common run | Hip or valley length and jack rafter step | Hip and valley |
| Building length and width, truss spacing | Truss count, chord lengths, load per truss | Roof truss |
| Footprint (or roof area) and pitch | Roofing squares and rolls of underlayment | Underlayment |
| Footprint of a house with two wings | Work each wing separately, then add areas | Any of the above, per section |
A typical workflow
For a stick-framed roof, measure the footprint and decide the pitch. Use the rafter calculator for the common rafters and the ridge height. If the roof has hips or valleys, add the hip and valley calculator for those members and their jacks. Then use the pitch factor to get roof area and take that to the underlayment calculator for rolls. For a truss roof, the truss calculator replaces the first two steps, and the area and underlayment steps stay the same. In both cases, keep a running list of lengths and counts and add a margin for cuts and mistakes.
What the code says, briefly
The International Residential Code covers the roof frame in Chapter 8. Section R802.4.1 addresses rafter size, R802.4.3 requires hip and valley rafters of at least 2 inches nominal thickness, and R802.10 covers wood trusses, including the requirement for truss design drawings. Chapter 9 covers the roof covering: R905.1.1 and its tables set the underlayment for asphalt shingles, with one layer lapped 2 inches on slopes of 4:12 or more and two layers from 2:12 up to 4:12. The calculators here do geometry and counting. Rafter and truss sizing, spans, bracing and connections come from the code tables, an engineered truss package or an engineer, and not from a calculator.
Reading manufacturers’ numbers
A roll of underlayment sold as 10 squares is 1,000 square feet only on the label. The usable coverage after overlaps is smaller: Owens Corning lists 929 square feet for its ProArmor roll with a 3-inch overlap. Enter the figure on your own roll’s label. In the same way, truss makers specify spacing, bearing and bracing for their own product, and those instructions come before any calculator.
One roof through all four tools
Take a house 24 feet wide with a 1,500 square foot footprint and a 6:12 gable roof, with a 12 inch overhang. Each calculator picks up the previous answer:
- Pitch factor. At 6:12 the factor is 1.118, so the roof surface is 1,500 × 1.118 = 1,677 sq ft, or 16.8 roofing squares.
- Common rafter. The run is half the width, 12 feet. Along the slope that is 12 × 1.118 = 13.42 ft (13 ft 5 in). The 12 inch overhang adds 1.118 ft along the slope, which brings the length to about 14 ft 6 in, before the small deduction for half the ridge board.
- Hip rafter, if the roof is hipped. For a common run of 12 feet, the hip’s horizontal run is 12 × √2 = 16.97 ft and its rise is 6 ft, so its length is √(16.97² + 6²) = 18.0 ft, longer than the common rafter’s 13.42 ft.
- Underlayment. With 10% waste, 1,677 × 1.10 = 1,845 sq ft. A roll covering 929 sq ft with overlap gives 1,845 ÷ 929 = 1.99 rolls, so plan for 2 and consider a third for waste in valleys.
Change the pitch to 3:12 and the underlayment answer changes for a different reason. The IRC’s two-layer method uses 36 ÷ 17 = 2.12 times the material, so the same area takes more than twice the rolls. That is why pitch belongs first in the chain.
Where roof calculators stop
A calculator can tell you the length of a rafter. It cannot tell you its size, because that depends on the species and grade of the lumber, the spacing, the span and the loads, and the IRC and span-table publishers decide those. It can count trusses, but a truss is an engineered product whose design drawings come from the manufacturer. It can say how many rolls of underlayment to buy, but the type of underlayment, the fastening and the extra protection at eaves and valleys come from the roof covering manufacturer and your local code. If a result matters for safety, such as snow load or wind uplift, get a professional’s review. Use the calculators to plan, price and order, and use the code and the manufacturers to decide.
Common mistakes in roofing sums
- Mixing pitch conventions. Rise per 12 inches, degrees and percent slope are three different ways to describe the same roof. Check which one a tool wants.
- Using footprint as roof area. The roof surface is larger by the pitch factor, and eaves add to the footprint.
- Measuring rafters to the wrong point. Common rafter length is along the slope from the ridge line to the plate, with the overhang added. The calculator separates these.
- Forgetting the ridge board. Rafters stop short of the ridge centre line by half its thickness.
- Ordering the exact area. Valleys, hips, penetrations and cut-offs use more than the surface area.
- Using the wrong underlayment rule on a low slope. The two-layer method uses about 2.1 times the material.
Before you cut or order
These tools are for estimating. Confirm the final design with your building department, the truss manufacturer or an engineer, and verify against the edition of the code your area has adopted. Roof structures carry snow, wind and people, so the sizes in a table are not the place to economise. Pair roof framing with our roof pitch calculator, shingle calculator, metal roofing calculator, attic ventilation calculator, siding calculator, roof snow load calculator, and gutter and downspout sizing calculator. For the materials side of a roof project see the materials hub, and for framing below the roof see the framing hub.
All roofing calculators
- Attic Ventilation & Net Free Area (NFA) Calculator
- Hip and Valley Rafter Calculator
- Metal Roofing Panel & Trim Calculator
- Rafter Length Calculator: Common Rafters, Pitch and Overhang
- Rafter Span Calculator: Check a Rafter by Formula, Then Confirm in the Span Tables
- Roof Load Calculator: Dead, Live and Snow Loads Explained
- Roof Pitch, Angle & Multiplier Calculator
- Roof Sheathing Calculator: Plywood and OSB Sheets for a Roof
- Roof Truss Calculator: Span, Pitch, Truss Count and Load
- Roof Truss Cost Calculator and Price Factors
- Roofing Underlayment Calculator: How Many Rolls You Need
- Roofing Shingle Calculator: Squares, Bundles, Underlayment and Nails
- Siding Calculator: Cladding Squares, Planks, Housewrap and Trim
- Roof Snow Load Calculator: ASCE 7 Flat, Sloped & Step-Drift Loads
Sources
- 2021 International Residential Code, Chapter 8 Roof-Ceiling Construction (R802.4.1 rafter size, R802.4.3 hips and valleys, R802.10 wood trusses), International Code Council, accessed November 2026.
- 2021 International Residential Code, Chapter 9 Roof Assemblies (R905.1.1 underlayment, Table R905.1.1(2) application), International Code Council, accessed November 2026.
- ProArmor synthetic roofing underlayment (10 sq roll, 929 sq ft coverage with a 3-in overlap), Owens Corning, accessed November 2026.