Your cart is empty
Shop now
+

Luhn Algorithm Test: Mod 10 Check Digit Guide

Explore

Luhn Algorithm Test: Mod 10 Check Digit Guide

We guarantee gift cards direct to your inbox immediately.
Shop Now!

Let's Work Together

Sign up now with Call of Gift Cards and become eligible for benefits including 10% commission on cards bought from us, awesome conversion rates and much more!
Find Out More

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. ...read more
+

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. We invite you to start your own online business as a partner of ours. By signing up as a partner you’ll get access to one of the largest gift card databases in the world. All you need to focus on is to market your website and products. Gift cards are quickly outperforming traditional gifts, as they give the recipient the choice to pick their own present from a variety of options. The range of e-gift cards available on the Call of Gift Cards's partner sites includes popular categories such as restaurants, games, travel and fashion.

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift v...read more
+

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift vouchers. All gift cards sold via our partners’ websites are closed loop. This means that the gift card can only be spent at a single brand location, for example, an Xbox voucher can only be spent at Xbox etc.

Our Gift Cards

Minecraft Coins – Starfield – Alan Wake 2 – Spotify Gift Card – Madden NFL 24 – Mortal Kombat™ 1 – Garena Shells – FIFA 23 – Assassin’s Creed Mirage – Valorant Points – Grand Theft Auto V – Razer Gold Pin – Cabal Online eCoin – Battlenet Gift Card – Elden Ring – Minecraft Java + Bedrock – Call of Duty: Modern Warfare III - Cross-Gen Bundle – EA SPORTS FCTM 24 Standard Edition Xbox One & Xbox Series X|S – Steam Wallet Gift Card – Battlefield™ V Standard Edition – iTunes Gift Card – PlayStation Network PSN Gift Card – Netflix Gift Card – Google Play Gift Card – Amazon Gift Card – Xbox Live Gift Card – Facebook Game Gift Card – FIFA 20 (Xbox One) – Far Cry 5 - Gold Edition (Xbox One) – NieR:Automata Become As Gods Edition (Xbox One) – SONIC FORCES™ Digital Standard Edition (Xbox Game EU) – Apex Legends™ - Octane Edition (Xbox Game EU) – Mario Kart 8 Deluxe (Nintendo) – Fortnite V-Bucks Gift Card – Nintendo eShop Gift Card – Red Dead Redemption 2 (Xbox One) – Halo 5: Guardians (Xbox One) – The Legend of Zelda: Link's Awakening (Nintendo) – DOOM Eternal Standard Edition (Xbox One) – The Legend of Zelda: Breath of the Wild (Nintendo) – Resident Evil 3 (Xbox One) – Need For Speed Heat (Xbox One) – Assassin's Creed Odyssey - Gold Edition (Xbox One) – Cars 3: Driven to Win (Xbox One) – Call of Duty: Modern Warfare 2 Campaign Remastered (Xbox One) – Team Sonic Racing™ (Xbox Game EU) – Project CARS - Game of the Year Edition (Xbox One) – Mario & Sonic Tokyo 2020 (Nintendo) – Tom Clancy’s Ghost Recon Wildlands - Deluxe Edition (Xbox One) – Forza Horizon 4 Ultimate Edition (Xbox One) – Sekiro™: Shadows Die Twice (Xbox One EU) – Tom Clancy's The Division 2 (Xbox One EU) – Gears 5 (Xbox One) – Dragon Ball Z: Kakarot (Xbox One) – The Crew Ultimate Edition (Xbox One) – Ultimate Marvel vs. Capcom 3 (Xbox One) – Pokemon Let's Go Eevee! (Nintendo) – Sonic Mania (Xbox Game EU) – UFC 3 - Deluxe Edition (Xbox One) – Mass Effect Andromeda - Standard Recruit Edition (Xbox One) – BioShock: The Collection (Xbox One) – A Way Out (Xbox One) – Borderlands 3 (Xbox One) – Overcooked! 2 (Nintendo) – World of Warcraft – PUBG Gift Card – Spyro Reignited Trilogy (Xbox One) – Aeria Points Gift Card – Destiny 2: Shadowkeep (Xbox One) – Steep (Xbox One) – Infinite Minigolf (Xbox One) – Rage 2 (Xbox One) – Fire Emblem Warriors (Nintendo) – Anthem (Xbox One) – Kingdom Hearts 3 (Xbox One) – FIFA 19 (Xbox One) – Goat Simulator (Xbox One) – The Elder Scrolls Online (Xbox One) – FOR HONOR™ Standard Edition (Xbox One) – IMVU Prepaid Gift Card

Luhn Algorithm Test: Mod 10 Check Digit Guide

A Luhn algorithm test is a checksum check that confirms whether a string of digits is internally consistent with its final check digit. The test doubles every second digit from the right, reduces any result above 9, adds everything together, and expects the total to divide by 10 with no remainder. Passing the test means the number is well formed, not that it belongs to a real card, account, or device.

How the Luhn algorithm test works

The formula is also called mod 10. Hans Peter Luhn, an IBM researcher, developed it in the 1950s and patented it in 1960. The procedure runs the same way on any length of number:

  1. Start at the rightmost digit, which is the check digit, and leave it as it is.
  2. Move left one digit at a time. Double the value of every second digit.
  3. If a doubled value is greater than 9, subtract 9 from it (the same result as adding its two digits).
  4. Add all the digits from steps 1 to 3 together.
  5. Divide the total by 10. A remainder of 0 means the number passes.

A worked example

Take the sequence 4539 1488 0343 6467. The last digit, 7, is the check digit. Doubling every second digit from the right gives 6 to 12, 6 to 12, 4 to 8, 0 to 0, 8 to 16, 1 to 2, 3 to 6, and 4 to 8. After reducing the values above 9, the doubled column sums to 37.

The digits that were not doubled are 4, 3, 3, 8, 4, 9, and 5, which add to 36. Adding the untouched check digit of 7 gives 37 + 36 + 7 = 80. Since 80 divides by 10, this sequence passes the Luhn test.

What the test proves and what it does not

The check digit exists to catch data entry mistakes before a number travels further into a system. Its coverage is specific:

  • It catches any single mistyped digit.
  • It catches most swaps of two adjacent digits, with 0 and 9 as a known blind spot.
  • It does not confirm that an account exists, is open, or has funds.
  • It does not verify a card's expiration date, security code, or billing address.
  • It says nothing about authorization, which only the issuing institution can grant.

Because the arithmetic is public, producing digits that satisfy the test takes seconds. That is exactly why a passing result is treated as a formatting check and never as proof of validity.

Where the Luhn check digit appears

Payment card numbering standards place the Luhn check digit at the end of a primary account number, so card numbers, and many other identifiers, carry one:

  • Credit, debit, and prepaid card numbers
  • IMEI numbers on mobile devices
  • National Provider Identifiers used by US healthcare providers
  • Canadian Social Insurance Numbers
  • SIM card serial numbers and various national ID numbers

Common mistakes when running a Luhn check

  • Doubling from the left instead of the right, which shifts the whole pattern.
  • Leaving spaces, hyphens, or letters in the input before counting digits.
  • Forgetting to reduce doubled values above 9, which inflates the total.
  • Reading a pass as a confirmation that the number is live or assigned.

Strip the input to digits, count from the right, reduce properly, and compare the remainder to zero. That is the entire test.

What's New

Why I Can't Write a CVV Buying Guide

I can't write a buying guide for CVVs or stolen card data. I can help with card-fraud prevention, PCI DSS, and payment-security content instead.

Read our complete guide: What to Know Before You Buy CVV: Prices, Scams, and Legal Risks