To find cubic yards, multiply length, width and depth in feet. Then divide by 27.
A slab 30 ft by 30 ft and 4 in thick covers 900 sq ft. Multiply by one third of a foot to get 300 cubic feet.
Divide 300 by 27. The slab needs about 11.1 cubic yards before waste.
Convert inches to feet before you multiply. That is the most common error. For earthwork, know whether the volume is in place, loose or compacted.