Calcular Coeficiente de Gini

Gini coefficient: What is it and how does it measure inequality?

Publicado: | Actualizado:

The Gini index, also known as the Gini coefficient, is one of the most widely used indicators worldwide to measure inequality in the distribution of income or wealth. Introduced by the Italian statistician Corrado Gini in 1912, this index has become a key tool for governments, economists, and international organizations seeking to assess economic equity in a society.

What is the Gini index?

The Gini index is a statistical measure that reflects the degree of inequality in income distribution within a population. Its value ranges between 0 and 1, although it is sometimes multiplied by 100 to make it easier to interpret as a percentage. For example, an index of 0.276 is equivalent to 27.6%. A value of 0 represents perfect equality, where all individuals have the same income, while a value of 1 indicates total inequality, meaning that a single individual holds all the income.

For example, in Europe, according to updated Eurostat data, the countries with the lowest levels of inequality with Gini indices between 21% and 25% are Slovakia (21.6%), Slovenia (23.4%), Belgium (24.2%), and the Czech Republic (24.4%). In contrast, the highest levels of inequality within the European Union are found in Bulgaria (37.2%), Latvia (34.0%), and Lithuania (33.6%). In Spain, the index stood at 31.2% in 2024, while the EU average was 29.6% (Eurostat).

The Gini index is not limited to income: it can also be applied to wealth, consumption, or even access to education. It is used both in comparative studies between countries and in internal analyses by regions or social groups. For this reason, it is one of the indicators studied in programs such as a Master’s in Financial Management or a Master’s in Finance.
 

Gini Index Formula: explanation and application

There are several ways to calculate the Gini index, but they all share a common principle: comparing the observed distribution with a perfectly equal distribution.


Classic formula:

One of the most well-known formulas is the following:
G = 1 - Σ (Yi + Yi-1) × (Xi - Xi-1)
Where:

  • Xi are the cumulative proportions of the population (ordered from lowest to highest income).
  • Yi are the cumulative proportions of income.
  • Σ indicates a summation over all groups.

This formula is based on the Lorenz curve, a graphical representation showing what percentage of total income is accumulated by each percentage of the population. The further the curve is from the line of equality (the perfect diagonal), the greater the inequality.


Weighted Gini index:

In contexts where more weight is given to certain units (for example, larger households), the weighted Gini index can be used. This incorporates a weighting variable (such as the number of people per household) to more accurately reflect the real distribution. It is especially useful in public policy and fiscal redistribution studies. For example, if this index is applied to two regions with identical income inequality, but one has larger households or more children, the weighted index will provide a result that better reflects reality.

Imagen
Coeficiente de Gini

How to calculate the Gini index step by step

Although calculating the index may seem complex, it can be broken down into a series of relatively simple steps. Let’s look at them in detail:

  1. Sort the population by income level, from lowest to highest.
  2. Calculate relative frequencies (pi): the number of individuals in each group divided by the total population.
  3. Determine relative income (qi): the income of each group divided by total income.
  4. Accumulate the previous values, obtaining cumulative distributions Pi and Qi.
  5. Plot the Lorenz curve, representing the points (Pi, Qi) on a graph.
  6. Calculate the area between the line of equality and the Lorenz curve. This area represents inequality and is used to obtain the Gini coefficient through the ratio:
    G = A / (A + B)
    Where A is the area between the line of equality and the Lorenz curve, and B is the area under the curve.

In Excel or SPSS, there is no automatic command to calculate it, but it can be constructed using formulas like those described above.


Practical example:
Suppose that in a sample of 100 people, the poorest 10 earn only 1% of total income, while the richest 10 concentrate 40%. By plotting the cumulative data and applying the area formula, we would obtain a Gini index close to 0.45, indicating medium-high inequality.

How is the wage gap related to the Gini index?

The wage gap, the difference in income between different groups within the labor market has a direct impact on the Gini index. The greater the disparity between high and low wages, the higher the index value will be, reflecting a more unequal society.
For example, if in one country executives earn 15 times more than entry-level workers, while in another the difference is only 5 times, the first country is likely to have a higher Gini index.


Gender inequality:

The gender pay gap also plays a role. According to the European Commission, women in the EU earned on average 13% less per hour than men. In countries where this gap is larger, the Gini index tends to be higher, unless fiscal and social policies help offset this inequality.


The role of taxes and transfers:

The Gini index can be calculated before and after taxes and transfers. For example, in Nordic countries such as Sweden, the gross Gini index (before taxes) may be similar to that of other European countries, but the net index (after transfers) is much lower thanks to a redistributive tax system. This shows that it is not only about how much people earn, but also how income is redistributed through public policies.
The Gini coefficient is a fundamental tool for understanding how income or wealth is distributed in a society. Its value provides a clear and comparative view of inequality, although not without limitations. While it does not explain the underlying causes or prescribe solutions, it does allow us to measure the impact of redistributive policies, economic changes, and social trends. In times of economic crisis, inflation, or uneven growth, understanding and monitoring this indicator is more important than ever.