IN THE 50 years between the end of the American civil war in 1865 and the outbreak of the first world war in 1914, a group of entrepreneurs spearheaded America’s transformation from an agricultural into an industrial society, built gigantic business empires and amassed huge fortunes. In 1848 John J. Astor, a merchant trader, was America’s richest man with $20m (now $545m). By the time the United States entered the first world war, John D. Rockefeller had become its first billionaire.

In the 50 years since Data General introduced the first mini-computers in the late 1960s, a group of entrepreneurs have spearheaded the transformation of an industrial age into an information society, built gigantic business empires and acquired huge fortunes. When he died in 1992, Sam Walton, the founder of Walmart, was probably America’s richest man with $8 billion. Today Bill Gates occupies that position with $82.3 billion.

The first group is now known as the robber barons. The second lot—call them the silicon sultans—could face a similar fate. Like their predecessors, they were once revered as inventive mould-breakers, delivering gadgets to the masses. But just like Rockefeller and the other “malefactors of great wealth”, these new capitalists are losing their sheen. They have been diversifying into businesses that have little to do with computers, while egotistically proclaiming that they alone can solve mankind’s problems, from ageing to space travel. More pointedly, they stand accused of being greedy businessfolk who suborn politicians, employ sweatshop labour, stiff other shareholders and, especially, monopolise markets. Rockefeller once controlled 80% of the world’s supply of oil: today Google has 90% of the search market in Europe and 67% in the United States.

Together, the two groups throw light on some of the most enduring themes of American history—both the country’s extraordinary ability to generate vast wealth and its enduring ambivalence about concentrations of power. Henry Ford, the youngest of the robber barons, once said that history is more or less bunk. He was wrong. The silicon sultans have the advantage of being able to learn from their predecessors’ mistakes. It is not entirely clear that they are doing so.

History rhymes

All business titans have certain things in common—a steely determination to turn their dreams into reality, a gargantuan appetite for success and, as they grow older, a complicated relationship with the fruits of their labour. But the robbers and sultans have more in common than most: they are the Übermenschen of the past 200 years of American capitalism, the people who feel the future in their bones, bring it into being—and sometimes go too far.

The most striking similarity is that they refashioned the material basis of civilisation. Railway barons such as Leland Stanford and E.H. Harriman laid down more than 200,000 miles of track, creating a national market. Andrew Carnegie replaced iron with much more versatile steel. Ford ushered in the era of the automobile. Mr Gates tried to put a computer in every office and in every home. Larry Page and Sergey Brin put the world’s information at everybody’s fingertips. Mark Zuckerberg made the internet social. Just as the railroad made it possible for obscure companies to revolutionise everything from food (Heinz) to laundry (Procter & Gamble), the internet allows entrepreneurs to disrupt everything from retailing (Amazon) to transport (Uber).

Both relied on the relentless logic of economies of scale. The robber barons started with striking innovations—in Ford’s case, a more efficient way of turning petrol into power—but their real genius lay in their ability to “scale up” these innovations to squeeze the competition. “Cut the prices; scoop the market; run the mills full,” as Carnegie put it. The silicon sultans updated the idea. Mr Gates understood the imminent ubiquity of personal computers, and the money to be made from making their software. Messrs Brin and Page grasped that their search engine could create a massive audience for advertisers. Mr Zuckerberg saw that Facebook could profit from inserting itself into the social lives of a sizeable chunk of the world’s population.

Economies of scale allowed the robber barons to keep reducing prices and improving quality. Henry Ford cut the price of his Model T from $850 in its first year of production to $360 in 1916. In 1924 you could buy a much better car for just $290. The silicon sultans performed exactly the same trick. The price of computer equipment, adjusted for quality and inflation, has declined by 16% a year over the five decades from 1959 to 2009. Each iPhone contains the same amount of computing power as was housed in MIT in 1960.

