In general, five-gallon food-grade buckets can hold:
37 pounds of wheat
33 pounds of cornmeal
33 pounds of flour
36 pounds of rice
35 pounds of dried beans
35 pounds of sugar
37 pounds of whole corn
21 pounds of rolled oats
21 pounds of macaroni
29 pound of spaghetti
Density, size, and shape will determine the exact amount, but at least you have a good idea to go by for whatever you want to store in them.