Rafter Length Calculator
Rafter length calculator for gable and shed roofs. Enter span, pitch and overhang to get common, hip and valley rafter length, angle and rafter count.
Published
Last updated
How the Rafter Length Calculator Formula Works
A rafter is the hypotenuse of a right triangle. The horizontal leg is the run, the vertical leg is the rise, and the rafter is the sloped side. For a gable roof the run is half the building span, less half the thickness of the ridge board the rafters butt against. For a shed roof the run is the whole span.
The rise comes from the pitch: pitch is the inches of rise per 12 inches of run, so rise = run x pitch / 12. The rafter length is then the square root of run squared plus rise squared. The overhang is entered as a horizontal distance, so the calculator stretches it along the slope using the same length factor, square root of 1 + (pitch/12) squared, to get the rafter tail.
A hip or valley rafter runs along the diagonal of a square corner, so its horizontal run is the common run times the square root of 2, and its length is the square root of that run squared plus the rise squared. The count is the building length divided by the spacing, rounded up, plus one rafter for the end, doubled for the two sides of a gable roof. You can enter the roof slope as a pitch or as an angle in degrees.
run = span / 2 − ridge / 2; rise = run × pitch / 12; rafter = √(run2 + rise2); tail = overhang × √(1 + (pitch/12)2); hip = √((run × sqrt 2)2 + rise2)- spanft24Width of the building between the outside faces of the walls.
- pitchrise:12 or degrees6How steep the roof is.
- overhangin12Horizontal distance the roof extends past the wall.
- ridge board thicknessinThickness of the board at the peak (gable roof only).
- building lengthftUsed to count rafters.
- + 1 more input below
- span
- ft
- Width of the building between the outside faces of the walls.
- pitch
- rise:12 or degrees
- How steep the roof is.
- overhang
- in
- Horizontal distance the roof extends past the wall.
- ridge board thickness
- in
- Thickness of the board at the peak (gable roof only).
- building length
- ft
- Used to count rafters.
- rafter spacing
- in
- On-centre distance between rafters.
Using the Rafter Length Calculator
Enter roof type
Choose from Gable (two sides), Shed (one slope).
Enter building span (ft)
Type the figure you already have, then press Calculate.
Enter enter the slope as
Choose from Pitch (rise in 12), Angle (degrees).
Enter roof pitch or angle
Type the figure you already have, then press Calculate.
Enter horizontal overhang (in)
Type the figure you already have, then press Calculate.
Enter ridge board thickness (in)
Type the figure you already have, then press Calculate.
Enter building length (ft)
Type the figure you already have, then press Calculate.
Enter rafter spacing on centre (in)
Type the figure you already have, then press Calculate.
Read the result
Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.
A Real Worked Example
A 24 foot wide gable-roof garage has a 6:12 pitch, a 12 inch overhang and a 1.5 inch ridge board. The run is half the span less half the ridge: 12 feet minus 0.75 inches is 11.9375 feet. The rise is 11.9375 × 6 / 12 = 5.969 feet.
The common rafter is the square root of 11.9375 squared plus 5.969 squared, which is 13.347 feet, and the 12 inch tail adds 1.118 feet along the slope. The total is 14.465 feet, or 14 feet 5 9/16 inches, so buy 16 foot boards.
The hip or valley rafter for the same roof is 19.406 feet. At 16 inch spacing on a 30 foot building there are 24 rafter positions on each side, 48 in all. The roof angle is 26.57 degrees.
A shed roof: 12 foot span at 4:12 with a 12 inch overhang
A shed roof has one slope, so the run is the full 12 foot span. The rise is 12 × 4 / 12 = 4 feet, and the rafter is the square root of 144 + 16 = 12.649 feet.
The 12 inch tail adds 1.054 feet, for a total of 13.703 feet. At 24 inches on centre along a 20 foot wall, the count is 11 rafters. The angle is 18.43 degrees.
Entering an angle: 28 foot span at 30 degrees
Choose the angle option and enter 30 degrees. That is a pitch of 6.93:12. With an 18 inch overhang and a 1.5 inch ridge board, the run is 13.9375 feet, the rise is 8.047 feet and the common rafter is 16.094 feet.
With the tail the total is 17.826 feet. A 40 foot building at 24 inches on centre needs 42 rafters.
A 12:12 roof with no overhang: 20 foot span
A 12:12 roof is a 45 degree slope, so the rise equals the run at 10 feet. The rafter is 10 x the square root of 2 = 14.142 feet, with no overhang and no ridge board.
The hip or valley rafter is 17.321 feet. At 16 inch spacing along a 24 foot building the count is 38.
What Else to Know
How a Rafter Length Is Calculated
A rafter, together with the wall below it and the ridge above, makes a right triangle. The horizontal leg is the run, the vertical leg is the rise, and the rafter is the sloped side, so its length follows from the Pythagorean theorem: the square root of run squared plus rise squared.

