This paper studies optimal task assignments in a risk neutral principal-agent model in which agents are compensated according to an aggregated performance measure. The main trade-off is one in which specialization allows the implementation of any possible effort profile, while multitasking constraint the set of implementable effort profiles. Yet, the implementation of any effort profile in this set is less expensive than the equivalent profile under specialization. The principal prefers multitasking to specialization except when tasks are complements and the output after success is small enough so that it is not second-best optimal to implement high effort in each task. This result is robust to several extensions such as the existence of multiple performance measures.