I analyze the optimal taxation of profits and labor income under endogenous firm formation. Individuals differ in their skill and cost of setting up a firm, and can become workers or entrepreneurs. A tax system in which profits and labor income are subject to the same schedule uses general equilibrium effects through wages to indirectly redistribute across occupations. Optimal policies can involve low tax rates at the top and distortions of firms' input choices. However, these properties disappear under a differential treatment of profits and labor income. Then, redistribution is achieved directly through taxes and production efficiency is always optimal.