40x40"x11" is just a bit over 10 cu/ft. So you'd want 6cu/ft of topsoil, 3 cu/ft of compost and 1 cu/ft of potting soil per bed.
Looks like local box stores sell .75 cu/ft bags, so 8-9 (40lb) bags of topsoil, 3-4 (40lb) bags of compost, and 1-2 (40lb) bags of potting soil would be what I'd buy- ( per raised bed that is)
You could dump the buckets in the bottom, and level it out, and measure the remaining depth. If you need 5-6 more inches to fill the beds, just cut the above quantities in half.
Never hurts to have extra dirt, it doesn't really expire