Rafter Length Calculator

Find the exact rafter length from horizontal run and roof pitch.

Home Imperial + metric Hip/valley
Rate this calculator · 5.0 (2)

Rafter length

Pythagoras · run + pitch + overhang · common, hip, valley

Instructions — Rafter Length Calculator

1

Enter the run

Run is the horizontal distance from the outside wall plate to the ridge — half the building width for a symmetrical gable roof. A 30 ft wide house has a 15 ft run.

2

Pick the pitch

Pitch is rise per 12 inches of run. 4:12 is the most common US residential pitch; 6:12 sheds water and snow better; 12:12 is a 45 degree roof. The dropdown covers 2:12 through 12:12.

3

Add the overhang

Overhang is the eave projection past the wall — typically 12 to 24 inches on US homes. Pick the rafter type at the top: common for gable roofs, hip/valley adds a 1.06 factor for the diagonal corner rafters.

Buy 12 in long on every rafter for the birds-mouth seat cut and ridge plumb cut. Cutting tight to the calculated length leaves no waste room.
Quick check: at 6:12 pitch, the rafter multiplier is 1.118 — so rafter length is run + about 12%. A 15 ft run becomes a 16.77 ft common rafter.

Formulas

The rafter length problem is the hypotenuse of a right triangle: the horizontal run forms one leg, the vertical rise the other, and the rafter is the hypotenuse on the slope. Every formula below comes from the Pythagorean theorem.

Rafter length (Pythagoras)
$$ L = \sqrt{\text{run}^2 + \text{rise}^2} $$
The base formula. For a 15 ft run at 6:12 pitch (rise = 7.5 ft), rafter length = √(15² + 7.5²) = √(225 + 56.25) = 16.77 ft.
Rise from pitch and run
$$ \text{rise} = \text{run} \times \frac{\text{pitch}}{12} $$
Pitch x:12 means x inches of rise per 12 inches of run. At 6:12, rise is half the run; at 12:12, rise equals run (45 degrees).
Rafter multiplier
$$ M = \sqrt{1 + \left(\frac{\text{pitch}}{12}\right)^2} $$
Multiply the run by M to get rafter length in one step. M = 1.054 at 4:12, 1.118 at 6:12, 1.202 at 8:12, 1.414 at 12:12.
Roof angle from pitch
$$ \theta = \arctan\left(\frac{\text{pitch}}{12}\right) $$
Pitch 4:12 = 18.43°, 6:12 = 26.57°, 8:12 = 33.69°, 10:12 = 39.81°, 12:12 = 45.00°.
Overhang on slope
$$ L_{tail} = \text{overhang} \times M $$
The tail of the rafter follows the same slope, so the overhang projected on the slope is the horizontal overhang times the rafter multiplier.
Hip and valley factor
$$ L_{hip} = L_{common} \times 1.06 \text{ (approx)} $$
A hip or valley rafter runs diagonally between two slopes, so it is about 6% longer than a common rafter at the same run. The exact factor depends on both pitches; 1.06 is the typical residential approximation.

Reference

Rafter multiplier and angle by pitch
PitchMultiplierAngleSlope %
2:121.01389.46°16.7%
3:121.030814.04°25.0%
4:121.054118.43°33.3%
5:121.083322.62°41.7%
6:121.118026.57°50.0%
7:121.157730.26°58.3%
8:121.201933.69°66.7%
9:121.250036.87°75.0%
10:121.301739.81°83.3%
12:121.414245.00°100.0%

Common rafter length by run and pitch (feet)

Length of one rafter from ridge to wall plate, excluding overhang. Multiply run by the multiplier in the table above.

12 ft run (24 ft span)
PitchRafter
4:1212.65 ft
6:1213.42 ft
8:1214.42 ft
12:1216.97 ft
20 ft run (40 ft span)
PitchRafter
4:1221.08 ft
6:1222.36 ft
8:1224.04 ft
12:1228.28 ft

Hip and valley rafters add roughly 6% to a common rafter length at the same run. IRC R802.5 sets maximum allowable spans by lumber size, species, grade, and roof load — always confirm against the local code before ordering material.

Article — Rafter Length Calculator

Rafter length calculator: Pythagoras for any roof pitch

