Gini Coefficient Calculator
Enter a comma-separated list of values to compute the Gini coefficient.
Result
How it is calculated
G = Σi Σj |xi − xj| ÷ (2 × n² × mean), summed over every ordered pair of values, where n is the number of values and mean is their average. Enter the values separated by commas or spaces. Items that are not numbers are silently skipped, which is why you should check the "n values" line. At least 2 values are needed, none may be negative, and the mean must be above zero. Results are shown to four decimals. This is the plain population formula, so with n values the largest possible result is (n − 1) ÷ n, not exactly 1: four values with one holder give 0.7500. The coefficient has no unit, and income, wealth or any other positive quantity can be used.
Worked example
Five household incomes: 20, 30, 40, 50, 160. Mean = 300 ÷ 5 = 60. Absolute differences between the 10 distinct pairs add up to 10+20+30+140+10+20+130+10+120+110 = 600, and counting every ordered pair doubles it to 1,200. Denominator = 2 × 5² × 60 = 3,000. G = 1,200 ÷ 3,000 = 0.4000, with mean 60.0000 and 5 values.
Common mistakes
- Typing a thousands separator such as 1,200 in the list. The comma splits it into 1 and 200, which changes both the count and the result.
- Not noticing that a typo word or symbol is skipped; always check that "n values" matches the number you meant to enter.
- Expecting small samples to reach 1.0000. Because the formula divides by n², one person holding everything among 4 gives 0.7500, and the ceiling is lower the fewer values you have.
- Entering negative values such as debts or losses; the tool rejects them, so net-worth data with negatives cannot be used directly.
- Comparing a Gini from a handful of values with national figures built from the whole population or from survey weights.
About this calculator
The Gini coefficient is the standard summary statistic for inequality in a distribution of income, wealth, or any other quantity, ranging from 0 (perfect equality — everyone holds the same amount) toward 1 (perfect inequality — one unit holds everything). For a list of n values this calculator's result tops out at (n − 1) ÷ n, so a small sample can never reach 1. It is derived from the Lorenz curve, which plots the cumulative share of total value held by the poorest x% of the population; the Gini coefficient is twice the area between that curve and the line of perfect equality.
In practice it is computed directly from a list of values using the mean absolute difference between every pair of observations, normalized by twice the mean — the method this calculator uses on the values you provide. Separate them with commas or spaces, enter at least two non-negative numbers, and leave out thousands separators: “1,200” is read as the two values 1 and 200.
Economists and organizations like the World Bank and national statistics agencies use the Gini coefficient to compare income or wealth inequality across countries and over time, typically reported on a 0-to-1 scale or as a percentage.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments