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 background threads, 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. Every prime you scroll or jump to is calculated in your browser, on your device; no server does any of that work. The one exception is the first 500 primes, which are worked out once when the site is built and written into the page, so the list appears instantly.

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. The site saves your favorite primes and scroll records in your browser so they’re there next time, along with a note that you’ve seen the notice about this. They stay on this device and are never sent anywhere; clearing your browser’s site data removes them. 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.

Is there a largest number I can jump to?

No, not in the site’s code: the jump box takes any number your browser can hold, which in Chrome is over 300 million digits. How far the list can actually go depends on what can be proven. To sieve near a number x completely, the site needs every prime up to √x; near 2⁶⁴ (about 18 quintillion) that’s 203,280,221 of them. Past a point it measures on your device, it sieves with far fewer and proves each remaining number with a Miller–Rabin test, which is a proof only below about 3.3 × 10²⁴. Past that, each prime gets an elliptic curve certificate, checked separately before it’s shown, so the limit is your device’s time and memory. Nothing is skipped or guessed. More on the proofs.

Will it break my computer?

No. It works your processor hard while it’s calculating, on every core but one, in background threads, 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.