The cubic yards formula
To calculate cubic yards, first find the volume in cubic feet by multiplying length, width, and depth in feet. Then divide by 27, because one cubic yard equals 27 cubic feet.
If your depth is measured in inches, divide by 12 first to convert to feet before multiplying by the other dimensions.
Cubic yards = (Length x Width x Depth in feet) / 27
Calculate volume in cubic feet first, then divide by 27 to convert to cubic yards.