Skip to content
Think 15 min read

Math Jokes Explained: 27 Funny Jokes and the Real Maths

Observation recorded
Joke card on a dark navy background. An engineer and a mathematician see a black sheep from a train in Scotland. The engineer says: all Scottish sheep are black. The mathematician says: at least one sheep in Scotland is black on at least one side. A white deadpan stick figure stands next to a black sheep on the left.

Hand a topologist a coffee mug and a doughnut and ask which one is breakfast. You will get a five-minute answer and no breakfast. Maths humour works like that: the punchline is usually a true statement that sounds wrong.

Most lists of math jokes stop at the punchline. Here every joke is followed by the real maths that makes it funny, with actual numbers, so you can tell it and win the follow-up argument. Calculus jokes have their own page (calculus jokes, with the calculus), so this one sticks to numbers, primes, algebra, geometry, infinity, proofs and topology.

Quick answer The funniest math joke is the infinite bar: "Infinitely many mathematicians walk into a bar. The first orders a beer, the second half a beer, the third a quarter. The bartender pours two beers." It works because 1 + 1/2 + 1/4 + ... really does add up to exactly 2, however many people order.
Math joke card: Infinitely many mathematicians walk into a bar. The first orders a beer, the second half a beer, the third a quarter. The bartender pours two beers and says: you lot need to know your limits. Two full pint glasses are drawn on the left above the series 1 + 1/2 + 1/4 + 1/8 + ... = 2.
Fig 1. The best math joke we know, and it is also a correct calculation. The full sum is worked out further down.

Number jokes (including 7 8 9)

Why was 6 afraid of 7?

Because 7 8 9.

Why it's funny: "Eight" and "ate" sound the same in English, so the counting sequence 7, 8, 9 turns into a crime report. In French (sept, huit, neuf) nobody gets eaten.

So why did 7 eat 9?

You're supposed to have 3 squared meals a day.

Why it's funny: 32=93^2 = 9, so a "square meal" taken literally is exactly the number 7 swallowed.

Why should you never mention the number 288?

It's two gross.

Why it's funny: A gross is a dozen dozens, 122=14412^2 = 144. So 288=2×144288 = 2 \times 144, or literally two gross.

Why does nobody invite 0 to parties?

It turns up, adds nothing, and ruins every division.

Why it's funny: Zero is the additive identity: a+0=aa + 0 = a for any number, so it adds nothing. Division by zero is banned because if 1/01/0 were some number qq, then 0×q0 \times q would have to equal 1, and zero times anything is zero.

Two negative people met at the maths club and got married.

Everyone agreed the product was positive.

Why it's funny: A negative times a negative is positive, and that is not an arbitrary school rule. The distributive law forces it: 0=(−1)(1+(−1))=−1+(−1)(−1)0 = (-1)(1 + (-1)) = -1 + (-1)(-1), so (−1)(−1)(-1)(-1) must be 1.

Prime number jokes

Why did the prime number eat lunch on its own?

Its only factors were 1 and itself.

Why it's funny: A prime has exactly two divisors, 1 and the number itself. There are 25 primes below 100, and they get lonelier as numbers grow: near a million, only about 1 number in 14 is prime.

Why was 1 thrown out of the prime number club?

The rules say two different divisors, and 1 kept arriving alone.

Why it's funny: 1 has a single divisor. Mathematicians exclude it on purpose: if 1 were prime, 6 could be written as 2×32 \times 3, or 1×2×31 \times 2 \times 3, or 1×1×2×31 \times 1 \times 2 \times 3, and unique prime factorisation would fall apart.

Which prime is the oddest of them all?

2. It's the only even one.

Why it's funny: Every other even number is divisible by 2, so 2 is the only even prime: the odd one out in a list of odd numbers.

Algebra and geometry jokes

Dear Algebra, please stop asking us to find your X.

She's not coming back, and don't ask Y.

