This chapter examines the role played by firms in allocating resources in a modern economy, explaining when firms are superior to markets and the limits to firm size. The analysis begins by carefully examining what distinguishes firm allocation from markets. We then review the various theoretical approaches to determining the size of firms and the types of transactions that occur within firms versus within markets. These models can be grouped into four broad categories: transaction cost models, property rights models, adaptation models, and incentive system models. We review the distinctive predictions of these models regarding the size and scope of firms, and numerous empirical tests. We discuss these tests, their results and limitation, and current research challenges. We conclude with a discussion of directions for future research.