Skip to content
RoofPitch HQ

The roofing toolkit

Rafter Length Calculator: Span & Roof Pitch

Estimate the sloping wall-to-ridge length of a common rafter from a symmetrical gable roof's full span and pitch, with results in feet and inches.

Enter your measurements

Results update as you type. Use horizontal measurements, not sloping lengths.

Outside wall to outside wall for a symmetrical gable. The calculator uses half this span.

Common rafter length

conventional

12.65ft

One-side run
12 ft
Wall-to-ridge rise
4 ft
Length in inches
151.79 in

Symmetrical gable, wall to ridge centerline. Excludes overhangs, ridge thickness, and cutting allowances.

Start with a symmetrical gable

This rafter length calculator estimates the sloping wall-to-ridge distance for a common rafter. It assumes a straight, symmetrical gable with the ridge centered between the exterior wall reference lines. Enter the full horizontal span in feet, then enter the roof pitch. The result is a useful geometry check before detailed framing layout.

The calculator divides the span in half to obtain the horizontal run for a side of the roof. Do not enter an already-halved run in the span field. The roof pitch describes rise per 12 inches of horizontal distance; it does not describe how many inches the rafter itself rises along its sloping edge.

Follow the span-to-length example

For a full span of 24 feet and a 4:12 pitch, the horizontal run is 12 feet. That run produces a vertical rise of 4 feet. The sloping reference length is about 12.65 feet, or 151.79 inches.

These distances form a right triangle. The calculated length is the square root of the horizontal run squared plus the rise squared. Adding run and rise would trace a horizontal segment followed by a vertical segment; it would not measure the diagonal rafter line.

Example 1: 24 ft span with a 4:12 pitch

Span = 24 ft → run = 24 ÷ 2 = 12 ft → rise = 12 × 4 ÷ 12 = 4 ft → rafter length = √(12² + 4²) = 12.65 ft. All dimensions in the square-root expression are feet. The answer measures the straight sloping reference line, not the length of a board after cuts.

Example 2: 24 ft span with a 6:12 pitch

  1. Span: start with 24 ft measured horizontally between the wall reference lines.
  2. Run: divide the full span by two: 24 ÷ 2 = 12 ft from the wall to the ridge centerline in plan.
  3. Rise: multiply that run by the pitch ratio: 12 × 6 ÷ 12 = 6 ft vertically above the wall reference elevation.
  4. Rafter length: use the right triangle: √(12² + 6²) = 13.42 ft along the slope.

Compare this with the first example: the wall-to-wall span and horizontal run stay the same, but the higher pitch increases both rise and rafter length. Changing the spacing between rafters would not change either triangle. This is why pitch and span belong in a length calculation, while spacing belongs in a separate layout and structural check.

Example 3: 36 ft span with a 8:12 pitch

  1. Span: start with 36 ft measured horizontally between the wall reference lines.
  2. Run: divide the full span by two: 36 ÷ 2 = 18 ft from the wall to the ridge centerline in plan.
  3. Rise: multiply that run by the pitch ratio: 18 × 8 ÷ 12 = 12 ft vertically above the wall reference elevation.
  4. Rafter length: use the right triangle: √(18² + 12²) = 21.63 ft along the slope.

Here both the full span and pitch differ from the first example. Work through the run before calculating rise; using the full building span as the run would double the reference dimensions. The larger geometric result does not show that an ordinary piece of dimensional lumber can carry the roof over this distance without additional support.

Example 4: 20 ft span with a 12:12 pitch

  1. Span: start with 20 ft measured horizontally between the wall reference lines.
  2. Run: divide the full span by two: 20 ÷ 2 = 10 ft from the wall to the ridge centerline in plan.
  3. Rise: multiply that run by the pitch ratio: 10 × 12 ÷ 12 = 10 ft vertically above the wall reference elevation.
  4. Rafter length: use the right triangle: √(10² + 10²) = 14.14 ft along the slope.

At this pitch the rise equals the horizontal run, but the sloping length is longer than either one. Adding the two equal legs would overstate the diagonal. Keep the square-root result at full precision during any later geometry and round only the displayed answer; two decimal places are a reporting choice, not a construction tolerance.

Rafter length by pitch and span

These are common-rafter lengths for a symmetrical gable, measured from the wall reference line to the ridge centerline; they exclude overhangs. Choose the full horizontal span down the left side and the pitch across the top. Each cell is a sloping length in feet, rounded to two decimal places. On a phone, swipe the table sideways if all columns do not fit.