The robber barons denounced regulators in the name of the free market, but monopoly suited them better. Rockefeller rued the “destructive competition” of the oil industry, with its cycle of glut and shortage, and set about ensuring continuity of supply. The first trust, Standard Oil’s, established in 1882, was designed to persuade his rivals to give up control of their companies in return for a guaranteed income and an easy life. “The Standard was an angel of mercy reaching down from the sky and saying ‘Get into the ark. Put in your old junk. We will take all the risks’,” he wrote.

Others followed. Although the Sherman Anti-Trust Act of 1890 outlawed these devices as restraints on free trade, the barons either neutralised the legislation or got round it with another control-preserving device, the holding company. By the early 20th century trusts and holding companies held nearly 40% of American manufacturing assets. Alfred Chandler, the doyen of American business historians, summed up the hundred years following the civil war as “ten years of competition and 90 years of oligopoly”.

The silicon sultans have it easier. They sometimes brush with the law—Google and Apple have been scolded for creating informal agreements to prevent poaching wars—but network effects, whereby the more customers a service has, the more valuable it becomes, mean that their businesses tend towards monopoly anyway. In the digital world, the alternative is often annihilation. As Peter Thiel, PayPal’s cerebral founder, put it in “Zero to One”: “All failed companies are the same: they failed to escape competition.”

The result, in both cases, is an unparalleled concentration of power. A century ago the barons had a lock on transport and energy. Today Google and Apple between them provide 90% of smartphone operating systems of; over half of North Americans and over a third of Europeans use Facebook. None of the five big car companies, by contrast, controls more than a fifth of the American market.

The 0.000001%

The silicon sultans are some of the few businesspeople who can compete with the robber barons in terms of ownership. Carnegie made a point of always owning more than half of his company. Today most firms are widely held by large numbers of shareholders: the largest individual shareholder in Exxon, the grandchild of Standard Oil, is Rex Tillerson, the company’s chief executive. He owns 0.05% of the stock. But tech is different. Together Google’s two founders, Sergey Brin and Larry Page, and its executive chairman, Eric Schmidt (who also sits on the board of The Economist’s parent company) control two-thirds of the voting stock in Google. Mark Zuckerberg owns 20% of Facebook shares but almost all of its “class B” shares, which have ten times the voting power of ordinary shares.

The tech titans are not as rich in relative terms as the robber barons. When Rockefeller retired in the early 20th century, his net worth was equal to about one-thirtieth of America’s annual GNP. When Mr Gates stepped aside as CEO of Microsoft in 2000 his net worth might have equalled 1/130th of it. But they nevertheless represent the most significant concentration of business wealth in the world. In 2013 34% of billionaire-entrepreneurs aged 40 or under made their money in high tech. What makes these concentrations of wealth all the more striking is that they followed on the heels of two of the most egalitarian periods in American history. The 1830s-40s saw America (outside the slave-owning South) establish itself as the land of participatory politics and individualism that Alexis de Tocqueville celebrated in “Democracy in America”. The years between the second world war and the late 1970s were years of low inequality of income in the United States. Both the robber barons and the silicon sultans helped to create a very different America, divided by class and obsessed with money. In “The Theory of the Leisure Class”(1899), Thorstein Veblen showed how an egalitarian society was becoming an aristocratic one. In “Capital in the Twenty-First Century” (2013) Thomas Piketty made similar claims for the past 40 years. The culture they helped to create troubled barons of both eras. Andrew Carnegie, who had risen from bobbin-boy to steel magnate in 17 years, worried about the contrast between “the palace of the millionaire and the cottage of the labourer”. Though he stretched the bounds of good taste when, as perhaps the richest man in the world, he wrote a pamphlet entitled “The Advantages of Poverty” (1891), he was nevertheless sincere in worrying that class division was producing “rigid castes” living in “mutual ignorance” and “mutual distrust” of each other. Mr Thiel contrasts the egalitarian Silicon Valley of his childhood, in which everybody lived in identikit houses and attended first-rate state-funded schools, with today’s divided Valley. But they have taken their strictures only so far. Carnegie bought a ruined castle in Scotland, Skibo, for $85,000 and maintained a staff of 85. Mr Thiel bought an oceanfront spread in Maui for $27m.

No sooner had they transformed themselves from challengers into incumbents than the robber barons succumbed to the two great temptations of a successful middle age: undisciplined growth and unqualified self-belief. Rockefeller spilled into a succession of adjacent businesses—he bought forests to supply his company with wood, established plants to turn the wood into barrels, produced chemicals for refining and bought ships and railroad cars to carry his products. Harriman turned from financing railways to dabbling in finance more generally.

The tech barons are following a similar arc. Google is pouring its super-profits into a succession of loosely related industries: robotics, energy, household appliances, driverless cars and anti-ageing. The company may well be fashioning a world in which it has a hand in everything humans do—driving them to work, adjusting their thermostats, making (and monitoring) their phone calls, and, of course, organising their information. Facebook has spent $2 billion on a start-up that makes virtual-reality equipment. Elon Musk, one of the founders of PayPal, has moved into electric cars and rockets. Jeff Bezos, Amazon’s founder, is also investing in private space travel.

Both groups started dreaming ever bigger dreams. The robber barons turned their hands to solving social problems. Ford led a peace convoy to Europe to put an end to war. When he arrived in Norway and gave the locals a long lecture on tractor production in faltering Norwegian, a local commented that you have to be a very great man to say such foolish things. In the Valley, extending life to 100 or 120 is a passion; Mr Thiel even talks about abolishing death. Reforming the state is another hobby; again Mr Thiel takes things to the limit with a project to establish a collection of floating city states in international waters outside the reach of governments. Reinventing food—creating meat substitutes in particular—is another recent craze: Messrs Brin, Gates and Thiel have invested in alternative food companies.

The most controversial sideways move the robber barons made was into day-to-day politics. A critic once wrote that Rockefeller’s company did everything to the Pennsylvania legislature except refine it. The Senate was known as “the millionaire’s club”. Robber barons bought newspapers—Ford turned the Dearborn Independent into a mouthpiece for his cranky views on the Jews. Not content with establishing what Arthur Schlesinger junior called “government of the corporations, by the corporations and for the corporations”, a growing number of robber barons and their children went into politics themselves. Two of Rockefeller’s children became governors—Nelson of New York and Winthrop of Arkansas—and Nelson went on to be Gerald Ford’s vice-president.

The silicon sultans swore that they would not repeat this mistake, and indeed they have gone nothing like as far as their predecessors. Yet politics is both necessary to business and irresistible to the self-important. This year Google’s political action committee spent more on campaigns than Goldman Sachs, a company legendary for its political connections. Mr Zuckerberg has founded a pressure group, fwd.us, to push for immigration reform. The prospectus for the group, headed by one of Mr Zuckerberg’s former Harvard room-mates, boasts that the tech industry will become “one of the most powerful political forces” because “we control massive distribution channels, both as companies and as individuals”. These “channels” include old-media redoubts such as the Washington Post (bought by Mr Bezos) and the New Republic (bought by Facebook’s Chris Hughes) as well as new media empires such as Yahoo. Silicon Valley is now a regular stop in fundraising and an established part of America’s revolving-door culture. Al Gore, a former vice-president, has been a senior adviser to Google. Sheryl Sandberg, Facebook’s chief operating officer, started her career as chief of staff to Larry Summers when he was treasury secretary.

The backlash

The age of the robber barons led inexorably to the age of populist revolt, with mass strikes, anti-monopoly legislation, social reforms and, eventually, the New Deal of the 1930s. The robber barons had ruined too many people and broken too many rules. Ida Tarbell (whose father had been ruined by Rockefeller) proved to be the most devastating critic: a series of brilliant articles in McClure’s magazine aired Rockefeller’s dirty laundry and popularised the term robber baron. Theodore Dreiser, a novelist, skewered the new rich in “The Titan” and “The Financier”. Some economists worried that America was becoming as unequal as Europe.

