Skip to content
RooferMath

Hip & Valley Rafter Calculator: the 17 Run Explained

Compute hip and valley rafter length correctly, using the diagonal plan run (the framing "17"), not the common rafter's 12 run. Full breakdown with the diagonal shown explicitly.

This tool gives the geometric length of a hip or valley rafter. It does not specify lumber size, bevel cuts, or backing angles, and does not address structural load. Cut a test rafter and check the fit, and size structural members with a licensed professional and your local building code.

hip_run_per_12 = √(12² + 12²) = √288 ≈ 16.9706 · hip_run = common_run × √2 · hip_length = √(hip_run² + rise²)

Hip length (incl. overhang)

19' 6.00"

Plan diagonal (hip run)

16' 11.65"

Common rafter, for comparison

13' 5.00"

Full breakdown

Metric Value
Common run (per plane)12' 0.00" · 12.000 ft
Plan diagonal (hip run)16' 11.65" · 16.971 ft
Shared rise6' 0.00" · 6.000 ft
Hip line length (no overhang)18' 0.00" · 18.000 ft
Overhang length (on the diagonal)1' 6.00" · 1.500 ft
Total hip length (incl. overhang)19' 6.00" · 19.500 ft
Common rafter length, same run/pitch13' 5.00" · 13.416 ft

Live plan view and slope diagram

Building corner plan view with the hip diagonal, and a slope triangle, redraws with the calculator run run diag 16.97 ft hip 18.00 ft rise 6.00 ft

Left: plan view of the building corner, the hip runs the 45° diagonal, not a wall's own run. Right: the hip's slope triangle using that longer diagonal run. Redraws live.

Why a hip rafter runs on the diagonal, not the 12

A common rafter runs in a straight line from the wall plate to the ridge, covering a horizontal distance you can measure directly along one wall. A hip rafter is different: it sits at the corner where two roof planes meet, and in plan view it runs at 45 degrees across that corner, along the diagonal of the square formed by the two walls' runs. For every 12 units of run each wall covers, the diagonal across that 12 by 12 square is the square root of 12 squared plus 12 squared, which comes out to about 16.9706, the number framers round to 17. A hip rafter's horizontal run is always longer than a common rafter's run for the same building, because it is covering the diagonal of a square instead of one side of it.

Where the 17 actually comes from

This is ordinary Pythagorean geometry, not a framing convention pulled from a table. Picture the building corner from above: one wall's run extends 12 units in one direction, the other wall's run extends 12 units perpendicular to it, and the hip rafter's horizontal projection is the straight line connecting the far ends of those two runs, the hypotenuse of a right triangle with two 12 unit legs. That hypotenuse is the square root of 288, about 16.9706. Every hip and valley length calculation on a regular, equal-pitch roof starts from this single fact: the hip's horizontal run is roughly 1.4142 times a common rafter's run for the same building, not the same 12 a common rafter uses.

Hip versus valley: location, not length

A hip rafter sits at an outside corner of the roof, where two sloped planes meet and lean away from each other, shedding water down and away on both sides. A valley rafter sits at an inside corner, typically where an addition or a wing meets the main roof, where two sloped planes meet and lean toward each other, forming a channel that collects and sheds water off both sections into one line. The role and the water management are different, but for a regular, equal-pitch intersection the rafter length geometry is identical in both cases: same diagonal run, same slope factor, same length formula. This calculator uses one set of math for both and simply changes the label depending on which one you select.

How overhang works on the diagonal

The overhang portion of a hip rafter follows the same diagonal relationship as the main run. A horizontal overhang projection, the same measurement you would use for a common rafter's overhang, becomes that value times the square root of 2 when expressed as diagonal run for the hip, then gets the hip's own slope factor applied, since the overhang is simply the same straight board continuing past the wall plate at the same slope. This calculator computes that diagonal overhang length separately and adds it to the main hip line length for the total.

Worked example

Take a 24 foot building span, giving a 12 foot common run on each side, at a 6/12 pitch. The shared rise is 12 times 6 divided by 12, which is 6 feet. The hip's diagonal run is 12 times the square root of 2, about 16.9706 feet. The hip line length is the square root of 16.9706 squared plus 6 squared, which is the square root of 288 plus 36, or the square root of 324, exactly 18.000 feet. Compare that to a common rafter over the same 12 foot run at the same pitch, which comes out to only 13.416 feet: the hip rafter is noticeably longer, about 34 percent more, purely because it runs the diagonal instead of the straight run. That gap is the entire reason a hip rafter needs its own calculation instead of reusing the common rafter's numbers.

When to bring in a professional

This calculator gives geometric length only. It does not determine bevel angles, backing angles, or how the hip meets the ridge board and jack rafters, all of which are practical carpentry decisions best confirmed with a test cut before committing full-length stock. It also says nothing about whether the resulting rafter, at whatever length, is strong enough for your span and load. For cut angles, framing details, and any question of allowable span or lumber sizing, work with a licensed professional and your local building code. For the common rafter this hip pairs with, see the Rafter Length Calculator, and for the pitch and slope factor inputs this page needs, see the Roof Pitch Chart.

Frequently asked questions

Why does a hip rafter use a 17 run instead of 12?

A common rafter runs straight from the wall plate to the ridge, a horizontal distance you measure directly. A hip rafter runs along the diagonal of the building corner in plan view, at 45 degrees to both walls. For every 12 units of run each wall covers, the diagonal across that square is the square root of 12 squared plus 12 squared, about 16.97, which framers round to 17. Using 12 for a hip rafter length is a common and consistent underestimate.

What is the difference between a hip rafter and a valley rafter?

A hip rafter sits at an outside corner of the roof, where two roof planes meet and slope away from each other. A valley rafter sits at an inside corner, where two roof planes meet and slope toward each other, forming a channel that sheds water off both sections. The location and the water-shedding role differ, but the rafter length geometry is identical: both run along the same 45 degree diagonal at the same slope factor.

Does a hip rafter use the same pitch as the common rafters?

For a regular hip roof, where both intersecting roof planes have the same pitch, yes: the hip rafter rises the same total height as the common rafters over its own longer, diagonal run, which is exactly why its slope factor and its length work out differently even though the roof height is shared.

How does overhang work on a hip rafter?

The same diagonal relationship applies to the overhang portion as to the main run: a given horizontal overhang projection becomes that value times the square root of 2 in diagonal terms, then gets the hip slope factor applied, since the overhang is simply a continuation of the same straight board at the same slope past the wall plate.

Does this calculator tell me the bevel or backing angle to cut?

No. This tool only computes the geometric length of a hip or valley rafter. Bevel cuts, backing angles, and how a hip rafter meets the ridge and jack rafters are separate carpentry questions this calculator does not address. Cut a test piece and check the fit before committing full-length stock.

Is a hip roof more expensive than a gable roof because the hip rafters are longer?

Longer individual hip rafters are only part of the picture. A hip roof also has jack rafters, more complex flashing at each hip, and typically more labor for cuts and fitting, all of which factor into cost beyond just this rafter length calculation. This tool gives you the length, not a full cost comparison.

Related tools

Roof Pitch ChartRoof Pitch CalculatorRafter Length CalculatorRoof Area CalculatorShingle Squares & Bundles Calculator