Common rafter reference lengths in feet, excluding overhangs
Full span (ft)4:126:128:1210:1212:12
2010.5411.1812.0213.0214.14
2412.6513.4214.4215.6216.97
2814.7615.6516.8318.2219.80
3216.8717.8919.2320.8322.63
3618.9720.1221.6323.4325.46

Every cell uses length = √((span ÷ 2)² + ((span ÷ 2) × pitch ÷ 12)²). Here “pitch” means the rise number before the colon. A row compares roofs with the same width; a column compares different widths at the same slope. If your measured span falls between rows, enter it in the calculator instead of rounding the building width to the nearest table entry.

This is a length lookup table, not an allowable-span table. A structural span table answers a different question: how far a specified framing member can span under stated loads and support conditions. Neither the roof pitch nor the geometric length identifies lumber grade, species, member depth, bracing, or connection requirements. Keep those decisions with the approved framing design.

Pitch angles and the length multiplier

The angle is measured above horizontal. The multiplier converts horizontal run into sloping common-rafter length for the same right triangle. It is also the surface-area factor for a uniform roof plane. Use the full roof pitch chart to compare angles and area factorswhen translating between a pitch label and a measured angle.

Pitch angles and common-rafter length multipliers
PitchAngle above horizontalLength / area factor
4:1218.43°1.054
6:1226.57°1.118
8:1233.69°1.202
10:1239.81°1.302
12:1245.00°1.414

Multiply the horizontal run, not the full span, by the factor to estimate one common rafter. The table shows rounded factors for comparison; the calculator and worked examples use unrounded values. Do not multiply an already-sloping measurement by the factor again. That would apply the pitch correction twice and inflate the result.

For an existing roof, measure the roof pitch from a safe, accessible location before using these tables. A horizontal level reading and a vertical rise must refer to the same triangle. The tape distance along a rafter is the sloping side, not the run. Do not climb onto a roof just to obtain a measurement; use suitable plans or get professional help when access cannot be made safely.

Rafter spacing and how many rafters you need

Two common spacing layouts in U.S. residential framing are 16 inches and 24 inches on center, often written “o.c.” On-center spacing measures from the center of one rafter to the center of the next, along the building length parallel to the ridge. It is not the clear gap between the edges of the boards and it is not the wall-to-ridge run.

Spacing affects the number of rafters and the load assigned to each member, so it matters when checking allowable structural spans. It does not change the geometric length of an individual common rafter when pitch and run stay fixed. Selecting closer spacing here cannot prove a proposed lumber size is adequate. The American Wood Council’s span-table tutorial explains how spacing, loads, species, and grade enter structural checks.

For a simple layout with a rafter position at each end, count per side = ceil(roof length in inches ÷ on-center spacing in inches) + 1. The division counts spaces; adding one counts the endpoint member. “Ceil” means round upward to a whole number. Roof length here runs along the ridge, while full span in the length calculator runs across it.

Basic rafter counts per roof side, including both end positions
Roof length (ft)16 in o.c. — per side24 in o.c. — per side
241913
322517
403121

For the 24 ft roof length, convert to inches: 24 × 12 = 288 in. At 16 in o.c., ceil(288 ÷ 16) + 1 = 19 rafters per side. At 24 in o.c., ceil(288 ÷ 24) + 1 = 13 per side. Two matching sides would have 38 or 26 rafters respectively in this simplified layout.

These counts describe regular positions, not a final lumber order. End framing, openings, doubled members, dormers, hips, valleys, and changes in support can alter the actual schedule. Where the length is not an exact multiple of spacing, the final interval may be shorter; do not spread all positions farther apart to make a preferred count fit. Confirm the actual layout and its endpoints with the framing plan.

Rafter count does not tell you how much roofing to buy. First calculate the roof surface area from the horizontal footprint and pitch, including the relevant overhang footprint. Surface coverage and framing quantities are separate estimates: boards are counted by the framing layout, while sheathing and roof covering depend on area, product coverage, and the project’s waste allowance.

Common rafter vs hip rafter vs valley rafter

Common rafters follow a single roof plane

A common rafter runs up a roof plane from the wall toward the ridge, perpendicular to the ridge in plan on a simple rectangular gable. Its horizontal run and vertical rise form the right triangle used here. In the symmetrical case, the ridge centerline is halfway across the building span. Repeated common rafters on that same plane therefore share a reference length, even though the roof may extend much farther along the ridge.

