Rafter Calculator: Length, Size, Cut Angles and Board Count
Free Construction Calculator

Rafter Calculator for Length, Cuts and Count

Enter your span and pitch. You get rafter length, plumb cut angle, birdsmouth depth, Height Above Plate, and the board count to order, checked against IRC span limits as you type.

Rafter Calculator

Gable and shed roofs, imperial or metric

Free to use IRC checked
Rafter section drawing that updates with your measurements

Your Measurements

Roof type
Total rafter length, ridge to tail 14 ft 10 in

Geometry

Run, ridge centerline to wall
Rise
Line length, ridge to birdsmouth
Tail length
Pitch multiplier

Cuts and Angles

Plumb cut angle, ridge and tail
Seat cut angle
Speed square setting
Birdsmouth seat cut
Birdsmouth plumb depth
Height Above Plate

Lumber Sizing

Material Takeoff

Rafters needed
Stock length to order
Board feet
With 10% waste allowance
Total linear footage
Get a free roof inspection →
Licensed & Insured in all 50 states 25,000+ roofs completed 15+ years experience 24/7 emergency response

Reviewed by a licensed general contractor. Geometry here is exact, member sizing is not. Spans assume No. 2 Douglas Fir-Larch, 20 psf live load, 10 psf dead load, ceiling not attached to rafters. Confirm against IRC Table R802.5.1 and local amendments before ordering lumber for permitted work.

How to Calculate Rafter Length by Hand

To calculate rafter length, square the rise, square the run, add both, then take the square root.

Roof geometry runs on the Pythagorean theorem, and that holds for every common rafter on a symmetrical gable.

Start with run. On a gable roof, run equals half the building width, and you'll deduct half the ridge thickness if the design uses a structural ridge beam rather than a ridge board. Rise follows pitch directly. At 6/12, the roof climbs 6 in (152 mm) across every 12 in (305 mm) of horizontal travel.

Picture a detached garage 24 ft (7.32 m) wide, a 1.5 in (38 mm) ridge board, and a 16 in (406 mm) overhang.

StepCalculationResult
Find the run24 ft ÷ 212 ft (3.66 m)
Deduct half the ridge12 ft − 0.75 in11.94 ft (3.64 m)
Find the rise11.94 × (6 ÷ 12)5.97 ft (1.82 m)
Solve the diagonal√(11.94² + 5.97²)13.35 ft (4.07 m)
Convert the tail1.33 ft × 1.11817-7/8 in (454 mm)
Add both sections13.35 + 1.4914 ft 10 in (4.52 m)

Buy 16 ft (4.88 m) stock. That leaves 14 in (356 mm) per board for angle cuts, with nothing spliced.

Roof Pitch Multiplier Chart

Multiply run by the factor below and you've got line length without touching a square root.

Each multiplier equals the square root of 1 plus the pitch ratio squared.

PitchMultiplierLength at 12 ft runRoof angle
4/121.054112.65 ft (3.86 m)18.43°
6/121.118013.42 ft (4.09 m)26.57°
8/121.201914.42 ft (4.40 m)33.69°
10/121.301715.62 ft (4.76 m)39.81°
12/121.414216.97 ft (5.17 m)45.00°

Pitch moves budgets. Stepping from 6/12 to 12/12 on a 12 ft run adds 3.55 ft (1.08 m) per board, which across 62 rafters means about 220 extra linear feet (67 m) of lumber.

What Size Rafters Do You Need

Rafter size depends on horizontal span, spacing, species, grade, and design load, with 2x8 handling most residential spans to 18 ft (5.49 m).

Span here means horizontal distance, never the diagonal your tool returned. Confusing the two is the error that sends lumber back to the yard.

Span tables list 4 species groups: Douglas Fir-Larch, Southern Pine, Hem-Fir, and Spruce-Pine-Fir (SPF).

SizeMax span at 16 in OCMax span at 24 in OC
2x49 ft 10 in (3.00 m)8 ft 7 in (2.62 m)
2x614 ft 4 in (4.37 m)12 ft 6 in (3.81 m)
2x818 ft 2 in (5.54 m)15 ft 10 in (4.83 m)
2x1022 ft 3 in (6.78 m)19 ft 5 in (5.92 m)
2x1225 ft 7 in (7.80 m)22 ft 4 in (6.81 m)

