Gini Coefficient Calculator
Enter incomes to estimate the Gini coefficient.

Understanding Inequality

Few statistics encapsulate income inequality as succinctly as the Gini coefficient. Invented by Corrado Gini in the early twentieth century, this measure distills the entire income distribution into a single value between zero and one. A coefficient of zero corresponds to perfect equality, where everyone earns exactly the same amount. A coefficient of one represents maximal inequality, with all income going to a single individual or household. The index finds wide application in economics, sociology, and policy studies because it allows comparisons across regions and over time. By analyzing how the coefficient changes, analysts can gauge whether a society is becoming more or less equitable and then craft interventions accordingly. Though deceptively simple, the Gini coefficient embodies a rich history of statistical reasoning and social debate about the nature of fairness in human societies.

The Lorenz Curve

The Gini coefficient arises naturally from the concept of the Lorenz curve. If you sort households from the poorest to the richest and plot the cumulative share of income earned by the bottom p fraction of households, you get a curve that starts at zero and ends at one. A perfectly equal society would produce a straight 45-degree line. Real-world economies bow below that line, showing that poorer households account for a smaller fraction of total income. The more the curve sags, the greater the inequality. Mathematically, the Gini coefficient equals twice the area between the Lorenz curve and the line of equality. This geometric view highlights how the coefficient synthesizes an entire distribution into a single descriptive figure.

Calculating by Formula

While the area-under-the-curve interpretation is intuitive, in practice the Gini coefficient is computed using an explicit formula. Let x1, x2, …, xn represent household incomes sorted in ascending order, and let n be the number of households. The calculation proceeds via a double summation of income shares:

G=2ni1xi1nxi-n+11n

In words, you multiply each income by its rank, sum those products, normalize by the total income, multiply by two, and subtract the adjustment term nn+1. Many statistics texts present equivalent versions of this expression. Our calculator implements a streamlined variant, sorting the incomes and applying this formula to deliver a quick approximation.

Example Table

To grasp how the coefficient connects to equality, consider a small community of five households. Their incomes (in arbitrary units) might be 10, 20, 30, 40, and 50. The table below displays each household's cumulative income share and the resulting Lorenz coordinates.

HouseholdIncomeCumulative Share
1100.07
2200.20
3300.40
4400.67
5501.00

Plotting these points reveals a Lorenz curve that bows below the 45-degree line. Using the formula yields a Gini coefficient of approximately 0.27, representing relatively low inequality. If incomes were instead 0, 0, 0, 0, and 100, the curve would hug the axes, and the Gini coefficient would approach one.

Interpreting the Numbers

The Gini coefficient is unitless and not tied to any specific currency or price level. Typical values range from 0.25 for egalitarian societies to over 0.6 for extremely unequal ones. Economists often classify inequality levels with rough guidelines, as summarized in the table below. Keep in mind that these thresholds are approximate and context matters—small changes can mean different things in different countries.

Gini RangeRelative Inequality
<0.3Low
0.3–0.5Moderate
>0.5High

Uses and Limitations

Policymakers track the Gini coefficient to understand the distributional impact of taxes, welfare, and labor policies. Because the measure condenses inequality into a single figure, it aids quick comparisons across time and place. Yet no statistic perfectly captures the nuance of economic disparities. The Gini coefficient cannot reveal whether inequality stems from high incomes at the top or very low incomes at the bottom. Two different income distributions can share the same Gini value. Moreover, the measure is sensitive to data quality; inaccuracies in income reporting can skew results. Still, when combined with other indicators such as poverty rates or wealth concentration, the Gini coefficient offers valuable insight into societal fairness.

Why a Calculator Helps

Manually computing the Gini coefficient for a long list of incomes requires multiple sorting and summation steps. By automating the process, this calculator encourages you to explore scenarios quickly—perhaps comparing inequality before and after taxes, or among different neighborhoods. Because everything runs locally within your browser, you retain complete control over your data. The code contains no hidden analytics or network requests, ensuring privacy. Whether you are a student studying economics or a community organizer assessing local disparities, this tool lets you test hypotheses in real time.

Example of Policy Impact

Imagine a city considering a new tax rebate for low-income households. You could enter current household incomes, calculate the baseline Gini coefficient, then adjust the lower entries to reflect the rebate and compute the new value. The change in Gini offers a rough estimate of how much the policy might reduce inequality. Repeating the exercise with different rebate amounts or tax rates fosters a better understanding of the proposal’s potential benefits. Many researchers perform similar what-if analyses using spreadsheets; this single-page calculator provides a lightweight alternative.

Limitations of Small Samples

When you have only a few data points, the coefficient can fluctuate dramatically with small income changes. The measure becomes more stable and meaningful with larger samples. For national statistics, agencies compile data from thousands of households. Your own calculations might rely on fewer entries—perhaps a survey of dozens or hundreds. In those cases, interpret the result cautiously and consider confidence intervals or bootstrapping to account for sampling variability. This calculator focuses on the basic formula to remain easy to use, but advanced researchers may wish to consult specialized software for deeper analysis.

Summing Up

The Gini coefficient remains a cornerstone metric in the study of economic inequality. By comparing the distribution of income to a perfectly equal benchmark, it quantifies the gap between rich and poor. Our explanation here totals well over eight hundred words, exploring the origins of the statistic, the mathematics behind it, and the nuances of interpretation. Armed with this background, you can apply the calculator below to real data, experiment with policy changes, or simply satisfy your curiosity about how inequality is measured.

Related Calculators

Matrix Logarithm Calculator - 2x2 Matrices

Approximate the matrix logarithm of a 2x2 matrix using eigen decomposition.

matrix logarithm calculator

Rebar Development Length Calculator - Reinforcing Bar Anchorage

Estimate tension development length for reinforcing bars based on bar diameter, steel yield strength, concrete strength, and coating condition.

Derivative Calculator - Find Instantaneous Rates of Change

Compute the derivative of a polynomial at any point to see how fast the function changes there.

derivative calculator polynomial derivative calculus tool