Roofing

Rafter Length Calculator: Common Rafter From Run & Pitch

Free rafter length calculator. Enter span or run and roof pitch to get common rafter length, overhang, ridge deduction and plumb and level cut angles.

Free online tool

Rafter length calculator

Find common-rafter length, overhang and cut angles from the span or run and the roof pitch.

Rafter length, ridge to tail

13′ 5″

Length to ridge centerline
Ridge deduction
Overhang along slope
Run and rise
Angles

Slope factor × run.

This is the geometric length of a common rafter on a symmetric gable. It starts at the outside wall line, ends at the ridge centerline, and optionally subtracts half the ridge board and adds the overhang along the slope. It does not include birdsmouth depth, fascia, uneven bearing or hip and valley geometry, and it does not size or approve any structural member. Check the framing plan and test-cut one rafter first.

Free online tool

Rafter count, hip and valley, and jack rafters

Count rafters for a roof, or find the length of a hip, valley or jack rafter for a regular hip roof.

Rafters for the whole roof

62 rafters

Per side
Spacing
Building length

Length ÷ spacing, rounded up, plus one.

The count assumes one rafter every spacing along each side plus one at the end, and does not add gable-end or ridge framing. Hip and valley lengths assume a regular hip roof where both roof planes have the same pitch and meet at 90°. Jack rafters step down from the common rafter by the spacing times the slope factor; only full jack rafters are listed. These are geometric lengths before ridge, birdsmouth and tail adjustments.

A rafter calculator uses horizontal run and roof pitch to find geometric slope length and angles. On a centered gable, common-rafter run is normally half the building span. Ridge thickness, overhangs, seat cuts, and field conditions remain separate details.

Right triangle with 12 feet horizontal run, 6 feet vertical rise, and approximately 13.4164 feet slope length.Run: 12 ftRise: 6 ftLength: 13.4164 ft

Common rafter geometry from pitch and horizontal run

A common roof rafter forms the hypotenuse of a right-angled triangle where the horizontal leg is the run (half the building span on a centered gable) and the vertical leg is the rise. The slope length multiplier (slope factor) is calculated as: √(pitch² + 12²) ÷ 12. Multiplying the horizontal run by this factor gives the exact theoretical rafter length from the outside wall plate line to the ridge board centerline.

Example for a 24 ft building span with a 6:12 roof pitch:
• Horizontal run = 24 ft ÷ 2 = 12 ft (144 inches)
• Pitch = 6:12 -> Slope factor = √(6² + 144) ÷ 12 = √180 ÷ 12 = 1.118034
• Theoretical rafter length = 12 ft × 1.118034 = 13.4164 ft (13′ 5″)

Birdsmouth cuts: seat cut and plumb cut

A birdsmouth is the notch where a rafter rests on the wall's top plate. Its seat cut is level and its plumb cut is vertical, so the angles follow the pitch: at 6:12 the plumb cut is 26.57° off a square cut and the seat cut is 63.43° off a square cut. The IRC requires at least 1½ in of bearing on wood or metal and limits how deep an end notch may be cut into a rafter; the limit usually quoted is one-fourth of the rafter depth (see the sawn-lumber notching rules in IRC R802). Confirm the sections and limits for the edition your jurisdiction adopted. A calculator does not size structural members.

Deducting half the ridge board accurately

Theoretical rafter length measures from the exterior wall plumb line to the dead-center of the roof ridge. When installing a standard 2× dimensional ridge board (1-1/2 inches actual thickness), you must deduct half the ridge thickness (3/4 inch). This deduction is marked perpendicular to the ridge plumb cut line, or calculated along the rafter slope as (0.75 × slope factor) before making your top plumb cut.

Collar ties and rafter ties

Rafter ties, or ceiling joists, resist the outward thrust of the roof and sit in the lower third of the attic space. Collar ties connect opposing rafters in the upper third; the 2021 IRC lists nominal 1×4 minimum at 4 ft on center (R802.4.6). Section numbers and details change between editions, and engineered roofs follow their own drawings.

Adding overhang and calculating fascia tail cuts

When adding a roof eave overhang (e.g. 12 inches horizontal soffit), do not add 12 inches directly to the rafter lumber! The overhang extends along the slope, so a 12-inch level horizontal overhang on a 6:12 pitch requires 12″ × 1.118034 = 13.42 inches (13-7/16″) of rafter tail length beyond the building line. Mark the tail plumb cut to match your sub-fascia board.

Common rafter length chart

Geometric length from the outside wall line to the ridge centerline, in feet, inches and 1/16 in. Overhang, ridge thickness and birdsmouth are not included.

