Rafter Spacing Calculator: Number of Rafters, Span, Pitch and Lumber Size
Use this rafter spacing calculator to estimate rafter count, rafter length, and basic roof framing material. It helps you plan roof rafter spacing before checking span tables, local code, and permit requirements.
If you are comparing roof framing with floor or deck framing, see our deck joist spacing calculator for a similar layout method used in horizontal framing.
Inputs
Results
You can also browse our construction calculators for related tools on concrete, drainage, joists, and framing layout.
How to Read Your Rafter Spacing Calculator Result
The calculator estimates rafter quantity from roof length and on-center spacing. It also estimates rafter length from roof span and pitch.
Use the result for planning, not final structural approval. A roof framed at 24 inches on center uses fewer rafters than a roof framed at 16 inches on center. Each rafter then supports more roof area. That affects bending, deflection, roof sheathing support, and snow-load resistance.
What Is Rafter Spacing?
Rafter spacing is the distance from the center of one rafter to the center of the next rafter. This is called on-center spacing, often written as OC.
For example, 16-inch OC spacing means each rafter centerline is 16 inches from the next rafter centerline as shown in the figure below. The clear space between rafters is smaller because the lumber has width.

Rafter spacing matters because rafters carry roof sheathing, roofing material, snow load, wind load, and sometimes ceiling loads. Closer spacing shares the load between more rafters. Wider spacing places more load on each rafter.
Standard Rafter Spacing Options
Most residential roof layouts use 12, 16, 19.2, or 24 inches on center.
| Rafter spacing | Best for | Use with caution when |
|---|---|---|
| 12 inches OC | Heavy roof loads, longer spans, high snow regions | Material cost and labor matter more |
| 16 inches OC | Standard residential roof framing | Spans are long or roof loads are high |
| 19.2 inches OC | Modular framing with 8-foot panels | DIY layout needs to stay simple |
| 24 inches OC | Trusses and approved light-load rafter layouts | Snow load, span, or sheathing rating is limiting |
A 16-inch layout gives frequent support to standard roof sheathing and works well for many homes. A 24-inch layout reduces the number of rafters, but it needs proper span, lumber size, sheathing, and load checks.
How to Calculate Number of Rafters
For a simple gable roof:
Rafters per side = roof length ÷ rafter spacing + 1
Total rafters = rafters per side × 2
Use the same units for roof length and spacing.
Example:
Roof length = 32 feet
Rafter spacing = 16 inches OC
Convert roof length to inches:
32 × 12 = 384 inches
Divide by spacing:
384 ÷ 16 = 24 spaces
Add one end rafter:
24 + 1 = 25 rafters per side
Multiply by two roof sides:
25 × 2 = 50 rafters total
A 32-foot gable roof at 16 inches OC needs about 50 common rafters before adding extra framing, waste, overhang details, hips, valleys, dormers, or openings.
How Pitch Affects Rafter Length
Roof pitch changes rafter length. A steeper roof needs a longer rafter for the same horizontal run.
A 6/12 pitch means the roof rises 6 inches for every 12 inches of horizontal run. The rafter follows the slope of the roof, so it is longer than the flat run.
Do not confuse rafter span with rafter board length. Span tables usually use the horizontal rafter span, not the sloped board length.

How Rafter Spacing Affects Lumber Size
Rafter spacing changes the tributary roof width carried by each rafter.
At 16 inches OC, each rafter supports about 16 inches of roof width. At 24 inches OC, each rafter supports about 24 inches of roof width. That is 50% more roof width per rafter.
| Change | Structural effect |
|---|---|
| Closer spacing | More rafters share the roof load |
| Wider spacing | Each rafter carries more roof load |
| Larger lumber size | More bending strength and stiffness |
| Higher snow load | Shorter allowable span or larger rafters |
| Stronger wood species | Longer allowable span in many cases |
| Higher roof dead load | More demand from roofing and sheathing weight |
Spacing should follow the span check. Do not choose 24 inches OC only because it saves lumber.
Quick Rafter Lumber Size Guide
This table is only a planning guide. Final sizing should follow the applicable span table for your location, species, grade, spacing, pitch, and roof load.
| Lumber size | Typical use |
|---|---|
| 2×4 rafters | Small sheds, small porch roofs, very short spans |
| 2×6 rafters | Shorter residential spans and light roof loads |
| 2×8 rafters | Medium residential spans |
| 2×10 rafters | Longer spans or heavier roof loads |
| 2×12 rafters | Long spans, heavy loads, or deeper roof insulation space |
A deeper rafter is stronger and stiffer. Stiffness matters because roof members must limit deflection, not only resist failure.
Lumber Species and Grade Matter
A 2×8 rafter is not the same in every wood species. Douglas Fir-Larch, Southern Yellow Pine, Hem-Fir, and SPF have different design values.
Check the grade stamp before using a span table. The stamp shows the species group and grade, such as No. 2 SPF or No. 2 Douglas Fir-Larch.
| Species group | General note |
|---|---|
| Douglas Fir-Larch | Common reference species in many span examples |
| Southern Yellow Pine | Often strong and dense |
| SPF | Common in residential framing, often with shorter allowable spans |
| Hem-Fir | Common in some regions, span depends on grade and table used |
Use the same species and grade in the span table that appears on your lumber stamp.
Rafter Spacing and Snow Load
Snow load has a major effect on rafter spacing and lumber size. A roof in a warm climate does not carry the same winter load as a roof in a mountain or northern region.
| Roof snow load | 16 inches OC | 24 inches OC |
|---|---|---|
| 20 psf | Often suitable for many standard layouts when span allows | Possible when span and sheathing allow |
| 30 psf | Check span table carefully | Often needs larger rafters or shorter spans |
| 40 psf | Closer spacing or deeper rafters often needed | Use caution and check local code tables |
| Above 40 psf | Engineering review is often sensible | Engineering review is often sensible |
Do not copy rafter spacing from another house unless the span, roof load, lumber size, and local snow load are similar.

