Résumé : This paper proposes a unified framework to measure inequality and social welfare in the case in which both inequalities between groups and inequalities within groups matter, but priority is recognized to the former. This novel approach can be applied to a variety of contexts, including the analysis of inequalities of opportunity, ethnic discrimination and gender disparities. The empirical part of the paper analyzes two relevant cases: (i) the evolution of income inequality and ethnic discrimination in the United States during the period 1970-2014; (ii) the comparison of four European countries - Italy, Spain, France and Germany - in terms of inequality of opportunity.