How to use the gini coefficient calculator
Measure inequality in a set of incomes or amounts, from 0 for perfect equality to 1 for total inequality. Enter incomes or amounts in the field above; the gini coefficient is computed instantly and plotted on the chart so you can see how the answer changes.
Common searches this calculator answers include “Gini coefficient”, “income inequality”, “inequality index”, “calculate gini coefficient”, “find gini coefficient”.
Formula
Variables
- d — Incomes or amounts
Worked example
With incomes or amounts = 20,30,45,60,120, the calculator gives gini coefficient ≈ 0.3345455.
Frequently asked questions
What is the gini coefficient calculator used for?
Measure inequality in a set of incomes or amounts, from 0 for perfect equality to 1 for total inequality. It helps with questions such as “Gini coefficient”, “income inequality”, “inequality index”.
What is the formula for the gini coefficient calculation?
Gini coefficient = sum(d.map(function(a){return sum(d.map(function(b){return abs(a-b)}))})) / (2 × len(d) × len(d) × mean(d)). Here d is incomes or amounts.
What inputs do I need for the gini coefficient calculator?
You need incomes or amounts. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.
How do I use the gini coefficient calculator?
Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.
Is the gini coefficient result exact?
Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.