Click here to Skip to main content
12,450,335 members (44,393 online)
Click here to Skip to main content
Add your own
alternative version


6 bookmarked

Calculating CheckSum using LUHN Algorithm

, 26 Feb 2008 CPOL
Rate this:
Please Sign up or sign in to vote.
Calculating CheckSum using LUHN Algorithm


What the article/code snippet does, why it's useful, the problem it solves etc.


(Optional) Is there any background to this article that may be useful such as an introduction to the basic ideas presented?

Using the code

A brief description of how to use the article or code. The class names, the methods and properties, any tricks or tips.

Blocks of code should be set as style "Formatted" like this:

// Any source code blocks look like this

Remember to set the Language of your code snippet using the Language dropdown.

Use the "var" button to to wrap Variable or class names in <code> tags like this.

Points of Interest

Did you learn anything interesting/fun/annoying while writing the code? Did you do anything particularly clever or wild or zany?


Keep a running update of any changes or improvements you've made here.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

You may also be interested in...


Comments and Discussions

QuestionIncorrect check digit Pin
JPhelps12-Nov-08 1:20
memberJPhelps12-Nov-08 1:20 
hi there,

I had a look at this and whilst it does appear as a nice test program the check digit is typically one value to high.

Can you check this please? Im open to correction if i am wrong but it does appear that the values generated are incorrect.

E.g. try this:
892700000079916805 - check digit should be 5 so we have 892700000079916805(5)
but instead this is generated in your app as: 892700000079916805(3)

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 26 Feb 2008
Article Copyright 2008 by iymo2000
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid