Repetitive boards are a pitch problem
Fences and decks are the same math: a run of identical boards spaced by a gap. For a fence, enter the run length, picket width, gap and rail count and get the picket count and lineal rail footage. For a deck, enter the deck dimensions, board width, gap and the board length sold at your yard to get the board count with a waste allowance.
Gaps are not optional
Deck boards need spacing for drainage and seasonal movement, typically 1/8 to 1/4 inch depending on how wet the lumber is. Fence pickets need the same courtesy in humid climates; a tight fence installed in July can buckle by fall. Wet pressure-treated stock shrinks as it dries, so installed-tight boards end up gapped anyway.
What the estimate leaves out
Posts, gates, joists, blocking, fasteners, stain and concrete are all separate line items the counter deliberately ignores. For the money side, the project cost estimator rolls lumber, hardware and sundries into one number.