Before calculating how much soil is required for your raised-bed garden, you need to know the inner dimensions of your bed. If you built the raised bed from 2-by-12 lumber, then the inner dimensions are 4 feet minus 3 inches in both directions to account for the thickness of the wood. This results in inner dimensions of 45 inches by 45 inches for a 4-by-4-foot bed. If you built your raised bed with cement blocks, their dimensions are usually 8 by 8 by 16 inches. In this situation, the inner dimensions of a 4-by-4-foot raised bed are 40 by 40 inches.
The square footage of the garden requires multiplying the length by the width of the inner dimensions. The wood-edged 4-by-4-foot garden is 45 inches multiplied by 45 inches, which equals 2,025 square inches. For the cement block raised bed, the inside area is 1,600 square inches. If you are using a different edging material, adjust your calculations accordingly.
Soil isn't sold by the area but by the volume. Now that you know the area using your raised bed's inner dimensions, you have to determine how tall your raised bed should be. For your wood-edged raised bed, you have to look at the width of the wood. If you use a 12-inch-wide board, the actual width is 11 1/4 inches. To calculate your wood-edged raised bed depth, multiply 2025 square inches by 11 1/4 square inches, which is 22,781 cubic inches. In the case of cement blocks, if you build the raised bed only one course high, then you multiply the height of the cement block, or 8 inches, by your area of 1,600 square inches, which is 12,800 cubic inches.
Soil is sold by the yard; when you are quoted a price for a yard of soil, the garden center employee means a cubic yard. To calculate how many cubic yards of soil you need, divide your cubic inches by 46,656, which is the number of cubic inches in a cubic yard. For 2-by-12 lumber, your volume is 22,781 cubic inches and you need 0.488 cubic yards of soil, or half a yard. For a cement block raised bed, your cubic inches translate to 0.27 cubic yards, or slightly over a quarter of a yard.