I develop a method to measure and separate the production misallocation caused by failures in factor markets versus financial markets. When I apply the method to rice farming villages in Thailand I find surprisingly little misallocation. Optimal reallocation would increase output in most villages by less than 15 percent. By 2006 most misallocation comes from factor market failures. I derive a decomposition of aggregate growth that accounts for misallocation. Declining misallocation contributes little to growth compared to factor accumulation and rising farm productivity. I use a government credit intervention to test my measures. I confirm that credit causes a statistically significant decrease in only financial market misallocation.