A coffee grinder with a coffee bean container 9 divided into at least two compartments 13, 14, with a bottom-side output shaft 20 common to both compartments 13, 14. The coffee bean container has a grinding mill 10 disposed beneath the output shaft 20 and a closure element 22 for the optional closing of the output 17, 18 of the compartment(s) 13, 14. The closure element 22 forms with the grinding mill 10 a concrete unit and the coffee bean container 9 is disposed rotatably relative to the unit formed of the closure element 22 and the grinding mill 10. Such a coffee bean container 9 could also be used on an automatic coffee maker with a coffee grinder.