One evening I was sitting in the rooms of the Analytical Society, at Cambridge, my head leaning forward on the table in a kind of dreamy mood, with a table of logarithms lying open before me. Another member, coming into the room, and seeing me half asleep called out “Well, Babbage, what are you dreaming about?” to which I replied, “I am thinking that all these tables (pointing to the logarithms) might be calculated by machinery.”

*Charles Babbage*, 1791 -1871

* W*hether or not it really worked, the Stepped Reckoner was one of the greatest inventions of the seventeenth century. It inspired a host of imitators, and almost every mechanical calculator built during the next 150 years was based on Leibniz’s device. Between 1770 and 1776, for example, a German vicar named Mathieus Hahn built a drumlike calculator containing eight Leibniz wheels (but no sliding carriage). And in 1775, the Englishman Charles, the third Earl Stanhope, designed a machine with eight Leibniz wheels and a sliding carriage. Unlike the Reckoner, both of these devices worked well, and gained a small measure of fame for their inventors. Although Stanhope’s device was simple enough for mass production, the idea of manufacturing machines en masse was only beginning to set in during his day, and the first mass-produced calculator didn’t appear until about 1820.

The Arithmometer, as it was called, was invented by the Frenchman Charles Xavier Thomas de Colmar (1785-1870). Thomas ran an insurance company in Paris, where the mathematical nature of his work led him to contemplate the rich possibilities of mechanical calculation. His machine was a first-rate piece of practical engineering – compact, reliable, easy to use, and, like Hahn’s and Stanhope’s, based on the Leibniz wheel (but without a carriage). Although the first Arithmometers were limited to six digit results, they were semiautomatic, being driven by a springloaded belt that the user pulled before every operation. In later models, the belt, which tended to wear down, was replaced by a metal crank, and the Arithmometer’s capacity was expanded to a much more useful twelve digits. About fifteen hundred models were sold over the next thirty years, chiefly to banks, insurance companies, and other businesses.

As the first mass-produced calculator, the Arithmometer attracted a good deal of attention. Thomas built a giant version for the 1855 Paris Exposition, and the machine, which resembled a fancy upright piano, won a gold medal; another Arithmometer captured a medal at the International Exhibition in London eleven years later. Like the Reckoner, the Arithmometer had many imitators, and arithmometer passed into the language as a generic term that referred to any Thomas-type calculator. The term survived until the early 1900s, when arithmometers fell out of use, replaced by keyboard calculators, which were much easier to use.

The Arithmometer was only one of hundreds of mechanical inventions ushered in by the industrial revolution, which inspired an unprecedented appreciation of the power of machines – an appreciation that was celebrated in the many international industrial exhibitions of the nineteenth century. By the early 1800s, the industrial revolution was in full swing in Great Britain and spreading to the Continent, particularly France. The rapid expansion of industry and commerce, and the growth in population and education, sent a torrent of statistics through science, industry, business, and government. The world was moving on a faster and bigger track. For the first time, there was not only a pressing need for calculators like the Arithmometer, there was also a need for the systematic manufacture of numerical tables.

Since the advent of logs, the tools of the trade of anyone who worked with figures, whether bankers or navigators, were mathematical tables. These lists of figures were indispensable in science, finance, navigation, engineering, surveying, and other fields. There were tables of square roots, cube roots, interest rates, hyperbolic and exponential functions, mathematical constants, like Bernoullian numbers, and the price of meat per pound at the butcher’s. Many mathematicians devoted the greater part of their careers to tabular calculation, and the need for accurate tables was a matter of national concern. In 1784, for instance, the government of France decided to draw up new tables of logs and trigonometric functions (such as sine and cosine). Six distinguished mathematicians devised the mathematical methods and supervised the enterprise; seven or eight human computers served as foremen and another seventy or eighty performed the calculations. The project took two years and the results were two handwritten copies of seventeen volumes of tables. Known as the *Tables de Cadastres* (*Surveyors’ Tables*), they were never published for fear of typographical errors and were stored at a library in Paris, where anyone could consult them.

Despite all the cost and effort that went into the making of tables, they inevitably were full of errors. In 1835, an informal survey of one scientist’s library turned up 140 books of tables, and an examination of only some of the figures in forty of the books uncovered 3,700 inaccuracies. Even the British Nautical Almanac – the navigators’ bible – was sprinkled with mistakes, and more than one ship was said to have run aground or been lost at sea as a result of the miscalculations. Maddeningly enough, some of the slip-ups were even deliberate, inserted by publishers as traps for would-be plagiarizers. Given the importance of tables in navigation, their fallibility was an overriding concern in Great Britain and other seafaring nations.

Mathematicians were at a loss for a remedy. And then a young Englishman by the name of Charles Babbage came up with a solution. The son of a wealthy banker, Babbage was a gifted mathematician with the eye of a seer. He was a student at Cambridge University, in 1812 or 1813, when the first glimmer of the solution came to him. As he recalled in his autobiography, *Passages from the Life of a Philosopher* (1864), he was sitting in the quarters of the Analytical Society, an undergraduate mathematics club, gazing at a table of logs, when it suddenly occurred to him that the figures might be calculated by machine. It was a great idea and none of his contemporaries seemed to have thought of it; Babbage wasn’t thinking of using a run-of-the-mill calculator like Stanhope’s but a machine specially designed to manufacture tables.

Babbage was only a sophomore or junior at the time and the idea soon faded from his mind. But it recurred to him several years later. Once again, the muse was a mathematical table and the circumstances a chance conversation. In 1820 or 1821, Babbage and John Herschel, an astronomer and a close friend from Cambridge, were checking a set of tables they had helped prepare for the Astronomical Society. (Herschel was the son of Sir William Herschel, the great astronomer and founder of cosmology.) As usual, there were several errors. “I wish to God these calculations had been executed by steam,” said Babbage. Herschel, a talented mathematician, thought the idea was sensible enough. “It is quite possible,” he said. The two men discussed the notion, and Babbage later drew up plans for a machine that could do the job.

The Difference Engine, as he called the gadget, was an ambitious conception. Powered by falling weights raised by a steam engine, it could calculate tables by the method of constant differences (which we’ll discuss in a moment) and record the results, figured to the twentieth place, on metal plates. By printing the tables directly from these plates, or from plates made from the originals, it would eliminate the table-makers’ worst gremlins, typographical errors. Babbage hired several workmen to make a prototype and, after ironing out the inevitable bugs, produced a working model in 1822. It was a six-digit calculator made of toothed wheels and run by a hand crank. Only a kernel of the machine he had in mind, it proved the feasibility of his conception.