Credit Card Data Formats and the Luhn Algorithm | Ground Labs (2024)

When dealing with cardholder data discovery projects, we often get a lot of questions about credit card data formats — things like the PAN number, BIN ranges and Luhn checks. We thought some clarification was needed so we will describe below what a PAN number is made of, what BIN ranges refer to, and how you can use the Luhn algorithm (also known as Mod 10, and named after IBM scientist Hans Peter Luhn) to validate a credit card using pen and paper.

3 Credit Card Data Format Components to Know

A credit card number, for example 1234567812345678, consists of three parts:

  1. The bank identification number (BIN): The first six digits are the bank identification number (BIN) or issuer identification number (IIN). This string of numbers identifies the issuer of the card.
  2. The account number: The number between the bank identification number and the check digit is six to nine digits long and is used to identify the individual account number.
  3. The check digit: The last digit is the check digit and is added to validate the authenticity of the credit card number (based on the Luhn algorithm).

Bank Identification Number (BIN) and Issuer Information Number (IIN) Ranges

The first digit of the card represents the category of industry (IIN) that issued your credit card. For example if you use VISA or MasterCard, your card’s first digit should be either 4 or 5 as they are from the banking and financial industry. American Express is in the travel category and cards issued by them have 3 as the first digit. This is why some websites can automatically identify a valid card number after just one keystroke.

Below are some BIN numbers associated with related brands. As you can see the length of a credit card will vary depending on the brand, and they are not all 16 digits.

Credit card brand

Bank identification number prefix

Credit card number length

American Express

34|37

15

Diners Club Carte Blanche

300-305

14

Diners Club International

36

14

Diners Club US and Canada

54|55

16

Discover Card

6011|622126-622925|644-649|65

16

InstaPayment

637-639

16

JCB

3528-3589

16

Laser

6304|6706|6771|6709

16-19

Maestro

5018|5020|5038|6304|6759|6761|6762|6763

12-19

Mastercard

51-55

16

Visa

4

13-16

Visa Electron

4026|417500|4508|4844|4913|4917

16

Using Luhn algorithms and MOD 10 checksums

The final digits of your credit card number is a check digit, akin to a checksum. The Luhn algorithm is used to arrive at the proper check digit.

The Luhn algorithm, also known as a Mod 10 calculation, can be used to validate primary account numbers.

How does it work using pen and paper?

Calculating the Luhn algorithm by hand includes a few different steps. They include the following.

1. Write down the credit card number:

4417 1234 5678 9113

2. Starting from the first number, double every other digit.

4(x2) 4 1(x2) 7 1(x2) 2 3(x2) 4 5(x2) 6 7(x2) 8 9(x2) 1 1(x2) 3

The doubled numbers result in: 8 2 2 6 10 14 18 2

3. If the result of the doubling ends up with a two digits, then add those two digits together:

10 = 1+0 14= 1+4 18= 1+8

4. Add up all numbers: 8+4+2+7 + 2+2+6+4 + 1+0+6+1+4+8 + 1+8+1+2+3 = 70

If the final sum is divisible by 10, then the credit card is valid. If it is not divisible by 10, the number is invalid or fake. In the above example, credit card number 4417 1234 5678 9113 has passed the Luhn test.

Final Thoughts

The Luhn algorithm will detect almost any single-digit error, such as someone mistyping numbers when they put in their credit card. The Luhn algorithm does not protect against malicious attacks, nor is it intended to. It is primarily a safeguard against simple user errors. Most credit cards and many government identification numbers use this check as a simple method to distinguish valid numbers from random digits.

That said, your business shouldn’t have to work out the Luhn algorithm by hand. A cardholder data discovery program, like Card Recon, can scan thousands of credit cards and instantly determine which entries are valid and which ones might be an attempt at unauthorized use.

Ready to learn more about how to protect credit card errors? Check out our data discovery solution, Card Recon.

Credit Card Data Formats and the Luhn Algorithm | Ground Labs (3)

Share this article!

Want to keep up with all our blog posts? Subscribe to our newsletter!

Subscribe

Credit Card Data Formats and the Luhn Algorithm | Ground Labs (2024)
Top Articles
What’s the Difference Between MIL-STD-130 and MIL-STD-129?
Soft Skills | SkillsYouNeed
UPS Paketshop: Filialen & Standorte
Skycurve Replacement Mat
Frederick County Craigslist
Tabc On The Fly Final Exam Answers
Craigslist Mpls Mn Apartments
Usborne Links
Prosper TX Visitors Guide - Dallas Fort Worth Guide
Find All Subdomains
Blairsville Online Yard Sale
Soap2Day Autoplay
Optum Medicare Support
Buckaroo Blog
What is a basic financial statement?
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Erskine Plus Portal
National Office Liquidators Llc
Urban Dictionary: hungolomghononoloughongous
Lazarillo De Tormes Summary and Study Guide | SuperSummary
Energy Healing Conference Utah
Sizewise Stat Login
Panic! At The Disco - Spotify Top Songs
Euro Style Scrub Caps
College Basketball Picks: NCAAB Picks Against The Spread | Pickswise
Hellraiser 3 Parents Guide
Kabob-House-Spokane Photos
Panolian Batesville Ms Obituaries 2022
1979 Ford F350 For Sale Craigslist
Ncal Kaiser Online Pay
UAE 2023 F&B Data Insights: Restaurant Population and Traffic Data
Askhistorians Book List
Darktide Terrifying Barrage
Petsmart Distribution Center Jobs
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Babbychula
Steven Batash Md Pc Photos
Manatee County Recorder Of Deeds
Midsouthshooters Supply
„Wir sind gut positioniert“
15 Best Things to Do in Roseville (CA) - The Crazy Tourist
Babykeilani
Catchvideo Chrome Extension
Chr Pop Pulse
Mcoc Black Panther
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
Rheumatoid Arthritis Statpearls
1990 cold case: Who killed Cheryl Henry and Andy Atkinson on Lovers Lane in west Houston?
Elvis Costello announces King Of America & Other Realms
Lake County Fl Trash Pickup Schedule
Latest Posts
Article information

Author: Carmelo Roob

Last Updated:

Views: 5908

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.