To understand your question first you must be familier with certain processing steps in an API.
During manufacturing of an API you may have to use many chemicals and solvents. Each solvent and chemical has its own stability parameter and expiry date.
During manufacturing the QA/QC team will look into the expiry date of each individual chemical. That means if the chemical is not expired , he can take that particular chemical no matter what ever the shortest expiry period that particular chemical has. Here the most important parameter is that it should be used with in expiry date and once it is used a particular chemical reaction takes place and a new structural chemical is formed.That means the reaction chemicals will lose their earlier structure and a new molecule is formed.
During such molecular formation, there will be a key step where 2 or 3 intermediates or chemicals used to make that critical step. As per FDA “Crtitical step is defined as the process or reaction where the key molecular chemical is formed.”
From this process actually it is ideal to calculate expiry period.
For Example Meropenem Antibiotic : 4AA formation is a Key step. For formation of 4AA an Intermediate like 6APA is used along with many chemicals.
In a word to say the exipry of a particular API is dependent up on that Critical step and also on the purity of that particular Critical molecule.
You need to understand more about SAR (sTRUCTURAL ACTIVITY RELATIONSHIP) in medicinal chemistry to understand all these.