Humans can seamlessly infer what other people like, based on what they do. Broadly, two types of accounts have been proposed to explain different aspects of this ability. A first account focuses on inferences from spatial information: agents choose and move towards things they like. A second account focuses on inferences from statistical information: uncommon choices reveal preferences more clearly compared to common choices. Here we argue that these two kinds of inferences can be explained by the assumption that agents maximize utilities. We test this idea in a task where adult participants infer an agent’s preferences using a combination of spatial and statistical information. We show that our model predicts human answers with higher accuracy than a set of plausible alternative models.