How to verify a credit card number in your head (why? because it is interesting you boring farts!)

Soldato
Joined
28 Nov 2008
Posts
8,725
Location
UK
Edit: Sorry for the typo, corrected.

Edit 2: I didn't realise that so many people were not generally curious about everyday things, like myself. If you are not, don't waste your time reading :)



Ok, perhaps not in your head, but here is how to do it:

Take the long strip, and double every other number starting from the right (i.e. skip the first).

So, if your credit card number is:

4417 1234 5678 9113

4 * 2 = 8
1 * 2 = 2

1 * 2 = 2
3 * 2 = 6

5 * 2 = 10
7 * 2 = 14

9 * 2 = 18
1 * 2 = 2


Then take each digit and starting again from the right on that strip, add them to the ones we did not double (double digits become the sum of their parts - like 12 = 1+2). In other words, slot them back in like so:

8+4+2+7
+
2+2+6+4
+
1+0+6+1+4+8
+
1+8+1+2+3
=
70

All of these numbers add up to a number divisible by 10, and all valid credit card numbers do.

Try it and see!
 
Last edited:
Why would any normal person need to know, odd thread is odd. On top of that how many people could do that in their head, that's a lot of numbers to remember.
 
Then take each digit and starting again from the right add them to the ones we did not double (double digits become the sum of their parts - like 12 = 1+2). In other words, slot them back in like so::

(8+4+2+7)
+
(2+2+6+4)
+
(1+0+6+1+6+8)
+
(1+8+1+2+3)

All of these numbers add up to a number divisible by 10, and call valid credit card numbers do.

Try it and see!

You worked from the left, Confused :s
 
Suppose it could be useful for card verification for a software/website. I can't see doing this using my head though.
 
You start from the right on the original digit strip.

Yeah I realised that, but the numbers I quoted can be read from left to right from the original credit card number.


The question is, now we have a formulae for a valid credit card number, can someone give us the formulae for the correct security codes to go with them?
 
Back
Top Bottom