Quote Origin: A Mathematician Is a Machine Which Turns Coffee into Theorems

Paul Erdős? Alfréd Rényi? Jane Philcox? Suzy Schultz? Scott Westerfeld? Anonymous?

Question for Quote Investigator: Three outstanding mathematicians have been credited with the following humorous remark about their profession:

A mathematician is a machine for turning coffee into theorems.

This statement is usually attributed to the brilliant and prolific Hungarian mathematician Paul Erdős. Yet, it has also been attributed to the prominent Hungarian mathematicians Alfréd Rényi and Paul Turán. Would you please help to determine the originator?

Also, would you please explore the variant quips about writers, programmers, lawyers, and others.

Reply from Quote Investigator: The earliest match known to QI appeared in a paper delivered by Paul Erdős in 1971 titled “Child Prodigies” at “The Washington State University Conference on Number Theory”. Erdős spoke about his experience providing coffee to a youthful aspiring mathematician. Boldface added to excerpts by QI:1

In Hungary, many mathematicians drink strong coffee, in fact Rényi once said: a mathematician is a machine which turns coffee into theorems, at the mathematical institute they make particularly good coffee, when Pósa was not quite 14 I offered him a little strong coffee which he drank with an infinite amount of sugar. My mother was very angry that I gave the little boy strong coffee.

Based on this citation, Alfréd Rényi is the leading candidate for creator of this expression. Erdős was the most significant popularizer, and nowadays he often incorrectly receives credit. Erdős referred to Lajos Pósa in the passage above. Pósa became a well-known educator in mathematics.

Below is an overview showing variants with attributions and dates:

1971: A mathematician is a machine which turns coffee into theorems (Attributed to Alfréd Rényi by Paul Erdős)

1984: A mathematician is a machine for converting coffee into theorems (Attributed to an unnamed colleague of Paul Erdős)

1987 Nov: A mathematician is a machine for turning coffee into theorems (Attributed to Paul Erdős)

1991 May 15: A programmer is a machine for converting coffee into code (Usenet poster Jane Philcox)

1997 Aug 15: A programmer is a machine for turning beer into code (Usenet poster Matt Simpson)

2003 Jan 15: A programmer is a device for turning computer programs into spaghetti (Usenet poster H. S. Teoh)

2004: Her brain was nothing but a machine for turning coffee into special effects (Novelist Scott Westerfeld)

2000 Oct 03: A computer programmer is a device for turning coffee into bugs (Attributed to Bram Moolenaar by Usenet poster Arnaud S. Launay)

2008 Jan 21: A writer is a machine for turning coffee into poems (X-Twitter handle Suzy @Suzy_Schultz)

2009 Apr 07: A writer is a device for turning coffee into prose (X-Twitter handle John Ochwat @jjochwat)

2009 Jul 22: A programmer is a machine for turning caffeine, sugar and/or cigarettes into awkward and cryptic text files (X-Twitter handle Nigel F. Kennedy @nfkennedy)

2009 Jul 22: A Software Development Engineer … is a biological machine for turning snacks & beverages into software systems. (X-Twitter handle Ravi Mandala @rmandala)

2009 Sep 07: A writer is a machine for turning tea into descriptions (Attributed to Jim Rossignol by X-Twitter handle Dave McLeod @davemcleod)

2020 Nov 24: The brain is a machine for turning glucose into mistakes (X-Twitter handle Neuroskeptic @Neuro_Skeptic)

2024 Feb 28: “lawyer: a machine for turning coffee into billable hours” (Attributed to an anonymous lawyer by X-Twitter handle Gabriel @gbrl_dick)

Below are details for selected citations in chronological order.

In October 1984 the magazine “Science84” published a profile of Paul Erdős by journalist John Tierney who stated that Erdős regularly consumed small quantities of stimulants. Ronald Graham, a friend and fellow mathematician, attempted to discourage this habit, but Erdős justified his actions by quoting an unnamed colleague:2

He compared the pills to strong coffee and liked to quote a colleague’s remark: “A mathematician is a machine for converting coffee into theorems.” Graham was concerned, though, and offered Erdős $500 to do without speed for a month.

Erdős undertook Graham’s challenge but afterwards decided to continue using stimulants.

In 1985 psychologist Jonathan Baron published “Rationality and Intelligence” which contained a version of the saying ascribed to an unnamed mathematician:3

Mathematicians sometimes describe their science as “the black art of turning coffee into theorems” (although the cognitive effects of caffeine, in fact, are difficult to demonstrate).

In November 1987 science writer Paul Hoffman published a piece about Erdős titled “The Man Who Loves Only Numbers” in “The Atlantic Monthly” magazine. Hoffman attributed the saying to Erdős:4

