This paper studies the trends and cycles of informal employment. It first presents a theoretical model where the size of informal employment is determined by the relative costs and benefits of informality and the distribution of workers' skills. In the long run, informal employment varies with the trends in these variables, and in the short run it reacts to accommodate transient shocks and to close the gap that separates it from its trend level. The paper then uses an error-correction framework to examine empirically informality's long- and short-run relationships. For this purpose, it uses country-level data at annual frequency for a sample of industrial and developing countries, with the share of self-employment in the labor force as the proxy for informal employment. The paper finds that, in the long run, informality is larger in countries that have lower GDP per capita and impose more costs to formal firms in the form of more rigid business regulations, less valuable police and judicial services, and weaker monitoring of informality. In the short run, informal employment is found to be counter-cyclical for the majority of countries, with the degree of counter-cyclicality being lower in countries with larger informal employment and better police and judicial services. Moreover, informal employment follows a stable, trend-reverting process. These results are robust to changes in the sample and to the influence of outliers, even when only developing countries are considered in the analysis.