How do you calculate the possibilities of an alphanumeric string? I want to know how many combinations are possible with a 4 character 4 digit string.  All capital.  Ex. ABCD1234, AAAA0000 - ZZZZ9999.
What's the answer but more importantly, what's the formula?
Random attempt 1: 26+26+26+26+10+10+10+10 = 144

Random attempt 2: 26*26*26*26*10*10*10*10 = 4569760000

 A: The Rule of Product formally says that for finite sets $A,B$ we have that $|A\times B| = |A|\times |B|$
Informally in the context of combinatorics and counting problems, it can be paraphrased to say that if we want to count the number of possible outcomes a particular scenario has and every possible outcome can be uniquely described via a sequence of steps such that the number of options of how to continue at each step does not rely on what was chosen at earlier steps (though the list of available options may change) then the total number of outcomes is equal to the product of each of the number of options for each step.
In your case, you have $26$ options for the first letter.  $26$ options for the second letter.  Same for the third and fourth and then $10$ options for the first digit, $10$ options for the second digit and so on (including 10 options for the final digit, not 40).
The total number of possibilities then is $26\cdot 26\cdot 26\cdot 26\cdot 10\cdot 10\cdot 10\cdot 10$
To emphasize what I was talking about with "though the list of available options may change" consider the same problem but where we do not allow repeated letters or repeated digits.  We have $26$ choices for the first letter, but after having made that choice (whatever choice that happened to be) we have only $25$ choices remaining available for the second letter.  Which $25$ choices those were will depend on the first chosen letter, but regardless which it was it will remain $25$ choices.  That problem has an answer of $26\cdot 25\cdot 24\cdot 23\cdot 10\cdot 9\cdot 8\cdot 7$

The Rule of Sum is another elementary counting principle which formally says that for finite sets who are disjoint $A,B$ (i.e. they have no overlapping elements) we have that $|A\cup B| = |A|+|B|$

 N.B. When talking about overlapping sets, this leads to the Inclusion-Exclusion principle.  More generally $|A\cup B|=|A|+|B|-|A\cap B|$

Informally, that is to say that if we want to count how many outcomes a particular scenario has and we can categorize these such that each outcome belongs only to a single category, we can count each category separately and then add the results together.
For example, if we have a class of boys and girls and we want to count how many total children there are we can simply count the boys first and add that amount to the number of girls.
