The French economist Thomas Piketty says that he was more surprised than anyone when his treatise “Capital in the Twenty-First Century” became an international best seller. But Mr. Piketty had struck a nerve: We were right, he said, to worry about unemployment, stagnant wages and the power of the 1 percent, because history shows that “capitalism automatically generates arbitrary and unsustainable inequalities that radically undermine the meritocratic values on which democratic societies are based.” This raises big questions: How much inequality is too much? Is it possible for there to be too little inequality? And, most important, is there a “right” amount of inequality?

Like Mr. Piketty, I seek answers to such inquiries amid the patterns of the past. But unlike him, I suggest that we can find even deeper insights by looking all the way back to the end of the last Ice Age, 15,000 years ago. This longer-term perspective starkly reveals, quite simply, that each age has gotten the inequality it needs, different economic systems functioning best with different levels of inequality. Down through the centuries, groups that have moved toward the most effective amount of inequality reaped benefits; those that did not paid a price.

Everyone on earth was a forager 15,000 years ago, surviving by hunting wild animals and gathering wild plants. These methods had low yields and worked best when people lived in tiny bands and moved around a lot. Foraging also made it difficult to accumulate wealth and power: There was no room for kings and aristocrats. Foragers tended to be very poor but very equal. (By one calculation, the typical hunter-gatherer’s standard of living was equivalent to about $1.10 in 1990 values.)

This all changed, though, about 11,000 years ago with the beginning of farming. Because more food could be produced, the human population exploded. There were roughly 6 million foragers in the world in 10000 B.C., but by 1 B.C. there were about 250 million farmers. Big social groups that stayed in one place, working their fields, flourished at the expense of smaller, less sedentary ones. Between 9000 B.C. and A.D. 1800, almost all foraging societies went extinct.