Home » How to Calculate Gini Coefficient in Excel (With Example)

How to Calculate Gini Coefficient in Excel (With Example)

by Tutor Aspire

Named after Italian statistician Corrado Gini, the Gini coefficient is a way to measure the income distribution of a population.

The value for the Gini coefficient ranges from 0 to 1 where higher values represent greater income inequality and where:

  • 0 represents perfect income equality (everyone has the same income)
  • 1 represents perfect income inequality (one individual has all the income)

You can find a list of Gini coefficients by country here.

The following step-by-step example shows how to calculate a Gini coefficient in Excel.

Step 1: Enter the Data

First, we must enter values for two columns: the cumulative population % and cumulative income % of individuals in a certain country:

Here’s how to interpret the values:

  • The bottom 20% of individuals in this country account for 10% of the total income.
  • The bottom 50% of individuals in this country account for 31% of the total income.
  • The bottom 60% of individuals in this country account for 40% of the total income.
  • 100% of individuals in this country account for 100% of the total income.

Step 2: Calculate Areas Under Lorenz Curve

Next, we need to calculate the individual areas under the Lorenz curve, which is a curve we use to visualize the distribution of income in a country. 

In our example, we’ll type the following formula in cell C3:

=(A3-A2)*(B3+B2)*0.5

We’ll then copy and paste this formula down to every remaining cell in column C:

Step 3: Calculate Gini Coefficient

Lastly, we can type the following formula into cell D2 to calculate the Gini coefficient for this population:

=1-2*SUM(C3:C6)

The following screenshot shows how to use this formula in practice:

Gini coefficient in Excel

The Gini coefficient for this population turns out to be 0.226.

This is an extremely simple example of how to calculate a Gini coefficient but you can use these exact same formulas to calculate a Gini coefficient for a much larger dataset.

You may also like