About Every Prime Number
It started as a deliberately absurd idea: a website that lists every prime number. An infinite scroll, with your own computer working out each prime on the spot, a big primes-per-second counter, and a little cartoon CPU that gets visibly hotter the further you go.
Doing that properly turned into a real engineering project: a prime finder running in a background thread, a list that scrolls forever without memory growing, position estimates good to a ten-thousandth of a percent, and a fight with the browser’s own timers just to measure the speed honestly. How it works explains all of it.
Built by Ramen96. The source code is on GitHub.
Frequently asked questions
Does it really calculate every prime number?
It calculates every prime, in order, for as long as you keep scrolling, and nothing is skipped or looked up from a list. But there are infinitely many primes (Euclid proved it, see how it works), so “every” is the joke: you’ll never reach the end.
Is it using my computer?
Yes. All the computing happens in your browser, on your device. Nothing is calculated on a server: the server only sends the page itself, with the first 500 primes already written into it.
Is any of my data sent anywhere?
No. There are no analytics, trackers or accounts, and nothing you do on the page is sent anywhere. Like any website, the host sees the ordinary request for the page when you load it.
Why does the counter slow down as I scroll?
Because primes get rarer as numbers get bigger. Near a million, about one number in 14 is prime; near a trillion, about one in 28. Each number also takes more work to rule out. So the further you go, the longer each batch of 500 primes takes, and the primes-per-second counter falls. The slowdown is real math, not a special effect.
What does the “≈” next to a number mean?
After you jump, the site doesn’t know exactly how many primes it skipped, so the position labels (#n) are estimates, made with the logarithmic integral. They’re very close: about 0.0001% off at a trillion. Scroll back down to 2 and they become exact. More on how it estimates.
Why can’t I jump past a certain number?
JavaScript numbers are only exact up to 2⁵³ − 1 (9,007,199,254,740,991). Past that they start rounding, which would mean showing wrong primes. The site would rather show nothing than show something wrong.
Will it break my computer?
No. It works your processor hard while it’s calculating, but it does so in a background worker, so the page stays responsive and you can stop at any time. It only computes when you scroll toward primes it doesn’t have yet; when you stop, it rests.