Roof Sheathing Also Controls Spacing
Rafter spacing must match the roof sheathing span rating. Roof sheathing panels are marked with span ratings that show the maximum recommended support spacing for roof and floor use.
For example, roof sheathing used over 24-inch OC rafters must be rated for that spacing. Thin or low-rated sheathing may need closer support or panel edge clips, depending on code and manufacturer requirements.
This is why rafter spacing is not only a lumber question. The roof deck also has to span safely between rafters.
Rafter Cuts: Plumb Cut, Birdsmouth and Tail Cut
A common rafter usually has three main cuts.
| Cut | Purpose |
|---|---|
| Plumb cut | Fits against the ridge board or ridge beam |
| Birdsmouth cut | Seats the rafter on the wall plate |
| Tail cut | Forms the overhang or eave line |
The birdsmouth cut should not remove too much rafter depth. A common field rule is to keep the cut within about one-third of the rafter depth. Local code notch limits still need to be checked.
For example, a nominal 2×8 has an actual depth of about 7.25 inches. One-third is about 2.4 inches. That does not mean every 2×8 should be cut that deep. It shows why deep birdsmouth cuts weaken the rafter quickly.

If your rafter layout includes boxed eaves or roof overhangs, use our soffit calculator to estimate the soffit material needed under the rafter tails.
Rafters vs Trusses
Rafters and trusses both support roof loads, but they are not the same system.
| Factor | Rafters | Trusses |
|---|---|---|
| Construction | Built on site | Prefabricated |
| Best for | Custom roofs, attic flexibility, repairs | Repeated roof shapes, fast installation |
| Attic space | Often better | Often limited by web members |
| Design | Needs correct span, ties, bracing, and load path | Designed as a complete roof unit |
| Modification | Easier than trusses, but still structural | Do not cut without designer approval |
Use rafters for custom roof framing, open attic layouts, repairs, and site-built work. Use trusses where speed, repetition, and factory-engineered design matter more.
Never cut or modify a truss without approval from the truss designer or a structural engineer.
Common Rafter Spacing Mistakes
The biggest mistake is choosing rafter spacing before checking span and roof load.
Other common mistakes include:
- Using 24 inches OC only to save lumber
- Ignoring roof sheathing span rating
- Measuring the clear gap instead of on-center spacing
- Cutting the birdsmouth too deep
- Ignoring local snow load
- Assuming all 2×8 rafters have the same span
- Treating rafters and trusses as the same system
- Forgetting rafter ties, ceiling joists, or ridge beam requirements
Rafter Spacing Calculator Methodology and Assumptions
This rafter spacing calculator estimates layout from roof length, roof span, pitch, spacing, roof type, and overhang.
It estimates:
- Number of rafters
- Rafters per side
- Approximate rafter length
- Total linear feet of rafter material
- Basic spacing layout
- Planning-level spacing notes
It does not design rafters for bending, shear, deflection, bearing, wind uplift, snow drift, unbalanced snow load, ridge beam load, ceiling joist force, rafter tie force, collar ties, or connector design.
Use the result for planning only. Final sizing should follow local building code, IRC span tables, AWC span tables, manufacturer guidance, or engineering design.
When to Call an Engineer
Call an engineer or qualified framing designer when the roof has:
- Long spans
- Heavy snow loads
- Vaulted ceilings
- Removed ceiling joists
- A structural ridge beam
- Large roof openings
- Heavy roofing materials
- Visible sagging
- Unusual roof geometry
- Previous structural damage
Also get professional review before cutting trusses, removing rafter ties, changing roof loads, or altering the load path.
Sources
International Residential Code roof and ceiling framing provisions
American Wood Council joist and rafter span tables
APA rated roof sheathing guidance
ASCE 7 minimum design load guidance
FAQ
What is the standard rafter spacing?
The most common residential rafter spacing is 16 inches on center. Some roofs use 12 inches, 19.2 inches, or 24 inches on center.
How far apart should rafters be?
Common spacing options are 12, 16, 19.2, and 24 inches on center. The right spacing depends on span, lumber size, wood species, roof load, snow load, sheathing, and local code.
How many rafters do I need?
Divide roof length by rafter spacing, add one rafter, then multiply by two for a gable roof.
Is this rafter spacing calculator a structural design tool?
No. This rafter spacing calculator helps estimate rafter count, rafter length, and layout spacing. It does not replace local code tables, permit drawings, or structural engineering design.
Are 24-inch on-center rafters allowed?
Yes, in some designs. They must meet span, load, roof sheathing, and local code requirements.
What happens if rafter spacing is too wide?
Each rafter carries more load. The roof deck may deflect more, and the rafters may exceed allowable span or deflection limits.
How deep should a birdsmouth cut be?
Keep the birdsmouth shallow enough to avoid weakening the rafter. The one-third depth rule is a common field guide, but local code notch limits should be checked.






