This paper analyzes the determinants of FDI. We use a new data set covering greenfield and expansion projects at a detailed value chain level to examine which factors influence the decision to invest abroad. Our empirical framework is an augmented gravity model that incorporates elements of factor proportions theory. At the aggregate level, we find that distance discourages FDI, size and sharing a language encourages it, and that FDI targets relatively capital-scarce countries. When we classify investment projects according to their stage in the chain of production, we observe a lot of variation across stages. Nevertheless, economic size, distance, and capital abundance are still determining factors for most value chain stages and preserve the sign of their effect. Moreover, even though the results confirm FDI targetting capital scarce countries, we find evidence of a minimum requirement on the host country's capital endowment in all the stages of production except extraction. Finally, ease of doing business is also important, especially so for the location of regional headquarters.