# Why Your Password Needs 8 Characters and Your ATM PIN Only Needs 4

Why do websites want 8 character passwords when my ATM card is fine with a 4-digit PIN? A small thought experiment: what if you just tried every single combination? You can try it in your browser too.

Published: 18th June 2023

Something has been bugging me for a while.

Every website wants my password to be at least 8 characters. But my ATM card? Just 4 digits. And that card has my actual money on it. My Instagram password protects... my Instagram.

That feels backwards. So I tried to figure it out.


So here's a thought experiment: what if you just guessed a password by trying **every possible combination**, one after another? How long would that take?

## Try it

Pick a password below and hit start. The page will try `0000`, `0001`, `0002`, and keep counting until it finds yours.


Try these one by one:

1. A **4-digit PIN**. Done before you can blink.
2. An **8-digit PIN**. Now you can actually see it counting.
3. **6 small letters**. This one makes you wait.

The third one is where it got interesting for me.

## Counting the combinations

Let's count how many passwords are even possible.

A 4-digit PIN has 10 options (0 to 9) for each spot. So it's:

```txt
10 × 10 × 10 × 10 = 10,000
```

Only 10,000 PINs exist. That's nothing for a computer.

Now take a password with small letters only. There are 26 letters, so each spot has 26 options. For 8 letters:

```txt
26 × 26 × 26 × 26 × 26 × 26 × 26 × 26 = 208,827,064,576
```

That's **208 billion**. Here's how it grows:

| Password | Options per spot | Length | Total combinations |
| --- | --- | --- | --- |
| ATM PIN | 10 | 4 | 10,000 |
| Phone PIN | 10 | 6 | 1,000,000 |
| small letters | 26 | 6 | 308,915,776 |
| small letters | 26 | 8 | 208,827,064,576 |
| small + capital + numbers | 62 | 8 | 218,340,105,584,896 |
| everything on the keyboard | 94 | 8 | 6,095,689,385,410,816 |

The last one is about **6,000 trillion**. I had to count the commas twice.

What surprised me most: adding one more character doesn't add a little. It **multiplies** everything. Two extra small letters means 26 × 26 = **676 times** more passwords.

Switch the options below and look at how fast the bars grow.


## The thought experiment

Imagine the dumbest possible way to guess a password. Start at `aaaa`, then `aaab`, then `aaac`, all the way to `zzzz`. Just like the numbers on a bike's odometer rolling over.


No tricks. Just try everything until one works. Say a normal laptop can do around 10 million guesses a second.

Then I did the maths:

- 5 small letters: about 12 million → a couple of seconds.
- 8 small letters: about 208 billion → about **6 hours**.
- 8 characters from the whole keyboard: about **20 years**.

So my first guess at the answer was: *"Longer passwords have billions and trillions of combinations, and a normal computer can't try them all. That's why."*

But I kept thinking about it, and that's only half the answer.

## It's also about how fast you can guess

A billion guesses isn't actually that much for a computer. A laptop can get through it in a couple of minutes.

So the number of combinations alone isn't enough. What really matters is:

```txt
time to guess = total combinations ÷ guesses per second
```

And how fast someone can guess depends on **where** they are guessing. Play with this:


### Guessing on a website

If someone tries to guess my password on a login page, every guess has to go to the website. The website can slow them down, or lock the account after a few wrong tries. Ten guesses a second is already a lot.

**This is why an ATM PIN can be just 4 digits.** You get 3 tries, then the card is blocked. The chance of guessing a 4-digit PIN in 3 tries is 3 out of 10,000. The bank doesn't need a long PIN. It just stops you from guessing fast.

My phone does the same thing. Type the wrong PIN a few times and it makes me wait 30 seconds, then longer, then longer.

### Guessing on your own computer

But what if a website gets hacked and its password data leaks? Now the attacker doesn't need the login page. They can guess on their own computer, as fast as their computer can go. No waiting. No lockout.


And some computers are *really* fast. A powerful gaming PC can try billions of guesses every second. At that speed, 8 small letters is gone in under a minute.

So I think the long-password rule isn't really about the login page. **It's for the day the website gets hacked.** On that day, the only thing protecting you is how many combinations your password has.

This is the part I didn't expect. Your password being safe depends on two things: how many combinations it has (that's your job), and how hard the website makes each guess (that's their job). The length rule is the website saying, "even if we mess up, your password should still hold for a while."

## But wait, people don't pick random passwords

All this maths assumes the password is **random**. Mine isn't. Most people's aren't.

Nobody guessing passwords starts from `aaaaaaaa`. They start with the common stuff:

- `123456`, `password`, `qwerty`
- names and normal words
- the usual pattern: capital letter first, `@` in the middle, numbers at the end

`Rahul@123` has capitals, small letters, numbers, and a symbol. On paper it looks strong. But it's the exact shape everyone uses, so it would be one of the first things tried.

So the way I see it now:

> **A longer password gives you more room. A random one actually uses that room.**

Four random words like `correct horse battery staple` turn out to be about as hard to guess as 8 random keyboard characters, and way easier to remember.

## What I figured out

1. **Combinations multiply.** Every extra character multiplies the total, which is why 8 characters jumps into billions and trillions.
2. **It's not "can a computer do it", it's "how long will it take".** Total combinations divided by guesses per second.
3. **PINs are short because guessing is slowed down.** 3 tries at the ATM. Waiting time on my phone.
4. **Passwords are long because websites get hacked.** Then there's no limit on how fast someone can guess.
5. **Random beats clever.** A password manager can make long random passwords for you, so you don't have to remember them.

It started with a simple question about my ATM card. Now I look at those "minimum 8 characters" messages a little differently.

Bye for now.

Original page: https://faisalhusa.in/blog/why-passwords-need-8-characters