The run depends on the roof type. On a gable roof, two sets of rafters meet at a central ridge, so each rafter covers half of the building span. On a shed roof, there is a single slope from one wall to the other and the run is the full span. The rise follows from the pitch, so at 6:12 the roof climbs 6 inches for every 12 inches of run.

The calculator takes you from the span and pitch to the exact length of a common rafter, the tail that overhangs the wall, the diagonal hip or valley rafter, the roof angle and the number of rafters.
Roof Pitch, Angle and Slope
Roof pitch is the rise over the run, and in North American building it is written as inches of rise per 12 inches of run, such as 6:12. The same slope can be expressed as an angle, found with the inverse tangent of the pitch over 12, and as a percent slope, the rise over the run times 100.

A 6:12 roof is 26.57 degrees or a 50 percent slope. A 12:12 roof is 45 degrees and a 100 percent slope. Steeper pitches give longer rafters for the same span, which the length factor in the pitch table captures: it is the rafter length per foot of run, the square root of 1 + (pitch/12) squared.
If your plans give an angle, switch the input to degrees and the calculator converts it to a pitch internally and reports both.
Run, Rise and Ridge Board Adjustment
The run of a gable rafter is measured from the outside face of the wall to the centre of the span, but the rafter actually ends against the side of the ridge board. Half the thickness of the ridge board is therefore taken from the run. With a standard 1.5 inch board, that is 0.75 inches, a small amount, but it keeps the cut length accurate and the rafters from bunching at the peak.

The rise follows from the shortened run and the pitch. A 24 foot span at 6:12 with a 1.5 inch ridge board has a run of 11.9375 feet and a rise of 5.969 feet. Leaving the ridge board out gives a 12 foot run, 6 foot rise and 13.416 foot rafter, a difference of about 0.84 inches.
A shed roof has no ridge board, so the calculator ignores that input when you choose the shed option.
Overhang and the Rafter Tail
Most roofs extend past the walls to form the eaves. The overhang is usually described as the horizontal distance the roof projects past the wall, such as 12 inches. The rafter tail that covers it is longer than that, since it lies along the slope.

