The purpose of this paper is to present an exercise where we identify optimal income tax rules under the constraint of fixed tax revenue. To this end, we estimate a microeconomic model with 78 parameters that capture heterogeneity in consumption-leisure preferences for singles and couples as well as in job opportunities across individuals based on detailed Norwegian household data for 1994. For any given tax rule, the estimated model can be used to simulate the choices made by single individuals and couples. Those choices are therefore generated by preferences and opportunities that vary across the decision units. Differently from what is common in the literature, we do not rely on a priori theoretical optimal taxation results, but instead we identify optimal tax rules - within a class of 6-parameter piece-wise linear rules - by iteratively running the model until a given social welfare function attains its maximum under the constraint of keeping constant the total net tax revenue. We explore a variety of social welfare functions with differing degree of inequality aversion and also two alternative social welfare principles, namely equality of outcome and equality of opportunity. All the social welfare functions turn out to imply an average tax rate lower than the current 1994 one. Moreover, all the optimal rules imply with respect to the current rule lower marginal rates on low and/or average income levels and higher marginal rates on relatively high income levels. These results are partially at odds with the tax reforms that took place in many countries during the last decades. While those reforms embodied the idea of lowering average tax rates, the way to implement it has typically consisted in reducing the top marginal rates. Our results instead suggest to lower average tax rates by reducing marginal rates on low and average income levels and increasing marginal rates on very high income levels.