Skip to content
Construction

Rafter Length Calculator

Enter your building width (or half-span), roof pitch, overhang, and ridge board thickness to get the exact rafter length you need to cut. The calculator applies the Pythagorean theorem with industry-standard slope-factor arithmetic, shows every step, and works in both metric and imperial units.

Your details

Switch between imperial feet-and-inches and metric metres.
Choose whether you know the full building width or just the horizontal run (half the width).
The total inside width of the building, measured from wall to wall.
ft
The roof pitch format you want to enter.
Vertical rise in inches for every 12 inches of horizontal run. Common values: 4, 6, 8, 12.
/ 12
The horizontal projection of the eave beyond the outside face of the wall. Typical range: 12-24 in (300-600 mm).
in
Actual thickness of the ridge board. Standard lumber: 1.5 in (38 mm) for a 2x, 3.5 in (89 mm) for a 4x. Half this value is deducted from the run.
in
Width of the wall top plate. Used to calculate birdsmouth seat-cut depth. Standard 2x4 wall: 3.5 in (89 mm).
in
Rafter lengthModerate slope
14.465

Total rafter length including overhang, minus ridge deduction.

Rafter length14 ft 5 9/16 in
Roof angle26.57deg
Slope factor1.118
Hip / valley factor1.5
Pitch (rise in 12)6/ 12
Birdsmouth seat depth0.261
Birdsmouth seat depth3 2/16 in
013.4226.8301224
Run (ft)

Rafter length is 14.465 ft (14 ft 5 9/16 in).

  • A 6.00/12 pitch equals a 26.6-degree slope, which is classified as moderate.
  • The slope factor is 1.1180: every foot of run requires 1.1180 ft of rafter material.
  • Birdsmouth seat-cut depth is 3.13 in. The maximum allowable seat cut is typically one-third of the rafter depth per code.

Next stepAdd 5-10% waste when ordering lumber. Double-check your ridge board length and verify your on-center spacing before cutting.

How to calculate rafter length

A common rafter spans from the ridge board at the peak to the wall plate at the eave. The core formula is a direct application of the Pythagorean theorem: rafter length = sqrt(rise squared + run squared). Because carpenters work in rise-per-12 notation, the industry rewrites this as a slope factor. The slope factor = sqrt(rise-squared + 144) divided by 12, where rise is the number of inches of vertical height per 12 inches of horizontal run. Multiply the adjusted run by this factor and you have the rafter line length. Two corrections are then applied: half the ridge board thickness is deducted from the run (because the rafter meets the ridge board, not the centre-line of the ridge), and the eave overhang is added to the run before multiplying. The result is the cut length of the rafter.

Birdsmouth cut and seat depth

The birdsmouth is the notch cut near the lower end of the rafter that lets it sit flat on the wall top plate. It has two parts: a level seat cut (horizontal) and a plumb heel cut (vertical). The seat-cut depth is the dimension measured plumb from the top edge of the rafter down to the bottom of the seat. It equals the plate width multiplied by the cosine of the roof angle. Building codes typically limit the seat depth to one-third of the rafter depth so that enough material remains above the notch for structural integrity. For example, on a 2x8 rafter (7.25 in actual depth) the maximum seat cut is about 2.4 in.

Roof pitch formats explained

Roof pitch is expressed in three equivalent ways. The most common in North America is the rise-over-12 ratio: a 6/12 pitch rises 6 inches for every 12 inches of horizontal run. The same slope can be expressed as an angle (26.57 degrees for 6/12) by taking the arctangent of rise divided by 12. It can also be expressed as a percentage (50% for 6/12), which is rise divided by run. This calculator accepts all three formats and converts between them automatically. Most building codes, blueprints, and framing square tables use the rise-in-12 format.

Hip and valley rafters

Hip and valley rafters run at 45 degrees to the building corners and must cover more ground than common rafters at the same pitch. Their length is calculated using the hip/valley slope factor: sqrt(rise-squared + 288) divided by 12. The 288 comes from sqrt(12 squared + 12 squared) squared = 288, reflecting the 45-degree plan angle. For a 6/12 pitch the hip/valley factor is approximately 1.3017, compared with 1.1180 for a common rafter. This calculator provides the hip/valley factor alongside the common slope factor so you can plan both rafter types from one result.

Common roof pitches - angle, slope factor, and typical use

Pitch (rise/12)Angle (deg)Slope factorHip/valley factorTypical application
2/129.461.01381.2019 Flat/low roofs (special membranes required)
3/1214.041.03081.2247 Minimum for asphalt shingles
4/1218.431.05411.2500 Low-slope residential
5/1222.621.08331.2748 Common residential
6/1226.571.11801.3017 Most common US residential pitch
7/1230.261.15771.3317 Steeper residential
8/1233.691.20191.3634 Cape Cod and similar styles
10/1239.811.30171.4289 Steep, enhanced attic space
12/1245.001.41421.5000 Equal rise and run, very steep

Slope factor is the rafter-length multiplier per unit of run. Hip/valley factor applies to 45-degree hip corners.

Frequently asked questions

What is the formula for rafter length?

The core formula is the Pythagorean theorem: rafter length = sqrt(rise squared + run squared). In practice, carpenters use the slope factor shortcut: rafter length = (run + overhang - half ridge thickness) multiplied by the slope factor, where slope factor = sqrt(rise-in-12 squared + 144) divided by 12. This calculator applies both deductions automatically.

Why do I deduct half the ridge board thickness?

The horizontal run is measured to the centre-line of the ridge. But the rafter actually meets the face of the ridge board, not its centre. So half the ridge board thickness (typically 0.75 in for a 2x board) is deducted from the run before calculating rafter length. Omitting this deduction makes rafters slightly long, causing them to push the ridge up above the intended height.

How deep should the birdsmouth seat cut be?

The seat-cut depth should equal the bearing width of the top plate multiplied by the cosine of the roof angle. For a standard 2x4 wall (3.5 in plate width) at a 6/12 pitch (26.57 degrees), the seat depth is about 3.13 in. Building codes generally cap the seat depth at one-third of the rafter depth to preserve structural strength above the notch.

What pitch is best for a house roof?

6/12 is the most common residential pitch in North America. It sheds water well, allows standard asphalt shingles, provides usable attic space, and is straightforward to frame. Pitches below 3/12 need special low-slope roofing materials. Pitches above 9/12 are considered steep and add cost for material and labour.

How do I convert roof pitch to degrees?

Take the arctangent of the rise divided by 12. For a 6/12 pitch: atan(6/12) = atan(0.5) = 26.57 degrees. For a 4/12 pitch: atan(4/12) = atan(0.333) = 18.43 degrees. This calculator shows the angle automatically for any pitch format you choose.

What is the slope factor and how do I use it?

The slope factor is the number you multiply by the run to get the rafter line length. It accounts for the extra length the rafter must travel because it rises at an angle rather than running flat. For a 6/12 pitch the slope factor is 1.1180, meaning every foot of horizontal run requires 1.1180 feet of rafter. It is also printed in standard framing square rafter tables.

Sources

Written by Aisha Rahman, PEng Structural Engineer · Toronto, Canada

Structural Engineer and PEng with 16 years designing and verifying load-bearing systems across Canada's most demanding construction environments.

Search 3,500+ calculators

Loading search…