We derive an analytical solution of the comparator theory of associative learning, as formalized by Stout and Miller (2007). The solution enables us to calculate exactly the predicted responding to stimuli in any experimental design and for any choice of model parameters. We illustrate its utility by calculating the predictions of comparator theory in some paradigmatic designs: acquisition of conditioned responses, compound conditioning, blocking, unovershadowing, and backward blocking. We consider several versions of the theory: first-order comparator theory (close to the original ideas of Miller & Matzel, 1988), second-order comparator theory (Denniston, Savastano, & Miller, 2001), and sometimes-competing retrieval (Stout & Miller, 2007). We show that all versions of comparator theory make a number of surprising predictions, some of which appear hard to reconcile with empirical data. Our solution paves the way for a fuller understanding of the theory and for its empirical evaluation.