This paper analyzes the association between tax complexity and foreign direct investments (FDI) based on the newly developed Tax Complexity Index (TCI) and its components. For a sample of 15,607 new foreign subsidiaries, we find no association between total tax complexity, as proxied by the TCI, and the location probability. When we decompose the TCI into tax code complexity and tax framework complexity, we find opposing associations. Tax code complexity is positively related to the location probability, while tax framework complexity is negatively related to it. These associations are, for example, driven by the complexity of transfer pricing and loss offset regulations in the tax code and the dimensions guidance, audits, as well as filing and payments, in the tax framework. In additional analyses, we find that the associations are sensitive to certain characteristics, such as country-specific and firm-specific characteristics. For example, the positive tax code association diminishes when tax rates are high. Overall, we are the first to provide empirical evidence on potential costbenefit tradeoffs of tax complexity for FDI and thereby enhance prior literature, which has primarily focused on the costs of tax complexity.