A roof frame consists primarily of two components: the rafters, which are the load-bearing elements of the roof, and the roof sheathing (or sheeting), which is nailed on top of the rafters to form a continuous roof surface. Plywood or Oriented Strand Board (OSB) is typically used for roof sheathing, but cheap one-inch boards are also an option. To determine the amount of roof sheathing you should buy, you need to calculate the square footage of your roof surface.
Determine the overall "run" of your roof. In a standard gable roof in which the roof's ridge is over the centre of the building, the overall run is the distance from the outside of the wall to the centre of the building. For example, a house is 20 feet wide by 30 feet long. The run is 10 feet.
Divide the first number of your roof pitch by the second number to change your roof pitch to a decimal. The example house has a 6:12 pitch, so decimal pitch = 6 / 12 = 0.5
Multiply the decimal pitch by the run to calculate the rise of the roof. (see References 1) In the example house, the rise is 10 x 0.5 = 5 feet. You can now visualise each half of your roof as a right triangle. You know the length of the two shorter sides (the rise and run). The long side of the triangle represents the length from the wall to the ridge along the roof surface.
Calculate the long side of the triangle using the following formula: Length along roof surface = square root (run^2 + rise^2). In the example, length = square root of (10^2 + 5^2) = 11.2 feet.
Increase this length according to how much length (along the roof surface) extends past the edge of the wall. In the example house, the rafters are cut with 12 extra inches to provide an overhang, so the total length along the roof surface is 11.2 + 1 = 12.2 feet.
Multiply the total length along the roof surface by the length of the house, including any roof overhang at the gable ends. This tells you the total area of half of the roof. The example house is 30 feet long and the roof extends 1 foot past the gable ends, so the area of half of the roof = 32 x 12.2 = 390.4 square feet.
Multiply this area by two to estimate the entire roof area: 390.4 x 2 = 780.8 square feet. If you are sheathing with boards, you must buy enough "board feet" to cover this area. If you are sheathing with plywood or OSB, divide the total area by 32 to determine the number of 4-by-8 sheets to buy: 780.8 / 32 = 24.4 = 25 sheets.