# Credit Card Validation Explained | Luhn’s Algorithm (Step-by-step) | Ep-1

## Метаданные

- **Канал:** take U forward
- **YouTube:** https://www.youtube.com/watch?v=K2AdETtq004
- **Дата:** 17.04.2026
- **Длительность:** 1:29
- **Просмотры:** 250,390
- **Источник:** https://ekstraktznaniy.ru/video/51649

## Описание

Welcome to a new series - Learn Interesting Things with Striver.

This is Episode 1, where we explore how credit card validation actually works using Luhn’s Algorithm.
------
Ever wondered how a credit card number is checked for validity?
That’s where Luhn’s Algorithm comes in.

In this video, we break it down step by step - in a way that’s easy to understand and remember.

You’ll learn:
How credit card numbers are validated
The logic behind Luhn’s Algorithm
A simple step-by-step approach you can apply yourself

This is a useful concept for developers, students, and anyone curious about how things work behind the scenes.

#striver #takeuforward #luhnsalgorithm #creditcard #coding #algorithm #techtips #learnwithstriver

## Транскрипт

### Segment 1 (00:00 - 01:00) []

So, give me your credit card and I'll tell you if it is a valid one or not. I'll do that without calling any of the backend servers. You can do it as well and I'll tell you the algorithm behind it. The algorithm behind it is Luhn's algorithm. Let's understand it. Typically, a credit card has 16 digits. Amex has 15. I'll take the example of 16 digits. We have it over here. You start from the second last digit. We have it as four. Multiply that. Basically, double it up. You'll get eight. Double the next alternate one. Eight again. The next alternate, 10. Next alternate, 10. Next alternate, 10. And the last one, 10. All the doubled digits, check it out if any of them has two digits in them. 10 is a two-digit number. Sum of the digits. 1 + 0, you'll get one. 1 + 0, 1. Eight will stay as eight. Eight is going to stay as eight. Once done, take this up. 1 + 5, 6 + 1, 7. 7 + 5, 12. And keep summing it up till the end. Eventually, you'll get the sum as 60. If the sum is divisible by 10, then it's a valid number. Yes, And that is what Luhn's algorithm is all about and you don't have to do a backend call. Thank you so much for watching and you can definitely follow for such more videos.
