Measure the distance between the outer walls on one end of the house. This distance is also known as the span of the roof. Ensure the two ends of the tape measure are the same height above the ground when you measure the roof's span. Assume the span of the roof is 31 feet in this example.
Hold a carpenter's level in the the vertical position and place the top end of the level against the underside of a roof rafter. Tilt the bottom end, as needed, to place the level's bubble centered, indicating the level is exactly vertical.
Hold a framing square on the side of the carpenter's level where the roof is lower. Place the tongue of the framing square flush with the carpenter's level so that the tongue points up. Slide the tongue of the framing square along the carpenter's level so that the upper corner of the framing square's body touches the underside of the rafter.
Measure the distance on the carpenter's level from the underside of the rafter to the upper edge of the framing square. This distance is the rise of the roof. Assume the rise of the roof is 6 inches for this example.
Measure the distance on the body of the framing square from the carpenter's level to the rafter. This distance is the run of the roof. Assume the run of the roof is 15 inches for this example.
Divide the rise of the roof by the run of the roof to obtain the slope of the roof. The slope of the roof in this example is 6/15 = 0.4.
Obtain the inverse tangent of the slope of the roof with a scientific calculator. This result is the angle of the roof. The inverse tangent of 0.4 is 21.8 degrees, so the roof's angle is 21.8 degrees in this example.
Calculate the length of the roof as half the roof's span divided by the cosine of the roof's angle. The roof's span is 31 feet, and the roof's angle is 21.8 degrees, so the length of the roof is (31/2)/cosine (21.8) = 16.7 feet.