He has done mathematics since he was three, but for the past sixteen years, since the death of his mother, he has put in nineteen-hour days, keeping himself fortified with ten to twenty milligrams of Benzedrine or Ritalin, strong espresso, and caffeine tablets. “A mathematician,” Erdős is fond of saying, “is a machine for turning coffee into theorems.” When friends urge him to slow down, he always has the same response: “There’ll be plenty of time to rest in the grave.”

In 1988 “Time” magazine published an essay with the following passage:5

“A mathematician,” says Paul Erdős, one of its greatest living practitioners and one of the most eccentric, “is a machine for turning coffee into theorems.” Mathematicians do not like to admit that, because when they do, their grant money dries up—it is hard to export theorems—and they are suspected of just playing around, which of course they are.

In 1990 futurist Raymond Kurzweil published “The Age of Intelligent Machines” which included the following chapter epigraph:6

A mathematician is a machine for turning coffee into theorems.
Paul Erdős

Also, in 1990, volume 18 of the “Dictionary of Scientific Biography” printed an entry for Hungarian mathematician Alfréd Rényi which contained the following:7

One of his sayings, now widely current, defined a mathematician as “a machine for converting coffee into theorems.” (Turán improved on this by a remark, prompted by a cup that was too weak: “This coffee is fit only for lemmas.”) These anecdotes show that for Rényi, mathematics was a social activity through which he generated a great number of friends.

In 1991, Jane Philcox posted a message to the Usenet newsgroup misc.kids containing a variant about programmers and code:8

A programmer is a machine for converting coffee into code.

In 1997, Matt Simpson of the University of Kentucky posted a message to the Usenet newsgroup comp.dcom.telecom.tech containing a variant about programmers and beer:9

A programmer is a machine for turning beer into code

In 2000, Arnaud S. Launay posted a message to the Usenet newsgroup mailing.unix.mutt-dev crediting a Dutch software engineer with a variant:10

A computer programmer is a device for turning coffee into bugs.
Bram Moolenaar

In January 2003, H. S. Teoh posted a message to the Usenet newsgroup linux.debian.devel containing a variant about programmers and spaghetti:11

A programmer is a device for turning computer programs into spaghetti. A *good* programmer is a device for turning spaghetti into computer programs.

In 2004, young adult fiction writer Scott Westerfeld included a variant about the brain in his novel “So Yesterday”:12

I handed her the cup of coffee we’d brought as an offering. She always said her brain was nothing but a machine for turning coffee into special effects.

Scott Westerfeld enjoyed using this template and his 2004 novel included other instances:13

Real police were machines for turning coffee into solved crimes. I was a machine for turning coffee into jangled nerves.

In January 2008, a tweet from handle @Suzy_Schultz contained an entertaining variant about writers. The tweet acknowledged its inspiration:14

“A writer is a machine for turning coffee into poems.”  <taking it back from the mathematicians>

In April 2009, a tweet from John Ochwat @jjochwat contained another variant about writers:15

A writer is a device for turning coffee into prose.

In July 2009, a tweet from Nigel F. Kennedy @nfkennedy contained an elaborate variant:16

A programmer is a machine for turning caffeine, sugar and/or cigarettes into awkward and cryptic text files.

Also, in July 2009, a tweet from Ravi Mandala @rmandala contained another variant about software:17

A Software Development Engineer, Snack Devouring Entity or SDE is a biological machine for turning snacks & beverages into software systems.

In September 2009, a tweet from Dave McLeod @davemcleod credited an author and game designer with a variant using “tea” instead of “coffee”:18

“A writer is a machine for turning tea into descriptions” – Jim Rossignol.  In my case, less descriptions, more Etcetera copy.

In November 2020, a tweet from @Neuro_Skeptic contained a variant about the brain:19

The brain is a machine for turning glucose into mistakes

In February 2024, an x-tweet from Gabriel @gbrl_dick contained a variant about lawyers. The word “billable” was misspelled as “billlable”:20

a 35 year old lawyer will post: “lawyer: a machine for turning coffee into billlable hours” variations to instagram once a week till the end of time

In conclusion, Alfréd Rényi received credit for the quip about mathematicians and coffee in 1971 from Paul Erdős. Rényi is the most likely creator of this remark. Variant statements proliferated during the ensuing decades.

Acknowledgement: Great thanks to the participants in a discussion thread on Bluesky including Craig Good ‪@clgood.bsky.social; Protik Islam-Jakobsson ‪@protik.bsky.social; and reggie seidman @ennui.org. This thread inspired QI to formulate this question and perform this exploration.

