Rafter length calculator
Rafter length is the level run times the pitch multiplier. A 24 ft wide gable at 6/12 has a 12 ft run, so each common rafter is 12 × 1.118 = 13 ft 5 in from the wall to the center of the ridge. Type the span or run, pitch, overhang and ridge board, and this calculator gives every rafter dimension: the length to cut, the board to buy, the rise, the plumb and seat cuts, the hip rafter and a rafter count by spacing. Free, no account.
Span and pitch
Span is the building's width, from the outside of one wall to the outside of the other. Run is the level distance one rafter covers, so on a gable roof the run is half the span.
Run is half of it
Rise in inches per 12
Level, past the wall
1.5 for a 2x board, 0 for none
Rafter count
Along the ridge
- Run: 24 ft span ÷ 2
- 12 ft
- Line length: run × 1.118
- 13 ft 5 in
- Less half the 1.5 in ridge board, on the slope
- − 13/16 in
- Tail: 12 in overhang × 1.118
- + 1 ft 1 7/16 in
- Rafter to cut, along the top edge
- 14 ft 5 9/16 in
- Ridge height above the wall plate
- 6 ft
Framing square: 6 on the tongue, 12 on the blade. Mark the plumb cuts along the tongue and the seat cut along the blade.
Hip or valley rafter
- Hip run: 12 ft × 1.414
- 16 ft 11 5/8 in
- Line length, corner to ridge center
- 18 ft
- With the tail at the corner
- 19 ft 6 in
- Hip plumb cut, to the edge
- 70.5°
For a regular hip, where both roofs have the same pitch. Square: 6 on the tongue, 17 on the blade. Take the ridge deduction and side cuts from your framing detail.
Rafter count by spacing
| On center | Per side | Total |
|---|---|---|
| 12 in | 41 | 82 |
| 16 in | 31 | 62 |
| 19.2 in | 26 | 52 |
| 24 in | 21 | 42 |
A 40 ft gable roof: the length ÷ the spacing, rounded up, plus one to close each side, then both sides. Hip roofs add jacks, so count those from the plan.
Rafter size and allowable span come from the span tables in the IRC or the American Wood Council's span calculator. This calculator works out the geometry only.
Worked out in your browser from the numbers you type. Nothing is looked up or saved. No prices are shown here. Confirm every number on site.
How to calculate rafter length
Every rafter is the long side of a right triangle: the run is the base and the rise is the height. The pitch multiplier, √(1 + (rise ÷ 12)²), does the square root for you.
- Measure the building span from the outside of one wall to the outside of the other. On a gable roof the run is half of it.
- Find the pitch: the inches of rise for every 12 inches of run.
- Multiply the run by the pitch multiplier. That's the line length, wall to the center of the ridge.
- Take off half the ridge board's thickness, measured level and carried onto the slope.
- Add the overhang times the same multiplier for the tail, then round up to the next board length.
ExampleA 24 ft span at 6/12, 1.5 in ridge, 12 in overhang
- Run: 24 ft ÷ 2
- 12 ft
- Line length: 12 ft × 1.118
- 13 ft 5 in
- Less half the ridge: 0.75 in × 1.118
- − 13/16 in
- Tail: 12 in × 1.118
- + 1 ft 1 7/16 in
- Rafter to cut
- 14 ft 5 9/16 in
- Board to buy
- 16 ft
- Rafters: 40 ft at 16 in on center
- 62, 31 a side
The length runs along the top edge of the rafter, from the face of the ridge board to the end of the tail.
Rafter length chart
Length per foot of level run for pitches from 3/12 to 12/12, the same figures as the rafter table on a framing square, and the line lengths for a 24 ft span. Multiply the per-foot figure by your run in feet.
| Pitch | Angle | Common rafter per ft of run | Hip or valley per ft of run | Common rafter, 24 ft span | Hip, 24 ft span |
|---|---|---|---|---|---|
| 3/12 | 14.04° | 12.37 in | 17.23 in | 12 ft 4 7/16 in | 17 ft 2 13/16 in |
| 4/12 | 18.43° | 12.65 in | 17.44 in | 12 ft 7 13/16 in | 17 ft 5 1/4 in |
| 5/12 | 22.62° | 13.00 in | 17.69 in | 13 ft | 17 ft 8 5/16 in |
| 6/12 | 26.57° | 13.42 in | 18.00 in | 13 ft 5 in | 18 ft |
| 7/12 | 30.26° | 13.89 in | 18.36 in | 13 ft 10 11/16 in | 18 ft 4 5/16 in |
| 8/12 | 33.69° | 14.42 in | 18.76 in | 14 ft 5 1/16 in | 18 ft 9 1/8 in |
| 9/12 | 36.87° | 15.00 in | 19.21 in | 15 ft | 19 ft 2 1/2 in |
| 10/12 | 39.81° | 15.62 in | 19.70 in | 15 ft 7 7/16 in | 19 ft 8 3/8 in |
| 11/12 | 42.51° | 16.28 in | 20.22 in | 16 ft 3 3/8 in | 20 ft 2 11/16 in |
| 12/12 | 45.00° | 16.97 in | 20.78 in | 16 ft 11 5/8 in | 20 ft 9 7/16 in |
Line lengths, before the ridge deduction and the overhang. The shaded rows, 4/12 to 8/12, cover most houses.
Hip and valley rafters
A regular hip runs at 45 degrees in plan, where two roofs of the same pitch meet. For every 12 inches of common run it travels 16.97 inches level, so it's longer and flatter than the common rafters beside it.
Work it the same way with 16.97 in place of 12: the hip length per foot of common run is √(16.97² + rise²). A valley rafter between two roofs of the same pitch has the same length. Mark its plumb cut at the rise on the tongue and 17 on the blade.
ExampleThe hip on a 24 ft wide roof at 6/12
- Hip run: 12 ft × 1.414
- 16 ft 11 5/8 in
- Per ft of common run: √(16.97² + 6²)
- 18.00 in
- Line length: 12 ft × 18.00 in
- 18 ft
- With the 12 in overhang at the corner
- 19 ft 6 in
- Hip slope: arctan(6 ÷ 16.97)
- 19.5°
Theoretical length to the ridge center. Take the ridge deduction and the side cuts from your framing detail.
Plumb, seat and tail cuts
The plumb cut at the ridge and the tail cut stand straight up once the rafter is in place. The seat cut sits level on the wall plate, and with the heel cut it forms the birdsmouth.
- Set a framing square on the board with the rise on the tongue and 12 on the blade: 6 and 12 for a 6/12 roof.
- Mark the plumb cut along the tongue. On a 6/12 roof it's 63.4° to the rafter's edge.
- Mark the seat cut along the blade, 26.6° to the edge, where the rafter crosses the outside of the wall.
- Keep the seat cut shallow enough to leave the rafter its strength. Your framing detail or code sets the limit.
Rafter spacing: how many rafters you need
Divide the building length by the spacing, round up, and add one to close the far end. That's one side of a gable roof, so double it.
Spacing and rafter size go together. Sizes come from the span tables in the International Residential Code or the American Wood Council's span calculator. This calculator works out the geometry only.
Rafters for a 40 ft long gable roof
| Spacing | Per side | Both sides |
|---|---|---|
| 12 in on center | 41 | 82 |
| 16 in on center | 31 | 62 |
| 19.2 in on center | 26 | 52 |
| 24 in on center | 21 | 42 |
Get the pitch of every plane from an address
Rafter math starts with the pitch. Enter an address and Measured Bid's free roof measurement tool reads Google's aerial roof data and lists every roof plane with its direction, pitch and sloped area.
On our model house that's 4 planes at 5/12 and 2,344 sq ft of roof. Check the pitch on site before you cut.
Planes
- North, 5/12962 sq ft
- South, 5/12962 sq ft
- East, 5/12210 sq ft
- West, 5/12210 sq ft
From the frame to the roof price
Once the frame is set, the roof is priced by the square. Measured Bid turns an address into squares and an estimate at your rates.
Other roof calculators
- Roof pitch calculator: rise and run or an angle to pitch, degrees and the multiplier.
- Roofing material calculator: shingles, underlayment, ice and water shield, drip edge and ridge cap.
- Roof square footage calculator: footprint and pitch to squares and bundles.
In a Measured Bid estimate
- Roof area comes from each plane's sloped area, so there's no multiplier to apply.
- Planes over your steep pitch get your steep-roof adjustment, on those squares only.
- Waste is set by roof type: gable, hip, complex, shed or low slope.
- Your team prices from an address, and homeowners can get a price range on your website.
FAQ
What is a rafter on a roof?
A rafter is one of the sloped boards that runs from the top of the wall up to the ridge and carries the roof deck. Common rafters run square from the wall to the ridge. Hip and valley rafters run at 45 degrees where two roof planes meet, and jack rafters fill in between them and the wall or ridge.
How do you calculate rafter length?
Multiply the level run by the pitch multiplier, the square root of 1 plus (rise ÷ 12) squared. On a gable roof the run is half the building span. Then take off half the ridge board's thickness and add the overhang tail, both carried onto the slope the same way.
What is the rafter length formula?
Rafter length = run × √(1 + (rise ÷ 12)²), which is the same as √(run² + rise²). At 6/12 the multiplier is 1.118, so each foot of run takes 13.42 in of rafter.
How long is a rafter for a 24 ft span at 6/12?
The run is 12 ft, so the line length is 13 ft 5 in. Less half a 1.5 in ridge board it's 13 ft 4 3/16 in, and with a 12 in overhang the rafter to cut is 14 ft 5 9/16 in. That fits a 16 ft board.
How do you calculate hip rafter length?
A regular hip travels 16.97 in level for every 12 in of common run. Its length per foot of common run is √(16.97² + rise²), which is 18.00 in at 6/12. On a 12 ft common run the hip is 18 ft long, before the ridge deduction. A valley between two roofs of the same pitch is the same length.
What is the difference between rafter span and run?
The span is the building's width, from the outside of one wall to the outside of the other. The run is the level distance one rafter covers, from the wall to the center of the ridge, so on a gable roof it's half the span. The allowable span for a rafter size is a separate number from the span tables in the IRC and the American Wood Council's span calculator.
How many rafters do I need?
Divide the building length in inches by the spacing, round up and add one to close the end. Double it for the two sides of a gable roof. A 40 ft roof at 16 in on center takes 31 a side, 62 in all.
What size rafters do I need?
That depends on the span, spacing, loads, species and grade, so it comes from span tables. This calculator works out the geometry only. Use the rafter span tables in the International Residential Code or the American Wood Council's span calculator, and check your local code.
Can I find the roof pitch without getting on the roof?
Yes. Enter an address in Measured Bid's free roof measurement tool. It reads the pitch and sloped area of every roof plane from aerial roof data. Check it on site before you cut.
Related pages and tools
Price roofs from an address
Add your rates once. Your team gets estimates from an address, and homeowners get a price range on your website. 14 days or 5 estimates free, no card.