Income Inequality Simulator
Boltzmann-Pareto exchange model — random wealth transfers between agents naturally produce extreme inequality
Boltzmann-Pareto exchange model — random wealth transfers between agents naturally produce extreme inequality
In the Boltzmann wealth model, N agents each start with equal wealth. At every step two random agents are chosen: agent A gives agent B a fraction of their smaller wealth. This simple rule — identical to collisions in statistical physics — spontaneously produces a Pareto (power-law) tail: a few agents accumulate most of the wealth while the majority has little.
The Gini coefficient (0 = perfect equality, 1 = one person owns everything) measures inequality. At 0% tax the Gini converges to ~0.5 with free exchange and can reach >0.8 with larger fractions. Adding a flat tax + universal redistribution reduces Gini by continuously transferring wealth from rich to all agents equally.
The left canvas shows agents as dots coloured by percentile (red = poorest, green = richest). The right panel shows the rank-wealth curve on a log scale — a straight line indicates a Pareto distribution (the real-world pattern for most countries).
Income inequality refers to the unequal distribution of income across individuals or households in an economy. It is measured by indices such as the Gini coefficient (0 = perfect equality, 1 = maximum inequality), the Palma ratio (income of richest 10% divided by poorest 40%), and the Lorenz curve (a graphical plot of cumulative income share against cumulative population share). These tools help economists diagnose structural features of an economy and track trends over time.
The simulation models income distribution dynamics using mechanisms such as random multiplicative growth (wealth compounds proportionally to existing wealth, generating log-normal distributions), winner-take-all labour markets, capital returns exceeding GDP growth (the Piketty r > g mechanism), and policy interventions like progressive taxation and redistribution. Small initial differences in growth rates compound over time into large inequality outcomes.
Income inequality has complex effects on social outcomes, economic mobility, health, and political stability. High inequality tends to reduce social mobility (the "Great Gatsby Curve"), can suppress consumer demand by concentrating income among high-saving households, and correlates with worse population health outcomes. Policy levers including minimum wages, education investment, capital gains taxation, and social transfers affect the inequality trajectory in complex and often contested ways.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.