How it works
Fence materials follow from the post spacing. Divide the total length by the spacing to get the number of sections, round up, and add one post for the end. Corners and gates each need an extra post, so add those by hand if your fence turns or has a gate.
Eight feet is the standard spacing for wood fences because rails come in 8 foot lengths. Six feet is stronger in windy areas or for tall privacy fences. Most 6 foot privacy fences use three rails; a 4 foot picket fence uses two.
Set posts about one third of their above-ground height into the ground, below the frost line in cold climates, and use one to two 50 lb bags of concrete per post depending on hole size.