A cohort of politicians and lawyers fairly swiftly translated the backlash into policy. Teddy Roosevelt thundered against the “criminal rich”. Woodrow Wilson followed up with even more vigorous attacks on corporate America. The 16th amendment to the constitution introduced an income tax for the first time, and the 17th amendment decreed that senators should be elected by popular vote rather than appointed by local legislatures. That the tech barons have attracted only a fraction of the ire of the robber barons is not surprising: with relatively small, highly paid workforces, they are not involved in the battles with unions that turned the robber barons into ogres. In 1901 US Steel, Carnegie’s creation, employed a quarter of a million men—more than the army and navy combined. Today Google employs more than 50,000, Facebook 8,000 and Twitter 3,500. The electronic toys the tech barons make also inspire more affection among consumers than the commodities or infrastructure that the robber barons produced. But there are nevertheless growing rumbles of discontent. Starting in 1994, the American government successfully prosecuted Microsoft for predatory pricing and undermining competition. The EU is currently mulling various ways of reducing Google’s dominance in the search market, and has even proposed splitting its search engine operations in Europe from the rest of its business. Aside from monopoly and inequality, the main gripe against the tech barons concerns privacy. The tech industry makes much of its money from hoovering up private information.“We know where you are,” says Mr Schmidt. “We know where you’ve been. We can more or less know what you’re thinking about.” The EU is drafting a privacy directive, to come into effect in 2016, which could introduce strict rules about data collection. Despite these growing worries, there is no sign that the trend will reverse. For all the dramatic changes between the railway age and the silicon age, America still has the right formula for producing entrepreneurs. It sucks in talent from all over the world: Carnegie was the son of an impoverished Scottish textile weaver, Mr Brin the son of Russian immigrants. It tolerates failure: the list of barons who failed at least once before they succeeded includes R.H. Macy, H.J. Heinz, Henry Ford and Steve Jobs. And it encourages ambition. Mark Twain and Charles Dudley Warner put their finger on an enduring national trait in “The Gilded Age” (1873): “In America nearly every man has his dream, his pet scheme, whereby he is to advance himself socially or pecuniarily.” Walt Whitman did the same: he celebrated “the extreme business energy, and this almost maniacal appetite for wealth prevalent in the United States”. And the ability to produce such men has allowed America, once again, to pull ahead of the rest of the West.

At the same time, the backlash against the robber barons points to another enduring theme: the tension between big business and democracy. Americans’ admiration for self-made millionaires leads them to be suspicious of huge organisations. Charles Francis Adams, a great-grandson of America’s second president, warned that companies were bent on “establishing despotisms which no spasmodic popular effort will be able to shake off”.

Louis Brandeis, one of the greatest Supreme Court judges, became the voice of the campaign against “the curse of bigness”. “Mere bigness” is an offence against society, he argued, because democracy “cannot endure” when you have huge concentrations of wealth in the hands of a few. Today’s Supreme Court is as comfortable with bigness as Brandeis was uncomfortable with it. Presidents habitually cuddle up to huge organisations in order to raise the money they need to run for office. Yet suspicion of size is growing once again on both the Tea Party right and the Democratic left.

So is bigness capable of redeeming itself? The final enduring theme in the story of the American barons is the story of philanthropy. Carnegie pronounced that “the man who thus dies rich dies disgraced”. The robber barons (including Carnegie) did not exactly die poor. But almost all of them became philanthropists in old age. Carnegie tried to make equality of opportunity mean something by founding 2,811 public libraries. Rockefeller’s intellectual legacy, the University of Chicago, is one of America’s greatest.

Mr Gates’s foundation is one of the largest in the world; and he and his fellows are following their predecessors by applying the same mixture of imagination and hubris to philanthropy that they applied to business. In America entrepreneurs do not just create bigger fortunes. They also cast longer shadows.

Correction: An earlier version of this article said that Charles Francis Adams was "a great-grandson of America's third president". Actually, he was the great-grandson of America's second president, John Adams.