Is your birthday in pi?
Pi starts 3.14159 and goes on forever without repeating. Somewhere in those digits is 14 03 79, and 25 12 00, and very nearly every other date written as six digits. How far you have to look, and why, is a small lesson in probability, and in one of the great open questions about pi.
A date as six digits
Write a date day, month, year, each with two digits, and it becomes a six-digit number: 14 March 1979 is 140379. The hundred years from 1926 to 2025 use every two-digit year once, so their 36,525 dates are 36,525 different numbers. The app looks for each of them in the first 10 million digits of pi, counting from the first digit after the decimal point: in 3.14159 the 1 is digit 1.
How long until a six-digit number turns up?
There are a million six-digit numbers, from 000000 to 999999. In random digits each position starts any given one of them with a chance of one in a million, so you wait on average about a million digits for it. The wait is spread out: half of all six-digit numbers have shown up within about 700,000 digits, and for 140379 it is 227,481. A few turn up in the first hundred digits, and a few take many millions.
Five levels deep
The app searches in levels, each ten times deeper than the one before: the first 1,000 digits, then 10,000, 100,000, a million and ten million. Of the 36,525 dates, 32 are found at level 1, 322 at level 2, 3,165 at level 3, 19,467 at level 4 and 13,538 at level 5. That matches what random digits predict: the share found within n digits is about 1 − e^(−n / 1,000,000), roughly 0.1% at a thousand digits, 63% at a million and 99.995% at ten million.
First, last and missing
The first date to appear is 23 July 1981: its digits 230781 start at digit 63, in 3.14159265358979323846264338327950288419716939937510582097494459 230781 640628. The deepest is 26 November 2002, at digit 9,873,255. And one date is missing: 12 January 1954, 120154, is not in the first 10 million digits. With 36,525 dates and a chance of about e⁻¹⁰, 1 in 22,000, that a date is missing, one or two missing dates is just what to expect.
Eight digits are much rarer
With the year written in full, 14 March 1979 is 14031979, eight digits, one of a hundred million. Ten million digits give each such number only about a 10% chance to appear, and 3,495 of the 36,525 dates do. To find every one of the 36,525 eight-digit dates you would expect to need about a billion digits.
Is pi a normal number?
All of this assumes that pi's digits behave like random ones: that every digit appears a tenth of the time, every pair of digits a hundredth, every six-digit block a millionth, and so on. A number with that property is called normal. Trillions of digits of pi have been checked and look exactly like that, but nobody has proved that pi is normal, or even that every digit keeps appearing forever. If pi is normal, every finite string of digits, your phone number and your birthday with the year in full among them, appears somewhere, infinitely often.
The Feynman point
Random digits are lumpier than people expect. At digit 762 pi has six nines in a row, 999999, called the Feynman point after the physicist Richard Feynman, who joked that he would like to recite pi up to there and finish with 'nine nine nine nine nine nine and so on'. Six equal digits in a row have a chance of about 1 in 100,000 to start at any place, so seeing them that early is lucky, but not suspicious.
How the digits were found
The first 10 million digits of pi take a laptop only seconds with a fast formula such as the Chudnovsky series or the arithmetic of the MPFR library; the record calculations now run to over a hundred trillion digits. For the app, every six-digit date was looked up once in the 10 million digits, and the place where it first starts, how often it occurs and the digits around it were stored in a small table that your browser downloads, so the search itself is instant.
Try it
Open Your Birthday in Pi, pick a date and see its six digits in the strip of pi, with the digits on either side. Press Search to watch the hunt go through the five levels, compare your date with all the others in the chart, and step a day back or on to see how much the depth jumps from one day to the next. The pencil opens the picture in the photo editor with the strip, the chart and the title on layers of their own.
Frequently asked questions
Is every birthday in pi?
Written as six digits, every date from 1926 to 2025 but one appears in the first 10 million digits; the missing one, 12 January 1954, will turn up further on. If pi is a normal number, as everyone expects but no one has proved, every date in every format appears somewhere, infinitely often.
Which date appears first in pi?
Of the dates from 1926 to 2025 written day month year, 23 July 1981: 230781 starts at digit 63. Written month day year the dates are different numbers and the order changes.
How many digits of pi do I need to find my birthday?
About a million on average for six digits, and almost certainly fewer than ten million. For the full eight-digit date you need about a hundred million on average.
Does pi contain every number?
Nobody knows. It would follow from pi being normal, which is believed but unproven. What is known is that the trillions of digits computed so far pass every test of randomness.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Find your birthday in pi