A rafter cut an inch too short is scrap lumber, and on a shed or garage roof you may need a dozen or more of them. Knowing how to calculate rafter length lets you cut one accurate pattern rafter and copy it with confidence. The math needs only three inputs: the building span, the roof pitch and the overhang you want. From those you find the run, the rise and the sloped length, then adjust for the ridge board.
The numbers used here are worked examples for learning the method. Rafter size, spacing, species and grade depend on span, snow load, wind exposure and roofing weight, and those are set by your local building department, the span tables it adopts or a licensed engineer. Get that sizing confirmed before you buy lumber.
- How to Calculate Rafter Length: The Terms You Need
- Tools and Materials
- Step 1: Find the Run From the Span
- Step 2: Find the Rise From the Pitch
- Step 3: Use the Pythagorean Theorem
- Step 4: The Faster Way With Pitch Multipliers
- Step 5: Subtract Half the Ridge Board
- Step 6: Add the Overhang
- Worked 6/12 Example From Start to Finish
- Cutting and Testing a Pattern Rafter
- Troubleshooting Common Errors
- Safety on the Saw and on the Roof
- Costs and When to Call a Pro
- Frequently Asked Questions
How to Calculate Rafter Length: The Terms You Need
Rafter math uses a handful of words that are worth pinning down before you pick up a calculator:
- Span: the horizontal distance between the outside faces of the two supporting walls.
- Run: the horizontal distance one rafter covers, usually half the span on a symmetrical gable roof.
- Rise: the vertical height the rafter climbs over its run.
- Pitch: rise per 12 inches of run, written as 6/12, 8/12 and so on.
- Line length: the sloped length of the rafter measured along a line from the outside of the wall plate to the center of the ridge.
- Overhang (tail): the part of the rafter that extends past the wall to form the eave.
- Bird’s mouth: the notch where the rafter sits on the top plate.
Think of the rafter as the long side of a right triangle. The run is the base, the rise is the height and the rafter line length is the hypotenuse. Everything else follows from that picture.
Tools and Materials
- A 25 ft tape measure and a pencil or carpenter’s crayon
- A speed square, which has pitch markings that make laying out plumb and seat cuts quick
- A framing square with stair gauges, useful for stepping off longer rafters
- A calculator with a square root function, or a construction calculator
- A circular saw with a sharp framing blade, plus a handsaw to finish bird’s mouth corners
- Safety glasses, hearing protection and work gloves
Step 1: Find the Run From the Span
Measure the span across the outside faces of the wall top plates. On a standard gable roof with the ridge centered, divide by two:
- Run = span / 2
For a building with an example span of 24 feet, the run is 12 feet. If the ridge is offset (as on a saltbox or a lean-to), measure the run from the wall to the point directly under the ridge instead.
Step 2: Find the Rise From the Pitch
Pitch tells you how many inches the roof climbs per foot of run. Multiply the pitch number by the run in feet to get the total rise in inches:
- Rise (inches) = pitch rise x run (feet)
For a 6/12 roof with a 12 foot run, the rise is 6 x 12 = 72 inches, or 6 feet. If you know the rise but not the pitch, reverse it: divide the rise in inches by the run in feet.
Step 3: Use the Pythagorean Theorem
With run and rise in the same units, the line length is:
- Rafter line length = square root of (run squared + rise squared)
For the example: 12 squared is 144, 6 squared is 36, the total is 180, and the square root of 180 is 13.42 feet. That is the theoretical length from the outside of the wall plate to the centerline of the ridge, before any adjustments.
Step 4: The Faster Way With Pitch Multipliers
Most carpenters skip the squaring by using a pitch multiplier, which is the rafter length per foot of run. Multiply the run by the factor for your pitch:
| Pitch | Multiplier | Rafter length per foot of run |
|---|---|---|
| 4/12 | 1.054 | 12.65 in |
| 5/12 | 1.083 | 13.00 in |
| 6/12 | 1.118 | 13.42 in |
| 7/12 | 1.158 | 13.89 in |
| 8/12 | 1.202 | 14.42 in |
| 9/12 | 1.250 | 15.00 in |
| 10/12 | 1.302 | 15.62 in |
| 12/12 | 1.414 | 16.97 in |
For our example, 12 ft x 1.118 = 13.42 ft, matching the Pythagorean result. You can derive any multiplier yourself: take the square root of (144 + pitch rise squared) and divide by 12.
Step 5: Subtract Half the Ridge Board
The line length runs to the center of the ridge, but the rafter actually stops at the face of the ridge board. Shorten the run by half the ridge thickness, measured horizontally, and recalculate. A nominal 2x ridge is 1.5 inches thick, so take off 0.75 inch of run.
- Adjusted run: 12 ft minus 0.75 in = 11.9375 ft
- Adjusted line length: 11.9375 x 1.118 = 13.35 ft
The difference looks small, but skipping it pushes the ridge up and throws off every rafter pair. On a double ridge or a thicker engineered ridge beam, subtract half of its actual thickness.
Step 6: Add the Overhang
Decide how far the eave should extend horizontally past the wall, then convert that horizontal overhang to sloped length using the same multiplier.
- Example overhang: 18 inches horizontal, or 1.5 ft
- Sloped tail length: 1.5 x 1.118 = 1.68 ft
- Total rafter length: 13.35 + 1.68 = 15.03 ft
Since lumber comes in 2 foot increments, this example rafter is cut from a 16 foot board. That leaves some room to square the end and trim the tail to a final fascia line after all the rafters are up.
Worked 6/12 Example From Start to Finish
Here is the full calculation in one place, using example dimensions:
- Span: 24 ft, so run is 12 ft
- Pitch: 6/12, so rise is 72 in (6 ft)
- Line length: 12 x 1.118 = 13.42 ft
- Ridge adjustment: run reduced by 0.75 in, line length becomes 13.35 ft
- Overhang: 18 in horizontal adds 1.68 ft
- Total: about 15 ft, cut from 16 ft stock
Mark the plumb cut at the ridge end using the 6 mark on the common scale of the speed square, measure the 13.35 ft line length down the top edge, and lay out the bird’s mouth at that point. The seat cut should sit flat on the plate. A common rule of thumb is to leave at least two thirds of the rafter depth above the seat cut, but follow the plans or the engineer if they specify otherwise.
Cutting and Testing a Pattern Rafter
Knowing how to calculate rafter length is only half the job; proving it on the building is the other half. Cut one rafter, then cut a second as its mirror. Hold both in place with a short scrap of ridge board between them and check that the ridge sits at the right height and the seat cuts rest fully on the plates. If they fit, mark the first one “pattern” and trace it for the rest.
Crown every board before you mark it. Sight down the edge and put the slight upward bow on top so the roof sags into a straight line under load rather than dipping further.
Troubleshooting Common Errors
- Rafters too long at the ridge: You probably measured to the ridge center and forgot the half-thickness deduction.
- Bird’s mouth not landing on the plate: The span was measured inside the walls instead of outside the plates. Remeasure outside to outside.
- Uneven ridge line: Walls are rarely perfectly parallel. Measure span at each end and the middle, and adjust rafter pairs where the walls wander.
- Wrong overhang: Overhang was added as a sloped number without the multiplier. Always convert horizontal overhang with the pitch factor.
Safety on the Saw and on the Roof
Wear eye and ear protection when cutting, keep the circular saw’s blade guard working and support long boards on both sides so the kerf does not pinch the blade. On the building, use a stable ladder on firm, level ground with the top extending about 3 feet above the landing, maintain three points of contact and never overreach. Set rafters with a helper. For roofs two or more stories up, or steep pitches, use scaffolding and fall protection, or hire a framing crew.
Temporary bracing matters until sheathing goes on. Rafters need proper connection to the wall plates and ridge, including any hurricane ties or straps your local code requires for wind uplift, and the structure must be designed for your area’s snow load.
Costs and When to Call a Pro
Framing lumber for a small shed roof can cost from a few hundred dollars to over a thousand depending on size and species, while a garage or addition roof framed by a crew runs much higher once labor, sheathing and hardware are included. Prices swing with lumber markets, so get current quotes.
Hire a licensed contractor or engineer for hip and valley roofs, cathedral ceilings with ridge beams, additions tied into an existing roof, or any structure that needs a permit and stamped plans. They will confirm rafter size and spacing, ridge design and connections so the roof passes inspection and holds up to local loads.
Frequently Asked Questions
What is the rafter length for a 24 foot span with a 6/12 pitch?
The line length is about 13.42 ft per side before adjustments. After subtracting half a 1.5 inch ridge and adding an 18 inch overhang, the example rafter comes to about 15 ft.
How do I calculate rafter length using pitch without a calculator?
Use a framing square and step off the rafter one foot of run at a time, holding 12 on the body and the pitch rise on the tongue, or multiply the run by a pitch multiplier from a chart.
Do I measure overhang horizontally or along the rafter?
Decide overhang horizontally, since that is how eaves are specified, then multiply by the pitch factor to get the sloped length to add to the rafter.
Why do I subtract half the ridge board thickness?
The basic math runs to the center of the ridge, but each rafter stops at the ridge face. Removing half the thickness from the run keeps the ridge at the correct height.
Who decides what size rafters I need?
Your local building department, using its adopted span tables, or a licensed engineer sets rafter size and spacing based on span, loads and lumber grade.