How to build a shed roof step by step. sorry now that we've built all the walls are not gonna take a step back for a 0:07 build the walls i actually used the floor debt to lay out the roof instead. 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.. This step by step diy article is about how to build a roof for a 12