Sections first
Take the gates off the length to get the fence itself: 100 ft less one 4 ft gate is 96 ft. Divide by the post spacing, center to center, and round up: 96 ÷ 8 = 12 sections. A part section at the end is still a section.
Type the length of the fence, the gates and the post spacing, and see how many posts, rails and pickets it takes, or how many panels, with the cost of each part as you type.
The working shows each count and why, so you can check it against the line on the ground.
Take the gates off the length to get the fence itself: 100 ft less one 4 ft gate is 96 ft. Divide by the post spacing, center to center, and round up: 96 ÷ 8 = 12 sections. A part section at the end is still a section.
A straight line of 12 sections has 13 posts, one more than the sections. Each gate is another span with its own post, and each corner needs a post of its own: 12 + 1 gate + 0 corners + 1 = 14 posts.
Rails run between the posts, two or three to a section: 12 × 2 = 24 rails. Pickets cover the fence: 96 ft is 1,152 in, and 1,152 ÷ (5.5 in picket + 0 gap) = 209.45, so 210 pickets. A gap of 0.5 in makes it 1,152 ÷ 6 = 192.
With panels the post spacing is the panel width: 96 ft in 8 ft panels is 12 panels on 14 posts. Measure the panel you will buy; panels sold as one width can differ by a little.
Gates are counted as their own line, at their own price. Their posts are already in the count, so do not add them again.
Press "Put this on an estimate" and the posts, rails, pickets or panels, and gates land on the estimate template, one line each at your prices. Fencing a yard as well? The sod calculator works out the lawn.
Take the gates off the length, divide by the post spacing and round up to whole sections; then add one post for each gate, one for each corner, and one to finish the line. A 100 ft fence with one 4 ft gate is 96 ft of fence; 96 ÷ 8 = 12 sections, so 12 + 1 + 1 = 14 posts.
Divide the length of fence by the width of a picket plus the gap between pickets, and round up. 96 ft is 1,152 in; with 5.5 in pickets and no gap that is 1,152 ÷ 5.5 = 209.45, so 210 pickets. With a 0.5 in gap it is 1,152 ÷ 6 = 192.
Two or three per section, between each pair of posts. Twelve sections with two rails each is 24 rails; with three it is 36. Each rail spans one section, so it is about as long as the post spacing.
Divide the length of fence by the width of a panel and round up: 96 ft of fence in 8 ft panels is 12 panels, on 14 posts with one gate. A panel cut short at the end still counts as a panel to buy.
Each corner adds a post. The calculator treats the fence as one line, so a corner or a gate that falls part way through a section can need one post more than the count. Walk the line, or work out each straight side on its own. A fence that closes all the way round on itself needs one post fewer.