Image Notes: Picture of coffee and a croissant from Rizky Subagja at Unsplash. The image has been cropped and resized.

  1. 1971, Proceedings of the Washington State University Conference on Number Theory, Held: March 24-27, 1971, Editors: James H. Jordan and William A. Webb, Article: Child Prodigies by Paul Erdős, Start Page 1, Quote Page 12 and 13, Department of Mathematics, Washington State University, Pullman, Washington. (Verified with scans at renyi.hu) link pdf document link ↩︎
  2. 1984 October, Science84, Volume 5, Number 8, Paul Erdős is in town. His brain is open by John Tierney, Start Page 40, Quote Page 42, Column 2, American Association for the Advancement of Science, Washington D.C. (Verified with scans) ↩︎
  3. 1985, Rationality and Intelligence by Jonathan Baron (University of Pennsylvania), Chapter 5: Conditions of effective thinking, Quote Page 180, Cambridge University Press, Cambridge, England. (Verified with scans) ↩︎
  4. 1987 November, The Atlantic Monthly, Volume 260, Number 5, The Man Who Loves Only Numbers by Paul Hoffman, Start Page 60, Quote Page 60, Column 2, The Atlantic Monthly Company, Boston, Massachusetts. (Verified with scans) ↩︎
  5. 1988 April 18, Time, Essay: The Joy of Math, or Fermat’s Revenge by Charles Krauthammer, Start Page 92, Quote Page 92, Column 2, Time Inc, New York. (Verified with scans) ↩︎
  6. 1990 Copyright, The Age of Intelligent Machines by Raymond Kurzweil, Chapter: Mathematical Roots, Quote Page 103, The MIT Press, Cambridge, Massachusetts. (Verified with scans) ↩︎
  7. 1990, Dictionary of Scientific Biography by Frederic L. Holmes (Yale University) Editor in Chief, Volume 18, Supplement II, Aleksandr Nikolaevich Lebedev, Fritz Zwicky, Start Page 732, Quote Page 734, Column 1, Charles Scribner’s Sons, New York. (Verified with scans) ↩︎
  8. Usenet discussion message, Timestamp: May 15, 1991, 10:44:35 PM, Newsgroup: misc.kids, From: Jane Philcox, Subject: Coming Out of the Closet (Pregnancy Wise) (long). (Google Groups Search; Accessed June 13, 2026) link ↩︎
  9. Usenet discussion message, Timestamp: Aug 15, 1997, 3:00:00 AM, Newsgroup: comp.dcom.telecom.tech, From: msim…@pop.uky.edu (Matt Simpson), Subject: Good Digital Answering Machine? (Google Groups Search; Accessed June 13, 2026) link ↩︎
  10. Usenet discussion message, Timestamp: Oct 3, 2000, 3:00:00 AM, Newsgroup: mailing.unix.mutt-dev, From: Arnaud S. Launay, Subject: [fwd] Small patch for mutt (from: apj@wol.dk). (Google Groups Search; Accessed June 13, 2026) link ↩︎
  11. Usenet discussion message, Timestamp: Jan 15, 2003, 7:20:05 AM, Newsgroup: linux.debian.devel, From: H. S. Teoh, Subject: Bug#176772: Default exim configuration should NOT call procmail with -d (produces bad >From headers). (Google Groups Search; Accessed June 13, 2026) link ↩︎
  12. 2004, So Yesterday by Scott Westerfeld, Chapter 8, Quote Page 49, Razorbill: Penguin Group, New York. (Verified with scans) ↩︎
  13. 2004, So Yesterday by Scott Westerfeld, Chapter 11, Quote Page 68, Razorbill: Penguin Group, New York. (Verified with scans) ↩︎
  14. X-Tweet, From: Suzy @Suzy_Schultz, Timestamp: 8:25 PM, Jan 21, 2008, Text: A writer is a machine for turning coffee into poems, (Accessed on x.com on June 12, 2026) link ↩︎
  15. X-Tweet, From: John Ochwat @jjochwat, Timestamp: 6:21 PM, Apr 7, 2009, Text: A writer is a device for turning coffee into prose. (Accessed on x.com on June 12, 2026) link ↩︎
  16. X-Tweet, From: Nigel F. Kennedy @nfkennedy, Timestamp: 11:32 AM, Jul 22, 2009, Text: A programmer is a machine for turning caffeine. (Accessed on x.com on June 12, 2026) link ↩︎
  17. X-Tweet, From: Ravi Mandala @rmandala, Timestamp: 1:29 AM, Jul 22, 2009, Text: A Software Development Engineer, Snack Devouring Entity. (Accessed on x.com on June 12, 2026) link ↩︎
  18. X-Tweet, From: Dave McLeod @davemcleod, Timestamp: 11:07 AM, Sep 7, 2009, Text: “A writer is a machine for turning tea into descriptions” – Jim Rossignol. (Accessed on x.com on June 12, 2026) link ↩︎
  19. X-Tweet, From: Neuroskeptic @Neuro_Skeptic, Timestamp: 9:18 AM, Nov 24, 2020, Text: The brain is a machine for turning glucose into mistakes. (Accessed on x.com on June 12, 2026) link ↩︎
  20. X-Tweet, From: Gabriel @gbrl_dick, Timestamp: 2:46 AM, Feb 28, 2024, Text: lawyer … coffee into billlable hours. (Accessed on x.com on June 12, 2026) link ↩︎