We study the optimal design of organizations under the assumption that agents in a contest care about their relative position. A principal determines the number and size of status categories in order to maximize output. We first consider the pure status case without tangible prizes. Our results connect the optimal partition in status categories to properties of the distribution of ability among contestants. The top status category always contains a unique element. For distributions that have an increasing failure rate (IFR), a proliferation of status classes is optimal, whereas the optimal partition involves only two categories if the distribution of abilities is sufficiently concave. Moreover, for IFR distributions, a coarse partition with two status categories achieves at least half of the output obtained in the optimal partition with many categories. Finally, if status is derived solely from monetary rewards, we show that the optimal partition in status classes contains only two categories.