How the volume is built
Five fields drive the page: area with a sq ft or sq m menu (default 1000 sq ft), depth with an inches or cm menu (default 3 inches), a material menu carrying the density, a price per ton (default 45) and a bag size menu of 2 cu ft, 3 cu ft or sold by weight only. Every keystroke and menu change recalculates.
The arithmetic in order
Square feet become square metres by multiplying by 0.092903, inches become metres at 0.0254, and centimetres are divided by 100. That product is cubic metres, which the code divides by 0.0283168 for cubic feet and by 0.764555 for cubic yards. Weight is cubic yards times the chosen density, tons are that over 2000, and cost is tons rounded up to a whole ton times your price. Convert the bed plan in the area converter and the finished pile in the volume converter.
A worked example
The defaults give 92.903 square metres times 0.0762 m, so 7.079 cu m, 250.0 cu ft and 9.26 cu yd. Topsoil at 2200 lb per cu yd makes that 20370 lb, or 10.19 tons, and the cost card prints $495.00 because eleven whole tons are billed at $45. Bags divide 250 cubic feet by a 2 cu ft bag and round up, which gives 126. The block below reads 1,000 sq ft covered by and states the volume that area needs at set depths: 6.17 cu yd at 2 inches, 9.26 at 3, 12.35 at 4 and 18.52 at 6.
Where it stops
- Cost rounds tons up before pricing, so 10.19 tons is billed as eleven and the two cards disagree.
- The five densities are fixed single guesses, and damp mulch or compacted load-out soil weigh far more per yard.
- Bag choice is 2, 3 or none, so a 1.5 cu ft or litre bag cannot be entered.
- Coverage rows always print cubic yards at 2, 3, 4 and 6 inches, whatever units you selected.
- Blank and negative entries become zero without a message, so a cleared field just returns zeros.
Questions people ask
Why is the bag count one higher than I expected?
The cubic feet figure lands a hair over 250 at the defaults, so rounding up takes 125 bags to 126.
Does the price include delivery?
No. It is your per-ton figure times rounded tonnage, with spreading and hauling left to you.
Which density fits a flower bed?
Garden soil at 2000 lb is the lighter middle choice; the 2200 topsoil default assumes material sold damp.