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 below.
One more thing: if you’re using this table, you should consider getting yourself a construction calculator. This one is very good.*