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.

Live data
Purlin length each
16.865ft
Total purlins
42
Purlins per slope
21
Total linear feet
708ft
ridge · 26.6°Gable roof · footprint 40 × 28
Show the working
  1. Run per slope: 15 + 1 = 16 ft
  2. Purlin length: 16 × 1.0541 = 16.865 ft
  3. Spacing in feet: 24 ÷ 12 = 2 ft
  4. Purlins per side: floor(40 ÷ 2) + 1 = 21
  5. Total purlins: 21 × 2 slopes = 42
  6. 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

  1. Measure the building length along the ridge and the span across the walls.
  2. Add the eave overhang to the half-span to get the run for one slope.
  3. Multiply that run by the pitch multiplier to get the true purlin length.
  4. Divide the building length by the purlin spacing in feet and add one for the starting member.
  5. 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.

  1. Run per slope: 16 + 1 = 17 ft
  2. Multiplier for 5:12: 1.0833
  3. Purlin length: 17 × 1.0833 = 18.42 ft
  4. Purlins per side: floor(50 ÷ 2) + 1 = 26
  5. 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

Purlin count per slope by building length and spacing
Building length16 in centres24 in centres32 in centres
20 ft16118
30 ft231612
40 ft312116
50 ft382619
60 ft463123
Purlin count per slope by building length and spacing

Purlin spacing by panel type

Purlin spacing by panel type
Panel typeTypical spacingNotes
Exposed-fastener R-panel24 inMost common; check panel span table.
Standing seam clip-fastened16–24 inClip spacing follows manufacturer specs.
Corrugated 7/8 in24–36 inHeavier gauge allows wider spacing.
Retrofit over shingles24 inFurring strips create ventilation gap.
Purlin spacing by panel type

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.