Drawers need a gap above and below for the slide/glide. Shelves take up only their own height — no gaps are reserved around them.
Assumes front/back panels span the full drawer-box width, side panels fit between the front and back, and the bottom panel sits in a half-thickness dado. Adjust dimensions if your joinery differs.