Gini Coefficient & Lorenz Curve Calculator Back
Economics and statistics

Gini Coefficient & Lorenz Curve Calculator

Adjust income distribution shape to calculate the Lorenz curve and Gini coefficient in real time. Compare income inequality across countries and understand how progressive taxation affects distribution.

Distribution Parameters

The more the Lorenz curve bows from the diagonal (perfect equality) toward the corner, the larger the Gini coefficient. The area A between the diagonal and the curve represents inequality.

While paused, move the sliders to update the result instantly.

Lorenz Curve & Gini Coefficient (animated)

The Lorenz curve bows from the line of perfect equality toward the corner. The shaded area A between the diagonal and the curve is the inequality, and Gini = A/(A+B).

Gini coefficient
Top 20% share
Bottom 20% share
Inequality level
Theory & Key Formulas

$G = \dfrac{A}{A+B}$
(A is the area between the line of equality and the Lorenz curve)

Integral calculation
$G = 1 - 2\int_0^1 L(x)\,dx$

💬 Let's Talk About the Gini Coefficient

🙋
I often hear that a Gini coefficient above 0.4 leads to social unrest. Is that really true?
🎓
As a rule of thumb it has some basis, but it is not an absolute threshold. The US Gini coefficient is about 0.39, close to a "warning zone", while Scandinavian countries are stable at 0.27–0.30. The "0.4 line" mostly traces back to studies of Latin American political instability in the 1960s–70s. What matters more is the speed of change—if inequality widens sharply over a decade, social tension tends to rise.
🙋
What does it mean that Japan's Gini coefficient is 0.57 for market income and 0.33 after redistribution? Isn't the gap too large?
🎓
That gap is the redistributive effect of taxes and social security. Japan has many elderly people, and pensioners have almost zero market (earned) income, which makes the market-income Gini look high. But once pensions, health insurance and welfare are added, the disposable-income gap shrinks substantially. This redistribution effect (0.57→0.33, an improvement of 0.24) is larger than the OECD average. The more the population ages, the wider this gap tends to grow, which is one reason behind the debate over whether Japan's inequality is "actually large or small".
🙋
How does Pareto's principle (80/20 rule) relate to the Gini coefficient?
🎓
The Pareto principle—"the top 20% holds 80% of the total"—corresponds to a Pareto distribution with a Gini coefficient of about 0.75. Software bugs (80% of bugs in the top 20% of features) and sales (80% of revenue from the top 20% of customers) show similar concentration. In a CAE context, "stress concentration" follows a comparable Pareto-like distribution—a few percent of elements carry most of the stress. The idea behind the Gini coefficient can also be applied to quantifying concentration in engineering.
🙋
Are there other indicators besides the Gini coefficient to measure inequality? How should we choose between them?
🎓
There are several. The S80/S20 ratio (average income of the top 20% ÷ that of the bottom 20%) is intuitive to interpret and is about 5–6 in Japan. The Theil index can decompose total inequality into within-group and between-group components and is used for regional-gap analysis. The "top 1% income share" is notably high in the US at about 20% and reveals the concentration among the ultra-rich that the Gini coefficient struggles to capture. Because no single indicator tells the whole story, combining several is the mainstream approach in modern economics.

Frequently Asked Questions

The Lorenz curve coincides with the 45-degree line only under perfect equality. In actual income distributions, the cumulative income share of low-income groups is smaller than their population share, causing the curve to bulge downward. The larger this deviation, the higher the Gini coefficient and the greater the inequality.
Even if you change the distribution shape parameter, the change may be negligible if the mean income or sample size is fixed. Additionally, for certain distributions (e.g., uniform distribution), the parameter range is narrow, so try moving the slider significantly to observe changes.
First, select a distribution close to 'market income' (e.g., log-normal distribution with σ ≈ 0.8). Then, in 'redistribution' mode, adjust parameters to simulate progressive taxation on high-income groups and transfers to low-income groups. Specifically, reducing the income of the top 10% by 20% and transferring it to the bottom 20% can approximate this value.
Adjust the distribution parameters so that the cumulative income share at 20% of the cumulative population approaches 80%. For example, setting the shape parameter α of the Pareto distribution to about 1.5 can reproduce a state where the top 20% holds approximately 80% of total income, resulting in a Gini coefficient of about 0.6.

What is Gini Coefficient Calculator?

Gini Coefficient Calculator is a fundamental topic in engineering and applied physics. This interactive simulator lets you explore the key behaviors and relationships by directly manipulating parameters and observing real-time results.

By combining numerical computation with visual feedback, the simulator bridges the gap between abstract theory and physical intuition - making it an effective learning tool for students and a rapid-verification tool for practicing engineers.

Physical Model & Key Equations

The simulator is based on the governing equations behind Gini Coefficient & Lorenz Curve Calculator. Understanding these equations is key to interpreting the results correctly.

Each parameter in the equations corresponds to a slider in the control panel. Moving a slider changes the equation's solution in real time, helping you build a direct connection between mathematical expressions and physical behavior.

Real-World Applications

Engineering Design: The concepts behind Gini Coefficient & Lorenz Curve Calculator are applied across mechanical, structural, electrical, and fluid engineering disciplines. This tool provides a quick way to estimate design parameters and sensitivity before committing to full CAE analysis.

Education & Research: Widely used in engineering curricula to connect theory with numerical computation. Also serves as a first-pass validation tool in research settings.

CAE Workflow Integration: Before running finite element (FEM) or computational fluid dynamics (CFD) simulations, engineers use simplified models like this to establish physical scale, identify dominant parameters, and define realistic boundary conditions.

Common Misconceptions and Points of Caution

Model assumptions: The mathematical model used here relies on simplifying assumptions such as linearity, homogeneity, and isotropy. Always verify that your real system satisfies these assumptions before applying results directly to design decisions.

Units and scale: Many calculation errors arise from unit conversion mistakes or order-of-magnitude errors. Pay close attention to the units shown next to each parameter input.

Validating results: Always sanity-check simulator output against physical intuition or hand calculations. If a result seems unexpected, review your input parameters or verify with an independent method.

How to Use

  1. Enter or adjust the shape parameter (alpha) using the alphaValNum input or alphaSlider (range 0.5–5.0). Lower values indicate greater concentration of income among few earners; higher values flatten the distribution.
  2. Set the population size (n) via nValNum or nSlider (typically 100–10,000 individuals). Larger populations provide smoother curve approximations.
  3. Observe the Lorenz curve plot update in real time, showing cumulative population percentage (x-axis) versus cumulative income percentage (y-axis). The Gini coefficient displays instantly below the chart.

Worked Example

Consider a city of 5,000 households (n=5000) with income distribution shaped by alpha=1.5. The Lorenz curve bows significantly below the diagonal 45° line of perfect equality. The simulator calculates a Gini coefficient of approximately 0.48, indicating moderate inequality. If you increase alpha to 3.0 (more uniform income), the Lorenz curve straightens closer to the diagonal and Gini drops to roughly 0.25, reflecting reduced inequality. Conversely, decreasing alpha to 0.8 produces a Gini near 0.65, typical of developing economies with high wealth concentration.

Practical Notes

  1. Gini coefficient ranges 0 (perfect equality) to 1 (complete inequality). Most OECD nations range 0.25–0.35; sub-Saharan Africa averages 0.50+.
  2. Alpha parameter controls Pareto distribution shape; use alpha < 1.0 for "superstar economics" scenarios (tech founders, celebrities) where top 1% earns 40%+ of total income.
  3. For policy analysis, adjust alpha to simulate tax reforms or wage equalization programs; watch Gini shift to quantify distributional impact on the target population.