A method to classify amphetamine samples according to their impurity content by the help of computer programs is described. In an example with made up data the method is shown and in a second example, with data from 136 amphetamine samples analysed during a short period, the agreement between this method and an independent visual classification of impurity profiles is good. The impurities are extracted by n-octane from an aqueous solution of amphetamine at pH 7 and analysed by gas chromatography. The integrated peak areas are used for classification in computer programs and examples of outputs are shown. By calculating principal components and displaying the data according to them a plot is shown on the computer screen where a classification may be found. By using a rotating plot more of the information can be used.