Select the pitch of the rafters. This is how steep the roof will be. For rafters with a 6/12 pitch, the rafters rise 6 inches for every 12 inches of width. For a steeper roof, try a 7/12 pitch. For a flatter roof, try a 5/15 pitch.
Calculate the length of the rafters. The length depends on the pitch of the roof. Rafters sit perpendicular to the long side of the shed, so they must be long enough to cover the width. Measure the width of the shed between the outside of the exterior walls and divide that measurement by 2. Next, consult the rafter formula chart. (See Resources) A 6/12 pitch rafter is 13.4164 inches for every 12 inches of width. Multiply this by half the width of the shed to determine the length of the rafter. If you are using a ridge board at the top, be sure to deduct half the ridge board width from each rafter length.
Cut the rafters. Use a tape measure to find the length, then saw them straight across. Each rafter across the same width of the shed will be the same length, so you can cut them all at the same time. This works best if you place the 2-by-4 boards across two saw horses and use a power saw.
Measure the plumb cut of the rafters. This is the part where the rafters meet the ridge board at the top. You need a framing square for this. A framing square looks like two rulers connected at a right angle. A framing square works by placing the first number of your roof pitch on the vertical part (at the top outside edge) of the rafter, and the second number of your roof pitch on the horizontal part (on the bottom outside edge) of the rafter. For example, for a 6/12 pitch, place the vertical part at 6 inches and the horizontal part at 12 inches and keep both measurements on the outside of the rafter. Mark the plumb cut with a pencil in a vertical line, then cut.
Measure the heel cut of the rafters. This is the part where the rafters meet the walls. The framing square is placed at the bottom of the rafter in exactly the same way as it was used for the plumb cut. This time, mark the heel cut in pencil with a horizontal line at the bottom.
Nail the rafters together. Start by connecting the plumb cuts together or to a ridge board. Next, get some people to help you place the rafters on top of the walls and nail them down to the shed. Once the rafters are secure, you may attach the roofing material.