In the presence of imperfect competition and externalities -increasing returns to diversity and congestion -competitive equilibria are not efficient. Thus, the inefficiency can be modified by the introduction of appropriate fiscal policies. Under the consideration of an optimal fiscal policy, the results of this paper show that the government should pay a subsidy to labor and capital income in order to correct the production inefficiency. Furthermore, the optimal subsidy to fixed costs depends on the degree of increasing returns to diversity and the degree of congestion, and it decreases with the latter effect.