# How many possible combinations of 5 letters?

Asked by

segdeha (

1707)
March 8th, 2008

I built a quick-and-dirty URL shortening app. It assigns a 5 letter code to your URL so you end up with URLs like: http://segdeha.com/u/urtfi

Given 5 letters (using a 26 letter alphabet), how many possible combinations does that make? How many would it be if I added 1 more letter (so, 6×26)?

Observing members:
0
Composing members:
0
## 8 Answers

there are 11,881,376 five-letter combinations using a 26 letter alphabet (26*26*26*26*26)

add one more letter? 308,915,776 combinations.

this is assuming you can repeat letters, so “aaaaa” is acceptable, and also assuming no difference between uppercase and lowercase letter, so that “abCde” is the same as “abcde”.

OK, so it is 5^26 with those assumptions. I’m using the FIPS 181 algorithm, which finds “pronounceable” combinations of letters, so there will be considerably less than the theoretical limit available. Knowing the orders of magnitude involved helps, though. Thanks!

5^26? do you perhaps mean 26^5? as in “twenty six to the fifth power”...

Er, right. That’s makes a bit of a difference… :-)

Using numbers as well will give you many more, of course: 26 letters + 10 numbers gives you over 60 million possibilities. That’s how tinyurl works, of course.

Good point, StanleyKnife. I went with FIPS 181 on the theory that pronounceable codes are relatively easy to remember (not that that’s a common use-case, but this is, after all, primarily just something for me to use).

## Answer this question

This question is in the General Section. Responses must be helpful and on-topic.