A rafter length calculator finds the sloped distance from the ridge to the wall plate using the Pythagorean theorem: rafter = √(run² + rise²). Run is the horizontal half-span; rise is run × pitch / 12. A 15 ft run at 6:12 pitch produces a rafter 16.77 ft long before overhang. Add overhang × rafter multiplier for the tail, and add roughly 6% for hip or valley rafters that cut diagonally between two sloped planes.

The rafter length formula

Every rafter is the hypotenuse of a right triangle. The horizontal leg is the run, the vertical leg is the rise, and the diagonal is the rafter itself. Pitch supplies the ratio between rise and run.

Rafter math at a glance
rise = run × pitch / 12 vertical height
L = √(run² + rise²) Pythagoras
M = √(1 + (pitch/12)²) rafter multiplier
L = run × M one-step form
angle = arctan(pitch/12) degrees from horizontal
L_tail = overhang × M tail on slope

The one-step form using the rafter multiplier saves time on the job site. A 20 ft run at 8:12 pitch is 20 × 1.2019 = 24.04 ft. A 12 ft run at 4:12 is 12 × 1.0541 = 12.65 ft. Carpenters carry the multipliers stamped into framing squares so the work happens without a calculator.

Roof pitch and rafter length

Pitch is expressed as rise over a 12 inch run. 4:12 means 4 inches of vertical rise for every 12 inches of horizontal travel. Below 2:12 the roof is too flat for shingles and needs a membrane system. Between 4:12 and 9:12 lies most of US residential construction. Above 12:12 the roof exceeds 45 degrees and crosses into the steep-slope category that demands harnesses and roof jacks for safe installation.

4:12 PITCH
M = 1.054
18.4° · standard asphalt
6:12 PITCH
M = 1.118
26.6° · sheds snow well
8:12 PITCH
M = 1.202
33.7° · traditional gable
12:12 PITCH
M = 1.414
45.0° · steep slope

Rafter overhang and tail length

The overhang is the part of the rafter that extends past the wall plate. Standard US residential overhang runs 12 to 24 inches. The overhang shades windows, protects exterior walls from rain, and conceals the soffit and gutter. On the slope, the tail length is the horizontal overhang multiplied by the rafter multiplier.

For a 6:12 roof with an 18 inch overhang, the tail on the slope is 18 × 1.118 = 20.12 inches. The full rafter — ridge to fascia — is run × M plus overhang × M. A 15 ft run with an 18 inch overhang at 6:12 pitch needs a rafter that is 16.77 + 1.68 = 18.45 ft long, cut from a 20 ft 2×10.

Tip

Buy lumber one foot longer than the calculated rafter length on every piece. The extra absorbs the birds-mouth seat cut, the ridge plumb cut, and any layout error. Pre-cutting tight to the calculated length leaves no margin and turns a single mistake into a wasted 16 ft board.

Hip and valley rafter length

Common rafters run perpendicular to the ridge. Hip and valley rafters run diagonally between two adjacent sloped planes, so their effective run is longer than a common rafter at the same horizontal distance. The approximation roughly √2 × common rafter length (≈ 1.34× at 6:12 pitch) works for most residential pitches between 3:12 and 8:12 with equal slopes on both sides.

Did you know

The exact hip rafter multiplier depends on both adjacent pitches. For equal slopes the formula is √(17² + pitch²) / 12 — a 6:12 hip uses √(289 + 36) / 12 = 18.03 / 12 = 1.503 inches of hip rafter per inch of run on the diagonal. Carpenters round to 1.06 against common-rafter length for quick estimation, then cut precise compound angles using a framing square or rafter-square hip tables.

The birds-mouth and ridge cut

Two cuts shorten every common rafter. The birds-mouth is the triangular notch where the rafter sits on the top plate; it has a horizontal seat cut and a vertical heel cut. The ridge cut is a plumb cut at the upper end that mates against the ridge board. IRC R802.5 limits the seat cut depth to one-third of the rafter depth, since the cut removes bending strength.

Do not cut the birds-mouth too deep

The seat cut must not exceed one-third of the rafter depth. A 2×10 rafter (actual 9.25 in) allows a maximum 3 in deep seat. Deeper cuts remove the lower fibers that resist bending, and the rafter can fail at the cut even if it carries the rated span. If the wall plate sits too low for the standard seat, switch to a deeper rafter or add a structural ridge instead.

