Comment ça marche
Trench volume comes from length × width × depth (converted to feet), giving the total cubic feet of the excavated channel.
The perforated pipe's own volume (π × radius² × length) is subtracted from the trench volume, since gravel only fills the space around the pipe.
Gravel weight is the remaining volume times your gravel's density, converted to tons, then priced at your local per-ton rate alongside linear-foot costs for pipe and fabric.