Curious Minds

Clear answers to science and history questions

When Was the First Computer Invented?

· 5 min read · History

The first computer was invented over 2,000 years ago—around 100 BC—in the form of the Antikythera mechanism, a bronze gear-based device used to predict astronomical positions and eclipses. However, if you mean the first modern electronic computer, that was the ENIAC, completed in 1945, or the earlier Atanasoff–Berry Computer (1942) and the Z3 (1941). The answer depends on how you define “computer,” and this article unpacks the full timeline.

What Counts as a “Computer”?

Before pinpointing a date, it helps to define the term. A computer is a device that can accept data, process it according to a set of instructions, and produce a result. That definition covers everything from a simple abacus to a smartphone. Historians often split computers into two families: analog (which represent data as continuous physical quantities) and digital (which use discrete numbers, typically binary). The Antikythera mechanism is an analog computer; ENIAC is a digital electronic one.

The Antikythera Mechanism (c. 100 BC)

Discovered in 1901 in a shipwreck off the Greek island of Antikythera, this corroded bronze device stunned researchers. It contains at least 30 interlocking gears, with a crank that moved pointers showing the positions of the Sun, Moon, and likely the five known planets. It could also predict eclipses and track the four-year cycle of the Olympic Games. Radiocarbon dating and inscriptions place its construction around 100–150 BC, making it the oldest known computer. No similar device appears in historical records until the 14th-century astronomical clocks of Europe, so it was astonishingly advanced for its era.

Early Mechanical Calculators (17th–19th Century)

After the Antikythera mechanism, the next major leap came in the 1600s. Wilhelm Schickard built a “calculating clock” in 1623 that could add and subtract; Blaise Pascal’s Pascaline (1642) did the same more reliably. Gottfried Leibniz improved on this in the 1670s with a stepped drum that could multiply and divide. These were calculators, not full computers—they lacked programmability. In the 1800s, Charles Babbage designed the Analytical Engine, a mechanical general-purpose computer with a CPU-like “mill” and memory (“store”). It was programmable via punched cards, but Babbage never completed it. His collaborator Ada Lovelace wrote the first algorithm intended for such a machine, making her the first programmer, though the engine was never built.

The First Electronic Computers (1930s–1940s)

The move to electronics began in the late 1930s. Key early machines include:

  • Zuse Z3 (1941) – German engineer Konrad Zuse built this electromechanical computer, the first programmable, fully automatic digital machine. It used telephone relays and could perform floating-point arithmetic.
  • Atanasoff–Berry Computer (1942) – John Atanasoff and Clifford Berry built the first electronic digital computer at Iowa State College. It used vacuum tubes and binary arithmetic, but it was not programmable and had no stored program.
  • Colossus (1943–1944) – British codebreakers at Bletchley Park built this electronic machine to decrypt German messages. It was programmable in a limited sense, using switches and plugs.
  • ENIAC (1945) – The Electronic Numerical Integrator and Computer, built at the University of Pennsylvania, is often called the first general-purpose electronic computer. It could be reprogrammed to solve a wide range of problems, used 17,468 vacuum tubes, and could perform 5,000 additions per second. It was unveiled to the public in 1946.

Stored-Program Computers (Late 1940s)

ENIAC’s programming required rewiring, which was tedious. The next breakthrough was the stored-program concept: instructions held in memory like data. The EDVAC (1949) and the Manchester Baby (1948) were the first machines to run a program from stored memory. The Manchester Baby ran its first program on June 21, 1948, making it the first stored-program computer. The UNIVAC I (1951) became the first commercial computer sold to a business, and it correctly predicted the 1952 U.S. presidential election outcome with a small sample.

How the Antikythera Mechanism Worked

To understand why it’s called a computer, you need to see its function. The device had a front dial showing the zodiac and calendar, and two rear dials for eclipse predictions. The gears translated the motions of the Sun and Moon into mechanical rotations. A user would turn a crank, and the gears would move pointers to display the current positions. It could also model the Moon’s elliptical orbit using a pin-and-slot mechanism—a level of sophistication not seen again until the 16th century. Researchers have used X-ray imaging to reconstruct its internal structure, revealing inscriptions that read like a user manual.

Why the 2,000-Year Answer Matters

Most people think of computers as a 20th-century invention. The Antikythera mechanism challenges that assumption. It shows that ancient engineers understood complex gear trains and could encode astronomical knowledge into a physical machine. It also raises questions: was it a one-off, or did similar devices exist? No other examples have been found, so historians are uncertain. Some scholars argue it might have been part of a tradition of mechanical devices that were lost in the Library of Alexandria’s destruction or simply not preserved. This uncertainty is part of the fascination—it’s a reminder that technological progress isn’t always linear.

Frequently Asked Questions

Was the abacus the first computer?

The abacus is a calculating aid, not a computer, because it requires a human to perform the steps. It doesn’t process data automatically. The Antikythera mechanism is the first known device that could compute without human intervention beyond turning a crank.

Why isn’t Babbage’s Analytical Engine considered the first computer?

It was designed as a general-purpose, programmable computer, but it was never built in Babbage’s lifetime. The first working mechanical computers were the Z3 and the Mark I, but they were electromechanical, not purely electronic. The Analytical Engine’s design was influential, but it remained on paper.

What was the first personal computer?

The term “personal computer” is fuzzy. The Altair 8800 (1975) is often credited as the first commercially successful personal computer, but earlier machines like the Kenbak-1 (1971) and the Xerox Alto (1973) had personal features. The Apple II (1977) and IBM PC (1981) made PCs widespread.

Did the ancient Greeks have other computers?

No other complete devices have been found, but historical texts mention automata and geared devices. Cicero wrote of a “sphere” that showed the Sun, Moon, and planets—possibly a similar mechanism. Without physical evidence, it’s uncertain how common they were.

How accurate was the Antikythera mechanism?

It could predict eclipses with remarkable accuracy, but it wasn’t perfect. Its gear ratios approximated the lunar month and solar year to within a few minutes. It likely served as a teaching tool or a display of wealth, not a scientific instrument for precise measurement.

In this article
  1. What Counts as a “Computer”?
  2. The Antikythera Mechanism (c. 100 BC)
  3. Early Mechanical Calculators (17th–19th Century)
  4. The First Electronic Computers (1930s–1940s)
  5. Stored-Program Computers (Late 1940s)
  6. How the Antikythera Mechanism Worked
  7. Why the 2,000-Year Answer Matters
  8. Frequently Asked Questions