Geotech
A sandbag wall is a pyramid. Most of the bags are in the bottom layers, and a 0.9 m wall twenty metres long takes close to nine hundred.
— sacks
Bags in the wall plus the spare share, rounded up
The base width, the laid size of a bag and the sand per bag are yours; flood guidance differs on the base-to-height ratio and on how full a bag should be, and the tool has no figure of its own for either. Each layer is one laid bag thick and the wall narrows evenly from the base width to a single bag width on top; every row is counted in whole bags along the wall and across it, so a short wall rounds up at each end. Bonding, the trench some guidance asks for under the first layer, and plastic sheeting are not counted. **This is a material count, not a flood defence design: a sandbag wall seeps and must be built and watched as your flood authority advises.**
Sandbag Flood Wall: Layers, Bags per Layer, Sand Tonnage & Woven Sacks to Order — free, with the formula and a worked example, at Textile School.