A rafter is a right triangle, and once you see the triangle the calculation is simple. The run is the horizontal leg, the rise is the vertical leg, and the rafter is the hypotenuse between them. Three measurements go in: the building span, the roof pitch, and the overhang. Three steps come out: the run and the rise, the rafter length, and the cut length with the ridge allowance and the tail. This guide works through all three steps with real numbers from Waukegan roofs, so you can check your own roof against a worked example before you pick up a saw. If you want the answer without the arithmetic, the rafter calculator runs the same three steps for any span and pitch.
Step 1: Measure the Building Span
Start at the wall plates, not at the siding. Climb into the attic or measure across the top of the walls at the plate level, from the outside face of one wall plate to the outside face of the other. That distance is the span. A typical two-story home in Waukegan spans 28 ft, a ranch often spans 24 ft, and a wide two-story can span 36 ft. Write the number down in feet and inches, because every step after this one divides or multiplies it. Measure twice: a span that is off by 2 in makes the run off by 1 in, and the rafter length off by more than an inch on a steep pitch. If the two walls are not the same height, as on a shed roof, the span is still wall to wall, but the run is the full span instead of half of it, and the shed roof post covers that case.
The run is half the span. A 28 ft span has a 14 ft run, a 24 ft span has a 12 ft run, and a 30 ft span has a 15 ft run. The run is the horizontal distance the rafter covers from the wall plate to the ridge, and it is the bottom leg of the right triangle. Do not measure the run along the slope: the run is always horizontal, even though the rafter itself is sloped. If you measure the span in feet and inches, convert it to decimal feet before you divide: 28 ft 6 in is 28.5 ft, so the run is 14.25 ft. Keep the fraction until the end and round only the final length to the nearest sixteenth of an inch, or the rounding errors stack up.
Step 2: Find the Roof Pitch
The pitch is the rise in inches for every 12 in of run, written as a fraction over 12. A 6/12 pitch rises 6 in for every 12 in of run. A 4/12 pitch is low and shallow, a 12/12 pitch is a 45-degree roof, and most Waukegan homes sit between 5/12 and 8/12. To find the pitch of an existing roof, measure the rise over a 12 in level run: hold a level horizontal from the roof deck, measure 12 in along it, and measure down to the deck at that point. That drop is the pitch number. To find the pitch from the plans, divide the total rise by the run and multiply by 12: a 7 ft rise over a 14 ft run is 6/12 pitch. If you know the pitch and the run, the rise is the run times the pitch divided by 12: a 14 ft run at 6/12 pitch rises 7 ft.
The pitch also gives you the roof angle and the slope factor. The angle is the arctangent of the pitch over 12: 6/12 is 26.6 degrees, 4/12 is 18.4 degrees, and 12/12 is 45.0 degrees. The slope factor is the square root of one plus the pitch over 12 squared: 1.118 at 6/12, 1.054 at 4/12, and 1.414 at 12/12. The slope factor turns any horizontal distance into a sloped length, which is how the tail is worked out later. If your roof pitch is not a whole number, the calculator takes halves, such as 6.5/12, and the same formulas still work. For a full treatment of pitch itself, including how to measure it on a standing roof, read the roof pitch calculator page.
Step 3: Run the Pythagorean Calculation
Now the triangle. The rafter length is the square root of the run squared plus the rise squared. Work it in feet, then convert the answer to feet and inches at the end. For a 28 ft span at 6/12 pitch: the run is 14 ft, the rise is 7 ft, 14 squared is 196, 7 squared is 49, the sum is 245, and the square root of 245 is 15.65 ft. Multiply the decimal part by 12 to get inches: 0.65 times 12 is 7.8 in, so the rafter is 15 ft 7 13/16 in long. For a 24 ft span at 4/12 pitch: the run is 12 ft, the rise is 4 ft, 144 plus 16 is 160, and the square root is 12.65 ft, or 12 ft 7 13/16 in. For a 20 ft span at 12/12 pitch: the run is 10 ft, the rise is 10 ft, 100 plus 100 is 200, and the square root is 14.14 ft, or 14 ft 1 11/16 in. For a 30 ft span at 5/12 pitch: the run is 15 ft, the rise is 6.25 ft, 225 plus 39.06 is 264.06, and the square root is 16.25 ft, or 16 ft 3 in exactly.
| Span | Pitch | Run | Rise | Rafter length |
|---|---|---|---|---|
| 24 ft | 4/12 | 12 ft | 4 ft | 12 ft 7 13/16 in |
| 28 ft | 6/12 | 14 ft | 7 ft | 15 ft 7 13/16 in |
| 30 ft | 5/12 | 15 ft | 6.25 ft | 16 ft 3 in |
| 20 ft | 12/12 | 10 ft | 10 ft | 14 ft 1 11/16 in |
Check your answer against the table before you cut: if your number is far from the table for a similar span and pitch, one of the three inputs is wrong, and the usual suspect is the pitch. A pitch read as 8/12 when the roof is really 6/12 makes the rafter more than a foot too long on a 28 ft span. Run the same numbers through the rafter calculator as a second check: it uses the same formula, so the two answers must match to the sixteenth of an inch. If they do not match, the inputs differ somewhere, and the calculator shows the run and the rise it used, so you can see which input is off.
Step 4: Subtract the Ridge Board and Add the Tail
The Pythagorean length is measured to the center of the ridge, but the ridge board is 1.5 in thick, so the rafter stops 0.75 in short of the center along the horizontal, which is 0.75 in times the slope factor along the rafter. At 6/12 pitch the slope factor is 1.118, so the allowance is 0.84 in, and the ridge-to-birdsmouth cut length for the 28 ft span is 15 ft 7 in instead of 15 ft 7 13/16 in. On a 12/12 roof the allowance is 1.06 in, because the slope factor is 1.414. Mark the plumb cut at the ridge from this shorter length, not from the full length, or the ridge will sit high and the rafters will not meet it squarely.
The tail is the overhang times the slope factor. A 12 in overhang at 6/12 pitch gives a 1 ft 1 7/16 in tail, so the total board for the 28 ft span roof is 15 ft 7 in plus 1 ft 1 7/16 in, which is 16 ft 8 7/16 in. That means a 16 ft board is too short and an 18 ft board is the one to order. A 12 in overhang at 12/12 pitch gives a 1 ft 5 in tail, and an 18 in overhang at 12/12 gives a 2 ft 1 7/16 in tail. Mark the birdsmouth from the tail end, not from the ridge end: measure the tail up from the bottom of the board, mark the seat cut there, and the ridge-to-birdsmouth length falls into place above it.
Step 5: Cut a Pattern Rafter and Test It
Cut one rafter first and set it in place before you cut the rest. Check three things: the ridge plumb cut sits flat against the ridge board, the birdsmouth seat sits flat on the wall plate with the heel tight to the plate, and the tail is level with the other tails. If the ridge cut gaps at the top, the length is long: shorten the pattern by the gap measured along the rafter. If the birdsmouth seat does not sit flat, the seat cut is too deep or too shallow, and the seat angle is wrong. If the tail droops, the birdsmouth is cut too deep and the rafter is sitting low. Fix the pattern, test it again, and only then use it to mark the rest. A pattern rafter that fits is worth more than a perfect calculation, because the building itself is never as square as the plans say it is.
For a second opinion on the same calculation from a carpenter’s point of view, read the existing guide on how to calculate rafter length using roof pitch, which covers the same Pythagorean method with a framing square. It is a different angle on the same math, and the two guides agree on every number. If the roof has hips or valleys instead of a plain gable, the common rafter length is only the first step: the hip rafter and the jack rafters need their own calculation, which the hip rafter post covers.
Related reading: rafter calculator, plus our guides on rafter length chart and hip rafter calculator, and the roofing calculators hub.
Not Sure Your Rafter Math Is Right?
We will measure your span and pitch for free and check the rafter lengths before you cut. Call now for a free inspection in Waukegan and Lake County.
Frequently Asked Questions
What is the formula for rafter length?
Rafter length equals the square root of the run squared plus the rise squared. The run is half the building span, and the rise is the run times the pitch divided by 12. For a 28 ft span at 6/12 pitch, the run is 14 ft and the rise is 7 ft, so the length is the square root of 196 plus 49, which is 15.65 ft, or 15 ft 7 13/16 in.
How do you find the run of a rafter?
The run is half the building span, measured wall to wall. A 28 ft span has a 14 ft run, a 24 ft span has a 12 ft run, and a 30 ft span has a 15 ft run. Measure the span inside the building at the wall plates, not outside the siding, because the rafter sits on the plate. On a shed roof the run is the full span, because the rafter crosses the whole building on one slope.
How do you find the rise from the roof pitch?
Multiply the run by the pitch and divide by 12. A 14 ft run at 6/12 pitch rises 14 times 6 divided by 12, which is 7 ft. A 12 ft run at 4/12 pitch rises 4 ft. A 10 ft run at 12/12 pitch rises 10 ft. If you know the rise and the run but not the pitch, divide the rise by the run and multiply by 12: a 7 ft rise over a 14 ft run is 6/12 pitch.
Do you measure rafter length to the ridge or to the plate?
Both, but they are different numbers. The rafter length from the calculator is measured from the center of the ridge board to the outside of the wall plate. The cut length, ridge to birdsmouth, is shorter by the ridge board allowance: 0.75 in times the slope factor for a 1.5 in ridge board. On a 28 ft span at 6/12 pitch the ridge-to-plate length is 15 ft 7 13/16 in and the cut length is 15 ft 7 in.
How do you calculate rafter length without a calculator?
Use a framing square and the step-off method. Set the square on the rafter board with the 12 in mark on the tongue at the edge and the pitch number on the blade at the edge, then mark the plumb cut. Step the square along the board in 12 in run increments, marking each step, until you have stepped the full run. The distance from the first mark to the last is the rafter length. It is slower than the calculator, and it is how carpenters checked the math before calculators existed, but the Pythagorean calculation is faster and less prone to a slipped step.
Zayn Robert is a content specialist focused on roofing, construction, and home improvement topics. He creates easy-to-understand guides that help homeowners learn about roof measurements, materials, maintenance, and repair decisions. His work combines detailed research with practical insights from roofing professionals at Zuniga Roofing Inc.