The formula
Tons = cubic yards × the material's weight in tons per cubic yard. Going the other way, cubic yards = tons ÷ that weight. A cubic yard is 27 cubic feet; a US ton is 2,000 lb. Each material weighs something different, and the same material weighs more wet or packed down, so the weight is the figure to get right.