CAS number validator
Check whether a CAS registry number is well formed before it goes on a quote, a label or a customs document. See the check digit worked out step by step, validate a whole list from a spreadsheet at once and jump straight to the chemical on CompoundList.
Hyphens are optional. 7732185 is read as 7732-18-5.
Valid check digit
7732-18-5 is well formed. This proves the number has no typing error that the check digit can catch, not that it belongs to the chemical you expect.
The check digit calculation
| Digit (right to left) | Weight | Product |
|---|---|---|
| 8 | × 1 | 8 |
| 1 | × 2 | 2 |
| 2 | × 3 | 6 |
| 3 | × 4 | 12 |
| 7 | × 5 | 35 |
| 7 | × 6 | 42 |
| Sum | 105 | |
| Last digit of the sum | 5 = check digit |
Take every digit except the last, multiply from the right by 1, 2, 3 and so on, add them up and keep the last digit of the total. It must equal the check digit.
How the CAS check digit works
A CAS registry number has three parts: two to seven digits, two digits and a single check digit, for example 7732-18-5 for water. The numbers are assigned in sequence by CAS, a division of the American Chemical Society, and carry no chemical meaning. The last digit is calculated from the others so that typing mistakes can be caught.
Ignore the hyphens, take every digit except the last, and multiply them from right to left by 1, 2, 3 and upwards. Add the products. The last digit of the total must be the check digit.
The check catches most typing mistakes, but not all of them. Swapping two neighbouring digits in front of the check digit always breaks it, because the swap changes the total by the difference between the two digits. A single wrong digit is always caught at weights 1, 3, 7 and 9, but at the other weights some changes slip through. For example, a digit that is off by 5 at weight 2 adds or removes exactly 10, so the last digit of the total stays the same.
A number that passes is only well formed. It may still belong to a different substance than you think, or to a record CAS has since deleted. Always confirm the name, the formula or the structure as well.
Worked example
The same steps the calculator follows, done by hand
Check caffeine, 58-08-2. The digits before the check digit are 5, 8, 0 and 8.
| Digit from the right | Weight | Product |
|---|---|---|
| 8 | 1 | 8 |
| 0 | 2 | 0 |
| 8 | 3 | 24 |
| 5 | 4 | 20 |
- 1Add the products: 8 + 0 + 24 + 20 = 52.
- 2The last digit of 52 is 2, which matches the check digit, so 58-08-2 is valid.
- 3If someone types 58-08-3 the sum is still 52, the check digit no longer matches and the number is rejected.