The ridge plumb cut removes half the ridge board thickness from the rafter top. A 1.5 inch ridge board takes 0.75 inches off each rafter at the ridge. The calculated rafter length usually includes this adjustment; if not, subtract 0.75 inches from the long-point of the plumb cut before marking.

Rafter span limits and code

IRC R802.5.1 and the AWC span tables set the maximum allowable horizontal projection for a given lumber size, species, grade, and load. A 2×6 #2 Douglas Fir-Larch rafter at 16 inch on-center spans 13 ft 4 in under 30 psf snow load; a 2×10 reaches 18 ft 0 in under the same conditions. The calculator returns the diagonal length, not the allowable span — always cross-check the AWC or IRC tables before ordering lumber. A 16.77 ft rafter at 6:12 pitch covers 15 ft of horizontal run, and 15 ft is the number the span table allows or rejects.

Common rafter length mistakes

The most frequent error is confusing run with full span. Run is half the span, measured from the outside of the wall plate to the centerline of the ridge. A 30 ft wide building has a 15 ft run, not a 30 ft run. The second mistake is forgetting overhang: a rafter cut without tail ends at the wall and leaves no soffit or gutter.

  • Run vs span — run is half the building width; span is the full width
  • Pitch convention — always rise over 12 inches of run, not over the slope length
  • Ridge subtraction — half the ridge thickness (~0.75 in for 1.5 in plate) comes off each rafter at the ridge cut
  • Birds-mouth seat depth — never more than one-third of rafter depth per IRC R802.5
  • Hip rafter factor — about 1.06 × common rafter for equal-pitch hip roofs
  • Lumber overage — order one foot longer than calculated on every rafter
  • Span tables — IRC span limits use horizontal run, not the calculated rafter length

Tools and field shortcuts

A framing square is the fastest pre-digital tool. Both arms carry rafter tables stamped into the steel: pick the pitch (rise per 12), read across to the common-rafter length per foot of run. A 6:12 pitch shows 13.42 inches of rafter per foot of run — multiply by run in feet to get the rafter length in inches. The same table gives hip-rafter and jack-rafter lengths. Phone apps and laser distance meters update the workflow, but the math has not changed since Euclid.

FAQ

Use the Pythagorean theorem: rafter length = √(run² + rise²). Run is the horizontal distance from the wall to the ridge. Rise is the vertical height, which equals run × pitch / 12. Example: 15 ft run, 6:12 pitch → rise = 7.5 ft → rafter = √(225 + 56.25) = 16.77 ft.
1.1180. To find the rafter multiplier for any pitch: M = √(1 + (pitch/12)²). At 6:12, M = √(1 + 0.25) = √1.25 = 1.1180. Multiply the run by 1.1180 to get the rafter length in one step.
Typical US residential overhang is 12 to 24 inches (30–60 cm). Longer eaves give better wall and window shade and rain protection; shorter eaves are common in storm-prone regions to reduce wind uplift. The overhang projected on the slope is overhang × rafter multiplier.
A common rafter runs straight from the ridge to the wall plate at the same pitch as the roof. A hip or valley rafter runs diagonally between two sloped planes and is about 6% longer at the same run. Hip rafters appear in pyramidal and hip roofs; valley rafters appear where two roof sections meet at an internal corner.
4:12 to 6:12 is the most common range for US homes. 4:12 is the minimum for standard asphalt shingles. 6:12 sheds water and snow better and gives a more traditional silhouette. Below 2:12 needs a membrane roof; above 9:12 needs safety harnesses and walking boards for installation.
Set a 12-inch level horizontally on the rafter or sheathing edge. Measure straight down from the end of the level to the rafter at exactly the 12-inch mark. The vertical measurement in inches is the pitch: 6 inches = 6:12. A digital pitch gauge or smartphone level app gives the same answer in seconds.
A birds-mouth (also written birdsmouth) is the triangular notch cut into the underside of a rafter where it sits on the top wall plate. The horizontal seat cut rests on the plate; the vertical heel cut keeps the rafter from sliding outward. IRC limits the seat cut to one-third of the rafter depth to preserve strength.
No. Run is measured from the outside face of the wall plate to the centerline of the ridge board. The half-wall and ridge-board thicknesses are accounted for separately during layout. Many calculators omit the ridge-board adjustment, which is typically 3/4 inch (half of a 1.5 inch ridge plate) and gets subtracted from the rafter at the top plumb cut.