Rafter length by run and pitch
Run4:125:126:127:128:129:1210:1212:12
6 ft run (12 ft span)6′ 3 7/8″6′ 6″6′ 8 1/2″6′ 11 3/8″7′ 2 9/16″7′ 6″7′ 9 3/4″8′ 5 13/16″
8 ft run (16 ft span)8′ 5 3/16″8′ 8″8′ 11 5/16″9′ 3 1/8″9′ 7 3/8″10′ 0″10′ 4 15/16″11′ 3 3/4″
10 ft run (20 ft span)10′ 6 1/2″10′ 10″11′ 2 3/16″11′ 6 15/16″12′ 0 1/4″12′ 6″13′ 0 3/16″14′ 1 11/16″
12 ft run (24 ft span)12′ 7 13/16″13′ 0″13′ 5″13′ 10 11/16″14′ 5 1/16″15′ 0″15′ 7 7/16″16′ 11 5/8″
14 ft run (28 ft span)14′ 9 1/16″15′ 2″15′ 7 13/16″16′ 2 1/2″16′ 9 15/16″17′ 6″18′ 2 11/16″19′ 9 9/16″
16 ft run (32 ft span)16′ 10 3/8″17′ 4″17′ 10 11/16″18′ 6 1/4″19′ 2 3/4″20′ 0″20′ 9 15/16″22′ 7 1/2″

Slope factors by pitch

Multiply the horizontal run by the slope factor to get the slope length. The last column is the rafter length for each 12 in of run.

Slope factors
PitchAnglePercent slopeSlope factorRafter per 12 in run
3:1214.04°25.0%1.030812.37 in
4:1218.43°33.3%1.054112.65 in
5:1222.62°41.7%1.083313.00 in
6:1226.57°50.0%1.118013.42 in
7:1230.26°58.3%1.157713.89 in
8:1233.69°66.7%1.201914.42 in
9:1236.87°75.0%1.250015.00 in
10:1239.81°83.3%1.301715.62 in
12:1245.00°100.0%1.414216.97 in

The roof pitch factor chart extends this table to 24:12 and adds the hip and valley factor.

How many rafters for a roof

One rafter at each spacing along both sides of the ridge, plus one at the end. Gable-end and ridge framing are not counted.

Rafters by building length
Building length16 in on center24 in on center
20 ft16 per side, 32 total11 per side, 22 total
24 ft19 per side, 38 total13 per side, 26 total
28 ft22 per side, 44 total15 per side, 30 total
32 ft25 per side, 50 total17 per side, 34 total
40 ft31 per side, 62 total21 per side, 42 total
48 ft37 per side, 74 total25 per side, 50 total
60 ft46 per side, 92 total31 per side, 62 total

Hip and valley rafter length chart

For a regular hip roof where both planes share the same pitch, the hip run is the common run times √2. Lengths are geometric, before ridge and seat adjustments.

Hip or valley rafter length by span and pitch
Span4:126:128:1210:1212:12
20 ft span14′ 6 3/8″15′ 0″15′ 7 5/8″16′ 5″17′ 3 7/8″
24 ft span17′ 5 1/4″18′ 0″18′ 9 1/8″19′ 8 3/8″20′ 9 7/16″
28 ft span20′ 4 1/8″21′ 0″21′ 10 11/16″22′ 11 3/4″24′ 3″
32 ft span23′ 3″24′ 0″25′ 0 3/16″26′ 3 3/16″27′ 8 9/16″
36 ft span26′ 1 13/16″27′ 0″28′ 1 11/16″29′ 6 9/16″31′ 2 1/8″

Frequently asked questions

How do you calculate rafter length?

Multiply the horizontal run by the slope factor, which is √(pitch² + 12²) ÷ 12. A 12 ft run at 6:12 gives 12 × 1.118 = 13.416 ft, about 13 ft 5 in. Then subtract half the ridge board and add the overhang measured along the slope.

Do I enter the span or the run?

On a centered gable the run is half the building span, so a 24 ft wall-to-wall span has a 12 ft run. The calculator accepts either. Entering the full span as the run doubles the answer.

How do I add a roof overhang?

Measure the overhang level from the wall line, then multiply it by the same slope factor. A 12 in level overhang at 6:12 adds 12 × 1.118 = 13.4 in along the rafter. Do not add the horizontal inches directly.

What angle do I cut a rafter?

The roof angle is atan(pitch ÷ 12), 26.57° at 6:12. The plumb (ridge) cut is that many degrees off a square cut, and the level (seat) cut is 90° minus that angle off a square cut. A framing square marks the same cuts with the pitch on one leg and 12 on the other.

Does the result include the ridge board?

Only if you enter a thickness. The length to the ridge centerline is the theoretical length, and the optional ridge field subtracts half the board thickness along the slope. Hip, valley and jack rafters need their own geometry.

Is this the cut length I can mark on the lumber?

It is the geometry. Confirm the birdsmouth, bearing, fascia and local framing details, and test-cut one rafter before cutting the set.

How these guides are prepared · Calculations and table values come from the same code as the free tools and are checked by automated tests and against the formulas in the Construction Pro app. Code references are for orientation: confirm requirements with your jurisdiction and your project documents. Found an error? Tell the developer.
Take the next job with you

Keep the calculation with the project.

Use feet-inch fractions, specialty trade tools and saved job calculations in Construction Pro for iPhone and iPad. Free download with in-app Pro options.

View on the App Store ↗

Keep working

Browse all guides