Why it's funny: x is the default unknown because René Descartes, in La Géométrie (1637), used the last letters of the alphabet for unknowns and the first letters for known quantities. The story that his printer picked x because it had spare type has no good evidence behind it.

Why did the obtuse angle go to the beach?

It was over 90 degrees.

Why it's funny: An obtuse angle is, by definition, between 90° and 180°. And 90 °F is about 32 °C, which is beach weather.

Parallel lines have so much in common.

It's a shame they'll never meet.

Why it's funny: In flat, Euclidean geometry, parallel lines never cross. On a sphere they do: lines of longitude all cross the equator at right angles, about 111 km apart per degree, and still meet at both poles.

Why did 3, 4 and 5 get the flat over every other applicant?

They were the only ones who squared up.

Why it's funny: 32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2, so a triangle with sides 3, 4 and 5 has an exact right angle. Builders still use it to check that a corner is square.

Why does a square always win arguments with a rhombus?

It has all the right angles.

Why it's funny: A rhombus is any shape with four equal sides. A square is the rhombus whose angles are all 90°.

Infinity, infinite series and proof jokes

Infinitely many mathematicians walk into a bar. The first orders a beer, the second half a beer, the third a quarter.

The bartender pours two beers and says: you lot need to know your limits.

Why it's funny: Each order is half the last, a geometric series whose total is exactly 2. The arithmetic is in the numbers section below.

The next night, infinitely many mathematicians order 1 beer, then half, then a third, then a quarter.

The bartender sells the pub.

Why it's funny: These orders form the harmonic series, which has no finite total. Nicole Oresme proved this around 1350 by grouping the terms: 13+14>12\tfrac13 + \tfrac14 > \tfrac12, the next four terms are also more than 12\tfrac12, and so on forever.

Fermat's last tweet:

"I have a truly marvellous proof of this, which 280 characters are too few to contain."

Why it's funny: In 1637 Pierre de Fermat wrote in a book margin that an+bn=cna^n + b^n = c^n has no whole-number solutions for n>2n > 2, and that the margin was too narrow for his proof. Andrew Wiles finally proved it in a paper published in 1995 that runs 109 pages in Annals of Mathematics, plus a companion paper with Richard Taylor. Twitter only reached 280 characters in 2017. Fermat would still have been short.

My diet works by mathematical induction. If I'm on it on day n, I'm on it on day n + 1.

I just haven't proved the base case yet.

Why it's funny: A proof by induction needs two parts: a base case (it is true for the first day) and a step (true for one day means true for the next). The step alone proves nothing, which is why diets that start "tomorrow" stay theoretical.

I can prove by induction that all horses are the same colour.

The proof works for every herd except one with two horses in it.

Why it's funny: A famous fake proof. The step removes one horse, then another, and says the two overlapping groups share a colour. With two horses the groups of one do not overlap, so the chain snaps at its first link. George Pólya posed the idea in 1954 and Joel E. Cohen turned it into horses in 1961.

Mathematician, physicist and engineer jokes

An engineer and a mathematician see a black sheep from a train in Scotland. The engineer says: all Scottish sheep are black.

The mathematician says: at least one sheep in Scotland is black on at least one side.

Why it's funny: The engineer generalises from one sample. The mathematician states only what was seen: one sheep exists (logicians write ∃), and one side of it is black.

Math joke card: An engineer and a mathematician see a black sheep from a train in Scotland. The engineer says: all Scottish sheep are black. The mathematician says: at least one sheep in Scotland is black on at least one side. A white deadpan stick figure stands next to a black sheep on the left.
Fig 2. The black sheep joke: the mathematician refuses to claim anything the evidence does not prove.

An engineer wakes up to a small fire, fills a bucket and puts it out. A mathematician wakes up to the same fire, sees the bucket and the tap,

says "a solution exists", and goes back to sleep.

Why it's funny: Mathematicians really do prize existence proofs, which show an answer must exist without producing it. Example: two Londoners must have exactly the same number of hairs, because London has far more people than any head has hairs. Nobody counts.