Values assume No. 2 Douglas Fir-Larch, 20 psf (0.96 kPa) live load, 10 psf (0.48 kPa) dead load, ceiling not attached. Snow rewrites the chart. Under a 50 psf (2.39 kPa) ground snow load in northern Minnesota, a 2x8 can fall below 14 ft (4.27 m), so read your exact case from IRC Table R802.5.1.

Birdsmouth Depth and the 1/3 Rule

A birdsmouth cannot remove more than one third of rafter depth.

Cut the seat to match your plate width, then set the plumb face at seat width multiplied by the tangent of the roof angle. Three parts make the notch:

  • Seat cut, the horizontal face bearing on the plate, usually 3.5 in (89 mm)
  • Plumb cut, the vertical face lining up with the outside wall
  • Height Above Plate (HAP), the depth left above the seat

On a 2x8 at 6/12 over a 3.5 in plate, plumb depth works out to 1.75 in (44 mm), leaving HAP at 5.5 in (140 mm) against a 2.42 in (61 mm) ceiling. Shallow stock gets tight. The identical notch in a 2x6 clears its 1.83 in (46 mm) limit by under 1/8 in (3 mm), and steepening to 8/12 pushes removal to 2.33 in, which fails outright.

Rafter Cut Angles and Speed Square Settings

Set the speed square to your pitch rise number on the common rafter scale, so 6/12 reads 6.

Ridge cut, birdsmouth plumb cut, and tail cut all share that single angle.

PitchSquare settingMiter saw angle
4/12418.5°
6/12626.5°
8/12833.5°
12/121245.0°

Cut one board and carry it up before running the batch. Seat the birdsmouth, check the ridge face for daylight top and bottom, then trace that rafter as your template.

Rafter Spacing and Board Count

Divide roof length by on-center spacing, add one, then double it for a gable.

Residential framing sticks to 3 intervals: 12 in (305 mm), 16 in (406 mm), and 24 in (610 mm).

A 40 ft (12.19 m) garage at 16 in OC needs 480 ÷ 16, or 30 spaces, giving 31 rafters per side and 62 total. Widen to 24 in OC and the count drops to 42. Loads shift with it, though, since each board picks up 50% more tributary area, often forcing 2x10 and wiping out the savings.

Board feet follow from nominal thickness times nominal width times length in feet, divided by 12. Sixty-two 2x8 rafters at 16 ft come to 1,321 board feet, or 1,453 with a 10% waste allowance.

When to Use a Rafter Calculator

Use a rafter calculator during planning and estimating, before lumber gets ordered or cut.

Five jobs suit the tool: preparing a takeoff, framing a new gable, comparing pitches, sizing an overhang, and laying out a shed or garage build.

Limits matter too. Common rafters on gable and shed roofs calculate cleanly, while hip and valley members run diagonally at 16.97 in per 12 in of run and need separate geometry. Permitted construction still requires a structural review.

Rafter Calculator FAQs

How long should rafters be for a 6/12 pitch?

Multiply your run by 1.118. A 12 ft (3.66 m) run yields a 13.42 ft (4.09 m) rafter before the tail gets added.

What size rafters do I need for a 20-foot span?

2x10 at 16 in on center suits most residential conditions, since 2x8 tops out near 18 ft 2 in (5.54 m). Heavy snow regions may require 2x12.

How deep can a birdsmouth cut be?

One third of rafter depth caps it. That means 1.83 in (46 mm) on a 2x6 and 2.42 in (61 mm) on a 2x8.

Do I subtract the ridge board from the run?

Yes. Half the ridge thickness comes off each side, so a 1.5 in (38 mm) board shortens run by 0.75 in (19 mm).

Can this tool handle hip roofs?

No. Hip and valley rafters travel diagonally and need their own math, though common rafters on a hip roof still calculate normally.

Framing a Roof? Let Us Look First.

Rafter geometry never changes, but the lumber decision does. This rafter calculator settles length, angle, and count in seconds, yet sizing still answers to span tables, species, grade, and whatever snow your county expects.

Rainy Roofers has completed 25,000+ roofs across all 50 states. Send your measurements and a licensed inspector will confirm the framing plan before you cut.

Request your free inspection →