# How to calculate hip rafter length using the distance formula

A hip rafter is a rafter that runs from the end of a roof ridge to a corner of the eaves. The Pythagorean theorem allows you to calculate the length of the hip rafter without measuring it directly, which requires you to climb onto the roof.

This theorem states that the length of a right triangle's hypotenuse is equal to the square root of the sum of the squares of the lengths of the triangle's other two sides.

Place an angle finder against the underside of one of the rafters to obtain the angle of the roof. The underside of a rafter is typically available under the eaves of the house or in the attic. Assume for this example that the angle of the rafter is 23 degrees.

Measure the distance between the corners of the eaves on one end of the house to obtain the span of the roof. Assume this distance is 25 feet in this example.

Divide the span of the roof by two to obtain the run of the roof. The span of the roof is 25 feet, so the run of the roof is 25 / 2 = 12.5 feet.

Divide the run of the roof by the cosine of the angle of the roof to obtain the length of a common rafter. The run of the roof in this example is 12.5 feet and the angle of the roof is 23 degrees, so the length of a common rafter is 12.5 / cosine 23 degrees = 13.6 feet.

Measure the horizontal distance from a corner of the eave to the end of the roof's ridge. Assume for this example that this distance is 12 feet.

Add the square of the result from Step 4 to the square of the result from Step 5 to obtain the square of the length of the hip rafter. The length from Step 4 was 13.6 feet, and the length from Step 5 was 12 feet, so the sum of their squares is 13.6^2 + 12^2 = 329 square feet.

Take the square root of the result from Step 6 to obtain the length of the hip rafter. The result from Step 6 was 329 feet, so the length of the hip rafter is the square root of 326 square feet, or 18.1 feet.