MeridianMERIDIAN

CAS Registry Number

representation.scientific.cas_number

Chemical Abstracts Service registry number. Unique numeric identifier for chemical substances. Format: 2-7 digits, hyphen, 2 digits, hyphen, 1 check digit. The check digit is the weighted sum of all preceding digits mod 10, where the rightmost digit before the check has weight 1, next has weight 2, etc.

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs VARCHARcheck_digitpart1part2
7732-18-57732-18-55773218
64-17-564-17-556417
50-78-250-78-225078
7647-14-57647-14-55764714
67-56-167-56-116756
71-43-271-43-227143
Check digit
CAS weighted mod 10

Shape

Pattern
^\d{2,7}-\d{2}-\d$
ValueLengthShape
7732-18-59matches
64-17-57matches
50-78-27matches
7647-14-59matches
67-56-17matches
71-43-27matches
7732-18-8rejected: one character short

Told apart

1 of the 6 other scientific types accept every one of these samples on shape alone.

Background

Origin

CAS Registry Numbers are assigned by the Chemical Abstracts Service (CAS) in the US.[1] The CAS Chemical Registry System became operational in 1965.[1] CAS says its Registry Numbers have set the standard for identifying chemical substances since 1965.[2]

CAS describes a CAS Registry Number as a unique and unambiguous identifier for a specific substance.[2] A CAS Registry Number can contain up to 10 digits, divided by hyphens into three parts.[2] The first part of a CAS Registry Number has 2 to 7 digits, the second part has 2 digits, and the final part is a single check digit.[3] The CAS check digit is found by multiplying the other digits, from right to left, by 1, 2, 3 and so on, adding the products and taking the sum modulo 10.[1] For water, 7732-18-5, the weighted sum is 105, and 105 mod 10 gives the check digit 5.[1] The three-part format gives CAS a maximum capacity of 1,000,000,000 unique numbers.[1]

A CAS Registry Number has no inherent meaning and is assigned in sequential, increasing order.[1] A CAS Registry Number carries no chemical or structural meaning in itself.[4] The University of Texas at Austin's chemistry guide notes that the shorter the first segment, the older the registration.[4]

Use

CAS says governmental agencies rely on CAS Registry Numbers for substance identification in regulatory applications.[2] Almost all molecule databases allow searching by CAS Registry Number.[1] A column of CAS numbers is worth treating as a join key, since matching on chemical names across sources is far less dependable. (Meridian's view)

The US EPA warns that when its TSCA Inventory CSV is opened in Excel, CAS Registry Numbers in the CASRN column may be changed to dates.[5] The US EPA advises importing the TSCA Inventory CSV through Excel's Data tab and its From Text/CSV option to prevent that conversion.[5] The EPA's TSCA Inventory carries a second field, casregno, holding the CAS Registry Number without dashes.[5] Keep CAS numbers as text from the moment you read them, and if a file has already been through a spreadsheet, look for values that have turned into dates before trusting the column. (Meridian's view) Validate each value with the check digit as well as the pattern, since a well-shaped number with a typo will still look right. (Meridian's view) A check digit that passes shows the number is well formed, not that it names the substance you expect, so confirm important identifiers against a lookup. (Meridian's view)

Where you'll meet it

The US EPA's downloadable TSCA Inventory identifies its non-confidential chemical substance listings by CAS Registry Number and CA Index Name.[5] CAS Common Chemistry, an open community resource for accessing chemical information, covers nearly 500,000 chemical substances.[6]

Detection notes

New in taxonomy expansion. CAS numbers are the global standard for chemical substance identification. Over 200 million substances registered. Check digit algorithm: number all digits right-to-left (excluding check), multiply each by its position, sum, mod 10. Water=7732-18-5, Ethanol=64-17-5.

Use it

CLI · DuckDB
$ finetype infer -i "7732-18-5" --mode column
→ representation.scientific.cas_number

SELECT ft_infer('7732-18-5');
-- → 'representation.scientific.cas_number'
Cast expression
CAST({col} AS VARCHAR)

Schema

https://meridian.online/schemas/representation.scientific.cas_number · Frictionless type string

finetype taxonomy representation.scientific.cas_number -o json-schema

Aliases

cas_rncas_idchemical_id

Type Registry