To convert, multiply the horizontal overhang by the same length factor used for the rafter: the square root of 1 + (pitch/12) squared. For a 12 inch overhang on a 6:12 roof that is 12 × 1.118 = 13.4 inches along the rafter. Add it to the common rafter to get the total length to cut.
The calculator asks for the horizontal overhang so the number you enter matches what you can see on a drawing, and it adds the tail for you. Fascia, soffit and rafter tail style (such as a bird's mouth or a notched tail) affect cut details and are not modelled.
Hip and Valley Rafters
A hip rafter runs from the corner of the building up to the ridge, along the diagonal of a square corner. A valley rafter does the same at an inside corner where two roof sections meet. For two roof planes of equal pitch meeting at a 90 degree corner, the horizontal run of the hip or valley is the common run times the square root of 2.

The length is the square root of that diagonal run squared plus the rise squared. With a 12 foot common run and a 6 foot rise, the diagonal run is 16.97 feet, and the hip or valley rafter is 18.0 feet before the ridge adjustment. For the 24 foot example, the calculator shows 19.4 feet.
The hip factor table gives the length per foot of common run for each pitch. Unequal pitches, corners that are not square, and dormers need other geometry that this calculator does not cover.
Counting Rafters and Choosing Spacing
Rafter count is the building length divided by the on-centre spacing, rounded up, plus one for the final rafter at the end. For a gable roof the result is doubled for the two sides. A 30 foot building at 16 inch spacing has 360 / 16 = 22.5, rounded up to 23 intervals, so 24 rafter positions on each side and 48 rafters across both sides.

Common spacings are 12, 16, 19.2 and 24 inches on centre. The count table lists the number needed for several building lengths. It includes only common rafters. Add hip and valley rafters, jacks, gable-end framing, collar ties and any headers separately.
Which spacing is allowed depends on the rafter size, species and grade, span, roof loads and sheathing, which are matters for your local building code and the lumber span tables.
What This Calculator Does Not Do
This calculator finds lengths, angles and counts from the geometry. It does not size the rafters, because the lumber size and spacing a span needs depend on species, grade, snow and wind loads and the code in force where you build. Those span tables could not be verified here from a source we can cite, so none are shown.
It also does not draw the bird's mouth cut, compute collar tie or ridge beam sizes, or handle roofs with different pitches, curves, trusses or complex hips and dormers. Always check your cut list against the plans and test-fit a first rafter before cutting the full set.
For other construction quantities, the stair calculator covers rise, run and stringers, and the board foot calculator prices the lumber.
Reference Tables
| Pitch (rise:12) | Angle | Slope (percent) | Rafter length per foot of run | Hip/valley length per foot of run |
|---|---|---|---|---|
| 2:12 | 9.46° | 16.7% | 1.0138 | 1.424 |
| 3:12 | 14.04° | 25% | 1.0308 | 1.4361 |
| 4:12 | 18.43° | 33.3% | 1.0541 | 1.453 |
| 5:12 | 22.62° | 41.7% | 1.0833 | 1.4743 |
| 6:12 | 26.57° | 50% | 1.118 | 1.5 |
| 7:12 | 30.26° | 58.3% | 1.1577 | 1.5298 |
| 8:12 | 33.69° | 66.7% | 1.2019 | 1.5635 |
| 9:12 | 36.87° | 75% | 1.25 | 1.6008 |
| 10:12 | 39.81° | 83.3% | 1.3017 | 1.6415 |
| 12:12 | 45° | 100% | 1.4142 | 1.7321 |
| 14:12 | 49.4° | 116.7% | 1.5366 | 1.8333 |
| 16:12 | 53.13° | 133.3% | 1.6667 | 1.9437 |
| 18:12 | 56.31° | 150% | 1.8028 | 2.0616 |
| Span | Run (half span) | 4:12 | 6:12 | 8:12 | 10:12 | 12:12 |
|---|---|---|---|---|---|---|
| 12 ft | 6 ft | 6.32 ft | 6.71 ft | 7.21 ft | 7.81 ft | 8.49 ft |
| 16 ft | 8 ft | 8.43 ft | 8.94 ft | 9.61 ft | 10.41 ft | 11.31 ft |
| 20 ft | 10 ft | 10.54 ft | 11.18 ft | 12.02 ft | 13.02 ft | 14.14 ft |
| 24 ft | 12 ft | 12.65 ft | 13.42 ft | 14.42 ft | 15.62 ft | 16.97 ft |
| 28 ft | 14 ft | 14.76 ft | 15.65 ft | 16.83 ft | 18.22 ft | 19.8 ft |
| 32 ft | 16 ft | 16.87 ft | 17.89 ft | 19.23 ft | 20.83 ft | 22.63 ft |
| 36 ft | 18 ft | 18.97 ft | 20.12 ft | 21.63 ft | 23.43 ft | 25.46 ft |
| 40 ft | 20 ft | 21.08 ft | 22.36 ft | 24.04 ft | 26.03 ft | 28.28 ft |
| Span | 4:12 | 6:12 | 8:12 | 10:12 | 12:12 |
|---|---|---|---|---|---|
| 12 ft | 2 ft | 3 ft | 4 ft | 5 ft | 6 ft |
| 16 ft | 2.67 ft | 4 ft | 5.33 ft | 6.67 ft | 8 ft |
| 20 ft | 3.33 ft | 5 ft | 6.67 ft | 8.33 ft | 10 ft |
| 24 ft | 4 ft | 6 ft | 8 ft | 10 ft | 12 ft |
| 28 ft | 4.67 ft | 7 ft | 9.33 ft | 11.67 ft | 14 ft |
| 32 ft | 5.33 ft | 8 ft | 10.67 ft | 13.33 ft | 16 ft |
| 36 ft | 6 ft | 9 ft | 12 ft | 15 ft | 18 ft |
| 40 ft | 6.67 ft | 10 ft | 13.33 ft | 16.67 ft | 20 ft |
| Horizontal overhang | 4:12 | 6:12 | 8:12 | 10:12 | 12:12 |
|---|---|---|---|---|---|
| 6 in | 6.32 in | 6.71 in | 7.21 in | 7.81 in | 8.49 in |
| 12 in | 12.65 in | 13.42 in | 14.42 in | 15.62 in | 16.97 in |
| 16 in | 16.87 in | 17.89 in | 19.23 in | 20.83 in | 22.63 in |
| 18 in | 18.97 in | 20.12 in | 21.63 in | 23.43 in | 25.46 in |
| 24 in | 25.3 in | 26.83 in | 28.84 in | 31.24 in | 33.94 in |
| Span | 4:12 | 6:12 | 8:12 | 10:12 | 12:12 |
|---|---|---|---|---|---|
| 12 ft | 8.72 ft | 9 ft | 9.38 ft | 9.85 ft | 10.39 ft |
| 16 ft | 11.62 ft | 12 ft | 12.51 ft | 13.13 ft | 13.86 ft |
| 20 ft | 14.53 ft | 15 ft | 15.63 ft | 16.41 ft | 17.32 ft |
| 24 ft | 17.44 ft | 18 ft | 18.76 ft | 19.7 ft | 20.78 ft |
| 28 ft | 20.34 ft | 21 ft | 21.89 ft | 22.98 ft | 24.25 ft |
| 32 ft | 23.25 ft | 24 ft | 25.02 ft | 26.26 ft | 27.71 ft |
| Angle | Pitch (rise:12) | Rafter length per foot of run |
|---|---|---|
| 10° | 2.12:12 | 1.0154 |
| 15° | 3.22:12 | 1.0353 |
| 20° | 4.37:12 | 1.0642 |
| 25° | 5.6:12 | 1.1034 |
| 30° | 6.93:12 | 1.1547 |
| 35° | 8.4:12 | 1.2208 |
| 40° | 10.07:12 | 1.3054 |
| 45° | 12:12 | 1.4142 |
| 50° | 14.3:12 | 1.5557 |
| Building length | 12 in o.c. | 16 in o.c. | 19.2 in o.c. | 24 in o.c. |
|---|---|---|---|---|
| 12 ft | 26 | 20 | 18 | 14 |
| 16 ft | 34 | 26 | 22 | 18 |
| 20 ft | 42 | 32 | 28 | 22 |
| 24 ft | 50 | 38 | 32 | 26 |
| 30 ft | 62 | 48 | 40 | 32 |
| 36 ft | 74 | 56 | 48 | 38 |
| 40 ft | 82 | 62 | 52 | 42 |
| 48 ft | 98 | 74 | 62 | 50 |
| Pitch | Plumb cut angle (from vertical) | Level (seat) cut angle | Angle to set on a speed square |
|---|---|---|---|
| 3:12 | 14° | 76° | 3 on the common scale |
| 4:12 | 18.4° | 71.6° | 4 on the common scale |
| 6:12 | 26.6° | 63.4° | 6 on the common scale |
| 8:12 | 33.7° | 56.3° | 8 on the common scale |
| 10:12 | 39.8° | 50.2° | 10 on the common scale |
| 12:12 | 45° | 45° | 12 on the common scale |
| Term | Meaning |
|---|---|
| Span | Distance between the outside faces of the supporting walls |
| Run | Horizontal distance a rafter covers, from the wall to the centre of the ridge |
| Rise | Vertical height the rafter climbs over its run |
| Pitch | Rise over run, normally written as rise in 12 inches of run |
| Common rafter | A rafter that runs square to the ridge, from the wall plate to the ridge board |
| Hip rafter | A rafter at an outside corner where two roof planes meet |
| Valley rafter | A rafter at an inside corner where two roof planes meet |
| Rafter tail | The part of the rafter that overhangs the wall |
| Ridge board | The horizontal board at the peak that the rafters meet |
| O.C. | On centre: the distance from the centre of one rafter to the centre of the next |
| Decimal feet | Feet and inches | Inches |
|---|---|---|
| 0.0625 ft | 0 ft 0 3/4 in | 0.75 |
| 0.125 ft | 0 ft 1 1/2 in | 1.5 |
| 0.25 ft | 0 ft 3 in | 3 |
| 0.375 ft | 0 ft 4 1/2 in | 4.5 |
| 0.5 ft | 0 ft 6 in | 6 |
| 0.625 ft | 0 ft 7 1/2 in | 7.5 |
| 0.75 ft | 0 ft 9 in | 9 |
| 0.875 ft | 0 ft 10 1/2 in | 10.5 |
| Mistake | What goes wrong | Fix |
|---|---|---|
| Using the full span as the run | Rafters come out twice as long | A gable rafter covers half the span |
| Ignoring the ridge board | Rafters end up slightly too long | Subtract half the ridge thickness from the run |
| Measuring the overhang along the slope | The tail is too long | Enter the horizontal overhang; the calculator converts it |
| Mixing angle and pitch | A 30° roof is not a 30:12 roof | Choose the input type that matches your plan |
| Using hip length for common rafters | Rafters are far too long | Hips run on the diagonal; commons run square to the ridge |
Frequently Asked Questions About the Rafter Length Calculator
How do you calculate rafter length?
Find the run, which is half the building span for a gable roof, then the rise, which is the run multiplied by the pitch over 12. The rafter length is the square root of run squared plus rise squared. A 24 foot span at 6:12 has a 12 foot run, a 6 foot rise and a rafter of 13.4 feet.
What is the rafter length formula?
Rafter length equals the square root of run squared plus rise squared, which is the same as the run divided by the cosine of the roof angle. With a pitch p in 12, the length per foot of run is the square root of 1 plus (p/12) squared, so a 6:12 roof gives 1.118 feet of rafter per foot of run.
How do I find the run of a rafter?
For a gable roof, the run is half the span, less half the thickness of the ridge board. A 24 foot span with a 1.5 inch ridge board has a run of 12 feet minus 0.75 inches, which is 11.94 feet. For a shed roof the run is the full span, since the rafters go from one wall to the other.
What is roof pitch?
Roof pitch is the rise of the roof over its run, usually written as inches of rise per 12 inches of run. A 6:12 pitch climbs 6 inches for every 12 inches of horizontal distance, which is an angle of 26.57 degrees. Higher numbers mean steeper roofs.
How do I convert roof pitch to degrees?
Take the inverse tangent of the pitch divided by 12. A 6:12 pitch is atan(0.5) = 26.57 degrees, 8:12 is 33.69 degrees and 12:12 is 45 degrees. To go the other way, multiply the tangent of the angle by 12: 30 degrees is 6.93:12. The pitch table above lists the common values.
What is the rafter length for a 24 foot span at 6:12?
The run is 12 feet and the rise is 6 feet, so the common rafter is 13.42 feet, about 13 feet 5 inches, with no overhang or ridge board. Allowing for a 1.5 inch ridge board and a 12 inch overhang, the length rises to 14.46 feet, or 14 feet 5 9/16 inches.
How long is a rafter for a 12 foot span?
At 4:12 the run is 6 feet and the common rafter is 6.32 feet. At 6:12 it is 6.71 feet and at 12:12 it is 8.49 feet. These are measured along the rafter from the centre of the span to the wall, before overhang and ridge adjustments. The span table above covers more pitches.
How long is a rafter for a 20 foot span?
A 20 foot span has a 10 foot run. At 4:12 the rafter is 10.54 feet, at 6:12 it is 11.18 feet, at 8:12 it is 12.02 feet and at 12:12 it is 14.14 feet. Add the tail for any overhang and subtract half of the ridge board.
How do you calculate a hip rafter?
A hip rafter runs along the diagonal of the corner, so its run is the common run times the square root of 2. Its length is the square root of that diagonal run squared plus the rise squared. For a 12 foot common run and a 6 foot rise the hip is 19.4 feet, longer than the 13.4 foot common rafter.
How do you calculate a valley rafter?
A valley rafter has the same length as the hip rafter when the two roof planes have equal pitch and meet at a 90 degree corner. Use the common run times the square root of 2 for the horizontal distance, then add the rise by the Pythagorean theorem. Unequal pitches or other angles need a different calculation.
What is the rafter tail?
The rafter tail is the part of the rafter that extends past the wall plate to form the eave overhang. Its length along the slope is the horizontal overhang times the square root of 1 plus (pitch/12) squared. A 12 inch overhang on a 6:12 roof needs a tail of 13.4 inches along the rafter.
How do I add an overhang to the rafter length?
Add the tail to the common rafter. Convert the horizontal overhang to a length along the slope by multiplying by the length factor for your pitch, which is 1.118 for 6:12. The calculator does this when you enter the overhang and shows the total rafter length and the length without overhang.
Do I subtract the ridge board thickness?
Yes. The rafters butt against the sides of the ridge board, so each one runs to the board's face and not to the centre line. Subtract half the ridge thickness from the run. A 1.5 inch ridge board takes 0.75 inches off the run and, at 6:12, about 0.84 inches off each rafter.
How many rafters do I need?
Divide the building length by the spacing, round up, add one for the end, and double the result for a gable roof, with a rafter on each side. A 30 foot building at 16 inches on centre needs 24 rafters per side (23 spaces plus the end one), so 48 in total. Closer spacing means more rafters.
What rafter spacing should I use?
Common spacing is 12, 16, 19.2 or 24 inches on centre. The right choice depends on the rafter size, the span, the roof load and the sheathing, which are set by your local code and lumber span tables. This calculator uses your spacing only to count the rafters and does not size the lumber.
How do I find the rise of a roof?
Multiply the run by the pitch and divide by 12. A 12 foot run at 6:12 gives a 6 foot rise. In angle terms the rise is the run times the tangent of the angle. The rise tells you how high the ridge sits above the wall plate and helps plan ceiling heights and trusses.
What is the difference between rafter and truss?
A rafter is a single sloped member that, with its partner on the other side, carries the roof loads onto the walls and is cut and assembled on site. A truss is a factory-built frame that includes rafter-like top chords and a bottom chord joined with connectors. This calculator finds the length of a rafter.
What is a common rafter?
A common rafter runs at a right angle to the ridge and the wall plates, from the wall plate to the ridge board. It is the standard rafter in a gable roof. Hips and valleys, jack rafters and cripples are the other types and they are cut from the common rafter's geometry.
What is the difference between rafter span and building span?
The building span is the width between the outside walls. The rafter's run is only half of it for a gable roof. People also speak of a rafter's span as the horizontal distance it crosses between supports, which is a structural question about load, lumber size and spacing and not a length. Check your local code for those.
Can this calculator size my rafters?
No. It finds lengths, angles and counts from the geometry. Which lumber size and spacing a given span needs depends on the wood species, grade, roof load and local building code. Use your code's span tables or an engineer for that, then enter your chosen spacing here for the rafter count.
How do I calculate a shed roof rafter?
A shed roof slopes one way, so the run is the full span from the low wall to the high wall. At 4:12 over a 12 foot span the rise is 4 feet and the rafter is 12.65 feet, or 13.7 feet with a 12 inch overhang. Choose the shed roof option in the calculator.
How do I calculate a gable roof rafter?
The two sides slope away from a central ridge, so each rafter spans only half the building width. Use half the span, less half the ridge board, as the run, then apply the pitch. The calculator's gable option does the whole sum and counts the rafters on both sides.
What angle do I cut at the ridge and the wall?
The plumb cut at the ridge is the roof angle measured from vertical: for 6:12, 26.57 degrees from the vertical edge. The level or seat cut at the wall is 90 degrees minus that angle, or 63.43 degrees. On a speed square, set the pivot at the pitch number on the common scale and mark along the edge.
How do I measure a rafter in feet and inches?
Divide the length in inches by 12 for feet, and read the remainder as inches. The calculator shows the decimal feet and the result in feet, inches and sixteenths. A rafter of 14.4646 feet is 14 feet 5 9/16 inches. Round up to the next stocked board length when buying.
What rafter length should I buy?
Buy the next standard lumber length above the calculated length, since stock comes in 2 foot increments. A 14.46 foot rafter needs a 16 foot board, and a 13.4 foot rafter also needs a 14 or 16 foot board depending on what you have in stock. Add a little for the cut at each end.
How do I convert a roof angle in degrees to rafter length?
Divide the run by the cosine of the angle. A 12 foot run at 30 degrees gives 12 / cos 30 = 13.86 feet. Pick the degrees option for the pitch in the calculator, enter the angle, and it applies this directly and also reports the pitch in x:12 form.
What is the difference between hip and valley rafters?
A hip rafter sits at an outside corner where two roof planes meet, forming a ridge that slopes down to the corner. A valley rafter sits at an inside corner where two planes meet, forming a trough that carries water. For equal pitches at a 90 degree corner, the two have the same length.
What is the hip rafter length factor?
For a 90 degree corner with equal pitches, a hip or valley rafter is the square root of 2 + (pitch/12) squared per foot of common run. At 6:12 the factor is 1.5 and at 12:12 it is 1.732. Multiply the factor by the common run to find the hip length, as in the table above.
Does the roof overhang change the pitch?
No. The pitch is set by the rise and the run, and the overhang is an extension of the same slope beyond the wall. It lengthens the rafter's tail, not its pitch. The calculator's total rafter length adds that tail to the common rafter.
How do I calculate rafter length with a speed square?
Set the pivot at the pitch number on the common scale, such as 6 for 6:12, and mark along the edge for each foot of run. Each mark advances 12 inches of run and the same distance along the rafter, which is 13.42 inches for 6:12. The calculator gives the total length directly.
What is the unit run of a rafter?
The unit run is 12 inches, the standard horizontal distance used to describe pitch. A rafter's unit length is the sloped distance for that 12 inches: 13.42 inches at 6:12 and 16.97 inches at 12:12. Multiply the unit length by the run in feet for the rafter length.
How do I calculate rafter length for a 30 foot building?
Use a 15 foot run for a gable roof, less half of the ridge board. At 6:12 the rise is 7.5 feet and the common rafter is about 16.77 feet before overhang and ridge adjustment. Enter your actual pitch and overhang to get the final cut length.
What is the rafter length for a 12:12 pitch?
A 12:12 pitch is a 45 degree slope, so the rafter is the run times the square root of 2, or 1.414 feet per foot of run. A 10 foot run gives a 14.14 foot rafter. The pitch table above lists the length factor for other pitches.
Can I use this for a lean-to roof?
Yes. A lean-to is a shed roof, so choose the shed option and enter the full span from the low wall to the high wall as the run. The calculator returns the rafter length, the tail for your overhang and the roof angle for that single slope.
References
- [1] Wikipedia contributors. “Roof pitch.” Wikipedia. Accessed 2026-10-05.
- [2] Wikipedia contributors. “Rafter.” Wikipedia. Accessed 2026-10-05.
Related calculators
- Asphalt CalculatorAsphalt calculator for driveways, lots and patches. Enter area and thickness to get tons, cubic yards, coverage per ton and cost, in imperial or metric.Open
- Asphalt Driveway Cost CalculatorAsphalt driveway cost calculator. Enter size, thickness and your prices for tons, base, labour, delivery and sealing, with total and cost per sq ft.Open
- Bitumen CalculatorBitumen calculator for asphalt mix and spray coats. Find bitumen in tonnes, tons, litres, gallons and drums from area, thickness and binder content.Open
- Board Foot CalculatorBoard foot calculator for lumber. Enter thickness, width and length to get board feet, cubic feet, waste and cost, with nominal size and metric options.Open