What is 2 + 2? The engineer says about 4. The physicist says 4, give or take 0.1.

The mathematician asks: in which number system?

Why it's funny: In clock arithmetic modulo 3, 2+2=12 + 2 = 1, and modulo 4 it equals 0. Your watch does it daily: four hours after 10 o'clock is 2 o'clock, because 10+4=14≡2(mod12)10 + 4 = 14 \equiv 2 \pmod{12}.

A mathematician is a machine for turning coffee into theorems.

Weak coffee is only good for lemmas.

Why it's funny: A lemma is a small result proved as a stepping stone to a bigger theorem. The first line is usually credited to Paul Erdős, but it most likely came from his colleague Alfréd Rényi; Pál Turán added the weak-coffee line.

Topology jokes and imaginary number jokes

Why did the topologist pour her coffee into a doughnut?

To her, the mug and the doughnut are the same shape. The tablecloth disagreed.

Why it's funny: Topology only cares about properties that survive stretching and squashing without tearing or gluing. A mug and a doughnut each have exactly one hole (genus 1), so a clay doughnut can be pushed into a mug with the hole becoming the handle.

Math joke card: Why did the topologist pour her coffee into a doughnut? To her, the mug and the doughnut are the same shape. The tablecloth disagreed. A pink doughnut turns into a cyan coffee mug, labelled genus 1 equals genus 1.
Fig 3. A doughnut and a mug are the same object to a topologist: one hole each.

How many holes does a drinking straw have?

The topologist said one, and lost every friend who said two.

Why it's funny: A straw is a tube, which squashes flat into a ring: one hole, like a doughnut. The "two holes" camp is counting both ends of one tunnel.

Why did the chicken cross the Möbius strip?

To get to the same side.

Why it's funny: Give a paper strip a half twist and tape its ends together, and you get a surface with only one side and one edge. Cut along that line and, instead of two loops, you get one longer loop with two full twists.

My imaginary friend thinks he's better than everyone.

I told him he's just like the rest of us, turned 90 degrees.

Why it's funny: On the complex plane, multiplying by ii rotates any number 90° anticlockwise about zero: 1 becomes ii, and ii becomes −1-1. That is why i2=−1i^2 = -1, since two quarter turns make a half turn.

Why is i to the power i so smug?

It raised an imaginary number to an imaginary power and still came out real.

Why it's funny: It is true. Using i=eiπ/2i = e^{i\pi/2}, you get ii=ei⋅iπ/2=e−π/2≈0.2079i^i = e^{i \cdot i\pi/2} = e^{-\pi/2} \approx 0.2079, an ordinary real number. (Strictly it has infinitely many values, all real.)

How many beers does the infinite bar actually pour?

The infinite bar joke is a calculation in disguise. Call the total after the first n mathematicians SnS_n:

Sn=1+12+14+⋯+12n−1S_n = 1 + \tfrac12 + \tfrac14 + \dots + \tfrac{1}{2^{n-1}}

Halve both sides and subtract, and almost every term cancels:

Sn−12Sn=1−12nSn=2−12n−1\begin{aligned} S_n-\tfrac12 S_n &= 1-\tfrac{1}{2^n} \\ S_n &= 2-\tfrac{1}{2^{n-1}} \end{aligned}

After 10 mathematicians the tab is 2−1/512=1.9982-1/512 = 1.998 beers. The shortfall halves with each new customer, so the total creeps up on 2 and never passes it. If a beer is a UK pint of 568.26 ml, the missing amount after 30 mathematicians is about 1 nanolitre. After 85 it is smaller than the volume of a single water molecule, about 3×10−233 \times 10^{-23} ml. Two beers it is.

Now the second night. The harmonic series grows roughly like the natural logarithm, Hn≈ln⁡n+0.5772H_n \approx \ln n + 0.5772, which is why it climbs so slowly. Adding the terms one by one in code, the tab passes 5 beers at mathematician 83 and 10 beers only at mathematician 12,367. Reaching 20 beers takes about 272 million customers, and 100 beers would need roughly 1.5×10431.5 \times 10^{43} of them. Slow, but it never stops.