Hip rafters follow an outside intersection

A hip rafter follows the outward corner where two roof planes meet. Its plan-view run travels diagonally across the building rather than straight across the common-rafter run. That different horizontal path changes the sloping length. The roof-plane pitch does not make a hip rafter interchangeable with a common rafter, and entering half the building width here will not describe that diagonal path.

Valley rafters follow an inside intersection

A valley rafter follows the inward intersection where roof planes meet, such as where an addition joins the main roof. Its location and length depend on the intersecting planes, their elevations, and their pitches. When the two sides have different pitches, the intersection shifts and the valley geometry changes. A single pitch plus a symmetric full span cannot capture that condition.

This calculator intentionally stops at common-rafter geometry. It has no inputs for the second roof plane or a diagonal intersection, so a hip or valley answer cannot be inferred from its result. Short jack rafters that terminate at a hip or valley also have individual runs; they should not all be assigned the full common-rafter length. Identify the member on the roof plan before choosing which measurements to use.

Separate reference geometry from framing details

The output stops at the ridge centerline and excludes the overhang. Actual framing needs adjustments for the selected ridge detail, ridge-board thickness, bearing location, birdsmouth, and end cuts. Those details belong in the framing layout, so the displayed result should not go straight onto a board as a finished cut length.

An overhang adds a rafter tail beyond the wall and needs its own horizontal projection and cut layout. Do not add a horizontal overhang directly to the sloping result as though those distances followed the same line. Keep reference dimensions clearly labeled on your sketch.

Check the roof shape before reusing the answer

Hip rafters, valley rafters, unequal slopes, and off-center ridges do not share the simple half-span geometry used here. Measure and lay out those conditions separately. For additions, also confirm where the existing and proposed roof planes meet instead of assuming matching wall widths create matching ridge heights.

Length alone does not determine rafter size or structural capacity. Lumber species, grade, spacing, connections, and design loads require the applicable framing tables or an engineered design. Use this result to check dimensions and discuss the layout, then follow the approved framing requirements for construction.

A few helpful answers

Roof pitch, explained

Should I enter the whole roof span or the horizontal run?

Enter the full wall-to-wall span of a symmetrical gable. The calculator halves it internally. In the example, a 24-foot span produces a 12-foot horizontal run. Do not halve the span before entering it.

Does this length include the roof overhang?

No. It estimates the sloping distance from the wall reference line to the ridge centerline. Overhangs and their rafter tails need separate geometry and detailing. Ridge-board thickness, birdsmouth cuts, and end cuts also affect a finished rafter.

Can I use the result as a lumber cut length?

Use it as a geometric reference, not a ready-to-cut dimension. A framing layout must account for ridge thickness, bearing locations, overhangs, and cut details. Verify the plan and measurements before cutting or ordering structural lumber.

Will it work for a hip rafter or an off-center ridge?

This calculator is for a common rafter in a symmetrical gable roof. Hip and valley rafters have different geometry, and an off-center ridge gives unequal horizontal runs. Use a layout method matched to that roof rather than the half-span assumption.

What is the rafter length for a 6/12 pitch?

Pitch alone does not give a length; you also need the horizontal run. For a symmetrical gable with a 24 ft full span, the run is 12 ft and the rise is 6 ft. The common rafter reference length is √(12² + 6²) = 13.42 ft, excluding the overhang and framing deductions.

How do I calculate rafter length without the pitch?

If you know the horizontal run and vertical rise between the same endpoints, use length = √(run² + rise²), with both dimensions in the same units. You do not need a pitch label first. To use this calculator, convert that measured rise/run ratio to pitch and enter the full span for a symmetrical gable. Span alone is not enough to determine rafter length.

Does rafter length include the overhang?

The result on this page does not. It is the sloping wall-to-ridge-centerline reference length. A complete rafter may continue beyond the wall as a tail; that portion and the ridge, bearing, and cut adjustments must be detailed separately. Check the endpoints before comparing this result with a drawing or an existing board.

What is the difference between a rafter and a truss?

A rafter is an individual sloping roof-framing member. A truss is an engineered assembly of connected chords and webs that work together to carry loads. Its top chord may follow a similar slope, but this common-rafter geometry calculator does not design a truss, size its members, or specify its connections. Use the truss supplier’s design for that assembly.