There is a wealth of research demonstrating that agents process information with the aid of categories. In this paper we study this phenomenon in two parts. First, we build a model of how experiences are sorted into categories and how categorization affects decision making. Second, in a series of results that partly characterize an optimal categorization, we show that specific biases emerge from categorization. For instance, types of experiences and objects that are less frequent in the population tend to be more coarsely categorized and lumped together. As a result, decision makers make less accurate predictions when confronted with such objects. This can result in discrimination against minority groups even when there is no malevolent taste for discrimination. However, such comparative statics are highly sensitive to the particular situation; optimal categorizations can change in surprising ways. For instance, increasing a group's population, holding all else constant, can lead a decision maker to make less accurate predictions about that group.