💸 Income Inequality Simulator
Boltzmann-Pareto exchange model: simulate wealth redistribution between random agents, watch Pareto distribution emerge, measure Gini coefficient in real time.
About this simulation
This simulator recreates the Boltzmann wealth exchange model, a statistical-mechanics analogy borrowed from how gas molecules exchange energy in collisions. At every step two agents are picked at random and one transfers a random fraction of the smaller party's wealth to the other — no strategy, no starting advantage, just repeated random exchange. Despite that symmetry, the population reliably drifts toward extreme inequality, and the simulator tracks this in real time with a live Gini coefficient, top 1%/10% wealth shares, and a log-scale rank-wealth chart.
🔬 What it shows
N agents, all starting with equal wealth, repeatedly trade a random fraction of their smaller holding. Purely by chance, some agents lose a long streak of exchanges and drift toward zero while others compound gains, producing a Pareto-like wealth tail that mirrors real-world income and wealth distributions.
🎮 How to use
Adjust Agents (100-600) to change population size, Exchange fraction (10-100%) to control how much wealth changes hands per trade, and Speed (1-20×) to run more transactions per frame. Raise Tax rate (0-50%) to skim wealth from the paying agent on each exchange and redistribute it equally to everyone, then watch the Gini coefficient fall. Reset restarts with fresh equal wealth; Pause/Play and Step ×500 let you freeze the simulation or advance it exactly 500 exchanges at a time.
💡 Did you know?
Even though the exchange rule is entirely symmetric — either agent is equally likely to gain — the resulting wealth distribution still concentrates sharply, converging toward a Gini coefficient around 0.5 with no tax at all. Physicists first studied this exact mechanism modelling energy exchange between gas particles; economists use it to explain why unregulated wealth exchange tends toward inequality even without any dishonesty or skill differences.
Frequently asked questions
What is the Boltzmann wealth exchange model?
It is an agent-based model borrowed from statistical physics, where "agents" behave like gas molecules exchanging energy in random collisions. Two agents are picked at random each step, and one gives the other a random fraction of whichever holding is smaller, mimicking a simple, symmetric market transaction repeated millions of times.
Why does inequality emerge if every agent starts equal and every trade is random?
Because a losing streak, however unlikely for any one agent, becomes almost certain for someone in a large population over many trades — and once an agent's wealth shrinks, they have less to risk in future exchanges, entrenching the imbalance. This purely statistical effect, with no differences in skill or starting position, drives the Gini coefficient up to roughly 0.5 even with zero taxation.
What does the Tax rate slider actually do in the simulation?
Whenever an exchange happens, the paying agent has a small percentage of their wealth taken as tax, which is then split equally and added back to every agent in the population, including the poorest. This models a flat tax combined with universal redistribution, and increasing the slider visibly pulls the Gini coefficient down over time.
How is the Gini coefficient calculated here?
The simulation sorts all agents by wealth, then computes twice the area between the population's actual cumulative wealth curve (the Lorenz curve) and the line of perfect equality, normalised to a 0-1 scale. A value of 0 means every agent holds identical wealth; a value approaching 1 means almost all wealth belongs to a single agent.
Why does the rank-wealth chart on the right look like a straight line on a log scale?
When wealth is plotted against rank on logarithmic axes, a Pareto (power-law) distribution shows up as a straight line, because a power-law relationship becomes linear once both variables are log-transformed. The simulation reliably produces this pattern, the same shape economists find when they plot real income or wealth data for entire countries.
Frequently Asked Questions
What does the Gini coefficient measure?
The Gini coefficient is a number between 0 and 1 measuring the statistical dispersion of income. It equals twice the area between the Lorenz curve and the perfect equality line. A Gini of 0 means everyone has equal income; a Gini of 1 means one person has all income. Most developed nations have Ginis of 0.28–0.45.
What is Piketty's r > g argument about inequality?
Thomas Piketty argues that when the rate of return on capital (r) exceeds the rate of economic growth (g), wealth concentrates in the hands of capital owners over time. As inheritance grows relative to earned income, inequality increases across generations. He advocates for a global wealth tax to counteract this tendency.
Does inequality reduce economic growth?
The relationship is complex and contested. High inequality may reduce growth by limiting human capital accumulation (poor children cannot access education), suppressing demand, and increasing economic and political instability. However, some inequality may incentivise innovation and risk-taking. IMF research suggests that extreme inequality consistently harms growth and sustainability.
What is the difference between income inequality and wealth inequality?
Income inequality refers to differences in the flow of earnings (wages, dividends) per year. Wealth inequality refers to differences in accumulated assets (property, stocks, savings) minus liabilities. Wealth inequality is generally far more extreme than income inequality because wealth compounds over time and can be inherited.
How does taxation affect income inequality?
Progressive income taxes reduce after-tax income inequality by taxing higher incomes at higher marginal rates. Capital gains taxes affect wealth accumulation inequality. Social transfers (benefits, pensions, healthcare) redistribute income effectively. The combination of the tax system and social spending together determine a country's disposable income Gini, which is typically much lower than the market income Gini.
Boltzmann-Pareto exchange model: agents exchange random fractions of wealth, spontaneously producing extreme inequality. Gini coefficient, Pareto tail and tax redistribution.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install