The hip and valley factor is determined by finding the square root of ((rise/run)² + 2). (Divide the rise by the run. Square the result. Add 2. Find the square root of the result.)
The hip and valley factor is a number that is multiplied by the actual run (horizontal distance) of a common rafter to determine the length of a hip or valley rafter. Repeat, the actual run, not the length, of a common rafter. For precision, the thickness of the ridge board and any eave overhang should be taken into account when determining the run. The hip and valley factor varies according to the slope of the roof, as shown in the table below.
On a related note, the pitch (properly the “slope”) of a hip or valley rafter will not be the same as the pitch of the adjacent roof sections. While the slope of the common rafters are expressed as “X-in-12”, the slope of the hip and valley rafter on the same roof will be “X-in-16.97”. So where two roof sections intersect to form a 90° angle (a regular hip or valley), and each roof section has, for example, a 6-in-12 slope, the hip or valley rafter at that intersection will have a slope of 6-in-16.97.
Expressing the same thing using degrees: while the roof sections in this example have a 26.57° slope, the hip or valley rafter will have a 19.47° slope.
The seat and plumb cuts for hip and valley rafters will have angles that reflect this difference in slope.