Rafter Length Calculator

Common rafter length from building span, pitch, ridge board and overhang, with rise, cut angles and the board length to buy.

/12
1½ in for a 2× ridge board; 0 to measure to the centerline.
Rafter length
14′ 5 5/8″ (14.465 ft, 4.409 m)
Breakdown
Ridge to plate line 13′ 4 1/8″ + overhang 1′ 1 3/8″ (pitch factor 1.1180)
Rise
11.938 ft run → 5′ 11 5/8″ of rise to the ridge
Cut angles
26.6° plumb cut (seat cut 63.4° from plumb)
Lumber
16 ft boards · 56 common rafters for a gable roof

A common rafter runs from the top of the wall plate up to the ridge, at right angles to both. Its length is the hypotenuse of a right triangle: the horizontal run is half the building span (less half the ridge board), and the rise is the run times the pitch. Multiply the run by the pitch factor √(1 + (rise ÷ 12)²) and you have the rafter's line length. Add the overhang the same way. This rafter length calculator does both, shows the result in feet and inches to the nearest ⅛ inch, gives the plumb and seat cut angles for a speed square or miter saw, and suggests the stock board length.

Use the roof pitch calculator to work out the pitch from a rise and run, and the roofing shingles calculator to count shingles once the frame is up.

How to use the rafter length calculator

  1. Enter the span, measured across the building from the outside of one wall plate to the outside of the other.
  2. Enter the pitch, for example 6 for a 6/12 roof.
  3. Enter the ridge board thickness, usually 1½ in. The calculator subtracts half of it from each run.
  4. Enter the overhang as a horizontal distance beyond the wall, for example 12 in.
  5. Optionally enter the building length and spacing to count the common rafters for a gable roof.

Formula

Run = Span ÷ 2 − Ridge thickness ÷ 2  ·  Rise = Run × Pitch ÷ 12
Pitch factor = √(1 + (Pitch ÷ 12)²)
Rafter length = (Run + Overhang) × Pitch factor  ·  Plumb cut angle = arctan(Pitch ÷ 12)

Lengths are measured along the rafter's top edge (the line length used by framers). The birdsmouth seat cut and the tail cut are laid out from that line, so cut a pattern rafter and test it before cutting the rest.

Worked example

A 24 ft span, 6/12 pitch, 1½ in ridge board, 12 in overhang.

  1. Run: 12 ft − 0.75 in = 11.9375 ft.
  2. Pitch factor: √(1 + 0.25) = 1.1180.
  3. Line length: 11.9375 × 1.1180 = 13.347 ft = 13′ 4⅛″.
  4. Overhang: 1 × 1.1180 = 1.118 ft = 1′ 1⅜″.
  5. Total: 14.465 ft = 14′ 5⅝″, so buy 16 ft boards.
  6. Rise: 11.9375 × 0.5 = 5.969 ft, about 5′ 11⅝″. Plumb cut: 26.6°.

On a 36 ft building with rafters at 16 in o.c., there are 28 rafter positions along the length (27 spaces plus one), so 56 rafters for both sides.

Plumb cut angles by pitch

PitchAnglePitchAngle
3/1214.0°8/1233.7°
4/1218.4°9/1236.9°
5/1222.6°10/1239.8°
6/1226.6°12/1245.0°
7/1230.3°14/1249.4°

Rafter size is a structural decision

Length is only half the job. The rafter's size (2×6, 2×8, 2×10…) depends on the span, spacing, species and grade of lumber, roof dead load, snow load and ceiling attachment. The International Residential Code includes rafter span tables, and the American Wood Council publishes span tables and a free span calculator for checking a rafter size. Rafter ties or ceiling joists are needed to resist the outward thrust on the walls unless the ridge is a structural beam. If in doubt, ask your building department or an engineer. For lumber volume and price, the board foot calculator converts board counts into board feet.

Caveats and assumptions

  • Lengths are line lengths along the top edge; layout of the birdsmouth and tail cuts still needs care.
  • The rafter count assumes a simple gable with rafters on both sides and one at each end; adjust for gable-end framing, openings and hip roofs.
  • Hip and valley rafters use a different factor and are not covered here.
  • This tool does not size rafters for load; use span tables and local code.

Frequently asked questions

How do I calculate rafter length?

Find the run (half the span minus half the ridge board), multiply by the pitch factor √(1 + (pitch ÷ 12)²), then add the overhang times the same factor.

How long is a rafter for a 24 ft span at 6/12?

About 13′ 4⅛″ from the plate line to a 1½ in ridge board, or 14′ 5⅝″ with a 12 in overhang, so a 16 ft board.

What angle is the plumb cut on a 6/12 roof?

arctan(6 ÷ 12) = 26.6° from square.

Is the overhang measured level or along the rafter?

Enter it as a level (horizontal) distance from the wall. The calculator converts it to rafter length with the pitch factor.

What size rafter do I need?

That depends on span, spacing, lumber grade and loads. Use the IRC rafter span tables or the American Wood Council span calculator.

Sources

This calculator gives estimates for planning and education. Check measurements, local codes, supplier specs and your school's official policy before relying on a result. See our disclaimer and how we build and check calculators.