Using detailed household-level data from Malawi on physical quantities of outputs and inputs in agricultural production, we measure total factor productivity (TFP) for farms controlling for land quality, rain, and other transitory shocks. We find that operated land size and capital are essentially unrelated to farm TFP implying substantial factor misallocation. The aggregate agricultural output gain from a reallocation of factors to their efficient use among existing farmers is a factor of 3.6-fold. We directly link factor misallocation to severely restricted land markets as the vast majority of land is allocated by village chiefs and not marketed. In particular, the output gain from reallocation are 2.6 times larger for farms with no marketed land than for farms that only operate marketed land.