Purlin Calculator
Reviewed by the My Roof Pitch editorial team · Updated · Free, no sign-up, works offline after first load
Purlin count is the roof slope length divided by the purlin spacing, plus one. A 40 ft long gable roof slope at 24 in centres needs 21 purlins per side, or 42 total. Total purlin length equals count times the rafter or truss top-chord length.
Your measurements
Enter the values you know — results update live.
The dimension parallel to the ridge, including any overhang.
Outside-to-outside width at the wall plates.
Used to find the true slope length for purlin length.
Centre-to-centre spacing. 24 in is standard for metal roofing over purlins.
Analysis
Live results from your measurements.
Show the working
- Run per slope:
15 + 1= 16 ft - Purlin length:
16 × 1.0541= 16.865 ft - Spacing in feet:
24 ÷ 12= 2 ft - Purlins per side:
floor(40 ÷ 2) + 1= 21 - Total purlins:
21 × 2 slopes= 42 - Total linear feet:
42 × 16.865= 708 ft
What this calculator does
Purlins are the horizontal framing members that run across the roof slope and carry the metal roofing panels. On a post-frame or metal building they often replace solid sheathing entirely; on a residential retrofit they sit on top of the sheathing to create a batten-style air gap. The spacing between purlins is dictated by the panel span rating — 24 inches is common for through-fastener panels, while standing seam may need closer spacing or clip-based support. The purlin length follows the rafter line, so it grows with pitch even when the half-span stays the same.
How to use it
- Measure the building length along the ridge and the span across the walls.
- Add the eave overhang to the half-span to get the run for one slope.
- Multiply that run by the pitch multiplier to get the true purlin length.
- Divide the building length by the purlin spacing in feet and add one for the starting member.
- Double the per-slope count for a gable roof, then multiply by purlin length for total material.
The formula
Purlin length
purlin length = (span / 2 + overhang) × sqrt(rise^2 + 144) / 12
The purlin follows the roof slope, so it is longer than the half-span.
Purlins per slope
count = floor(building length / spacing) + 1
The plus one closes the bay at the starting end of the run.
Total linear feet
total = count × purlin length × 2
Doubled for the two slopes of a gable roof.
Worked example
A 50 ft long, 32 ft span building at 5:12, purlins at 24 in centres, 1 ft overhangs.
- Run per slope: 16 + 1 = 17 ft
- Multiplier for 5:12: 1.0833
- Purlin length: 17 × 1.0833 = 18.42 ft
- Purlins per side: floor(50 ÷ 2) + 1 = 26
- Total: 26 × 2 × 18.42 = 958 ft
52 purlins, each about 18 ft 5 in long, for roughly 958 linear feet of material.
Reference chart
| Building length | 16 in centres | 24 in centres | 32 in centres |
|---|---|---|---|
| 20 ft | 16 | 11 | 8 |
| 30 ft | 23 | 16 | 12 |
| 40 ft | 31 | 21 | 16 |
| 50 ft | 38 | 26 | 19 |
| 60 ft | 46 | 31 | 23 |
Purlin spacing by panel type
| Panel type | Typical spacing | Notes |
|---|---|---|
| Exposed-fastener R-panel | 24 in | Most common; check panel span table. |
| Standing seam clip-fastened | 16–24 in | Clip spacing follows manufacturer specs. |
| Corrugated 7/8 in | 24–36 in | Heavier gauge allows wider spacing. |
| Retrofit over shingles | 24 in | Furring strips create ventilation gap. |
Common mistakes
- Using the half-span as the purlin length without adding the slope multiplier.
- Forgetting the overhang, which adds a purlin at each eave tail.
- Spacing purlins wider than the panel rating allows.
- Counting purlins for only one slope on a gable roof.
- Not allowing for splices; order lengths that match available lumber or steel sections.
Assumptions and limits
- A symmetrical gable roof with equal slopes.
- Purlins run perpendicular to the rafters or truss top chords.
- Spacing is centre-to-centre and uniform over the full length.
- Purlin length is geometric and does not include end laps or splices.
Frequently asked questions
What spacing should purlins be for a metal roof?
24 inches on centre is standard for most exposed-fastener metal panels. Standing seam systems using clips may require 16 to 24 inches depending on the panel gauge and load span table.
Do purlins run parallel or perpendicular to the ridge?
Perpendicular to the ridge, across the roof slope. That lets them support the panels from underneath at regular intervals.
How do I calculate purlin length?
Take the horizontal half-span plus the overhang, then multiply by the pitch multiplier for your roof pitch. A 5:12 roof makes each purlin about 8.3% longer than the half-span.
Can I use 2×4s as purlins?
For light metal panels over short spans, yes. For heavier loads or wider spacing, 2×6, 2×8 or engineered C-purlins are more common. Always check the panel span table and local code.
How many purlins do I need for a 40 ft building?
At 24 inch centres you need 21 purlins per slope, or 42 total for a gable roof: 40 divided by 2 feet is 20 bays, plus one at the starting end.
What is the difference between a purlin and a rafter?
Rafters are the primary roof framing members running from ridge to eave. Purlins are secondary members laid across the rafters to support metal panels, tiles or other roof coverings.
Last updated 2026-08-05. Results are estimates for planning and are not a substitute for a licensed engineer or local code review.