The embodiments herein provide a device for dispensing pills. The device comprises several dispensing chambers molded into the bottle rim, or fastened inside or outside the bottle. The chamber includes many radial projections defining discrete pill holding areas. The device comprises a dispensing cap secured and rotated uni-directionally or bi-directionally to the chambers, having a base, provided with a window. The cap comprises uneven surfaces on the holding surface to allow the pills in the chambers to oscillate up and down thereby causing a mixing action. The cap is mounted outside the bottle. The device further comprises a rotating central hub formed on an inner side of the base for delimiting an inner boundary of the pill holding areas. The cap is rotated to align the window with the pill holding areas to dispense a pill when the bottle is inverted or angled upside-down.