Line chart titled Halving stops at 2 beers, one-over-n never stops. The bar tab against the number of mathematicians from 1 to 100,000 on a log scale. The halving orders reach 1.998 beers after 10 people and flatten at 2. The 1, 1/2, 1/3 orders pass 5 beers at 83 people and 10 beers at 12,367 people, and reach 12.09 beers at 100,000, still rising.
Fig 4. Both tabs start the same way, then split for good. Computed term by term from the two series.

The common misconception is that the terms getting smaller is enough for a sum to settle down. The harmonic terms shrink towards zero too, just not fast enough.

How to tell math jokes (and which ones work for kids)

For younger kids, stick to jokes that need only counting or shapes: 7 8 9, three squared meals, the obtuse angle at the beach and the square with all the right angles. Then ask them why it is funny: a child who can explain "two gross" has learned what a gross is.

For a secondary school class, the 3, 4, 5 joke makes a good warm-up for Pythagoras, and the diet joke is the clearest way we know to explain why induction needs a base case. Undergraduates and maths clubs get the most out of the infinite bar, the harmonic sequel, the horse "proof" and the topology jokes. Tell the two bar jokes as a pair.

Say the setup slowly and the punchline fast; the laugh comes when the audience realises the maths checks out. Never pre-explain. If someone asks why it is funny, that is your cue for the real maths.

Share image with three math jokes. 1: Why was 6 afraid of 7? Because 7 8 9. 2: Why did the obtuse angle go to the beach? It was over 90 degrees. 3: My imaginary friend thinks he is better than everyone. He is just like the rest of us, turned 90 degrees.
Tap the image to view it full size. View the accessible, editable SVG.

Frequently asked questions about math jokes

What is the most famous math joke?

Probably "Why was 6 afraid of 7? Because 7 8 9". Among mathematicians it is the infinite bar, where the bartender pours exactly 2 beers.

Why does the infinitely many mathematicians joke end with 2 beers?

The orders form a geometric series with ratio one half, and its sum is 1/(1−12)=21/(1-\tfrac12) = 2. After 10 people the tab is 1.998 beers.

Why can a topologist not tell a doughnut from a coffee mug?

Topology ignores stretching. A doughnut and a mug each have one hole, so one can be reshaped into the other.

What are some good math jokes for kids?

Ones that need only arithmetic or shapes: 6 afraid of 7, the obtuse angle at the beach, and 288 being two gross.

More science jokes, explained: Physics jokes · Quantum physics jokes · Calculus jokes · Pi jokes · Statistics jokes · Space jokes and astronomy puns · Relativity and Einstein jokes · Electrical engineering jokes · Nerdy science pick-up lines

Sources

  1. MacTutor (University of St Andrews): Earliest uses of symbols for variables (Descartes and x)
  2. A. Wiles, Modular elliptic curves and Fermat's Last Theorem, Annals of Mathematics 141 (1995), 443 to 551
  3. The Drum: Twitter officially doubles the character limit to 280 (7 November 2017)
  4. Harmonic series: Oresme's proof of divergence (about 1350)
  5. OEIS A004080: least k with harmonic number H(k) at least n (12,367 for 10 beers)
  6. All horses are the same color: Pólya (1954) and Cohen (1961)
  7. Quote Investigator: A mathematician is a machine which turns coffee into theorems (Rényi, Turán)
  8. Brilliant: Möbius strips and what happens when you cut one
  9. Pint: the imperial pint is 568.26125 ml
Related observations
Think Calculus Jokes: 21 Derivative and Integral Jokes Explained Electronics Electrical Engineering Jokes, With the Real Circuits Physics Science Pick Up Lines: 25 Sweet, Nerdy and Fact-Checked
Transmit