When dealing with ancient subalkaline volcanic rocks, the alkali – total iron – magnesium (AFM) diagram is of limited use in assigning a tholeiitic versus calc-alkaline affinity because these elements are often mobile during alteration and metamorphism. Classification diagrams using immobile trace elements are preferable but need to be tested and optimized on unaltered rocks. To this end, a geochemical database containing over a thousand, presumed unaltered, subalkaline volcanic samples from young oceanic arcs was assembled. The data were classified using both major and trace-element approaches, and the results were compared. If the calc-alkaline and tholeiitic fields on the AFM diagram are used to define magmatic affinity, then the commonly used Zr versus Y, La versus Yb, and Th versus Yb discriminant diagrams misclassify 39%, 24%, and 28% of samples, respectively. After optimization (using a number of criteria), all three trace-element classification diagrams produce results that are generally consistent with the AFM diagram. The optimized diagrams only misclassify 7%, 11%, and 12% of the samples, respectively. A new Th/Yb versus Zr/Y diagram has a better overall performance than any single ratio diagram and may prove helpful in assigning magmatic affinities to volcanic rocks in ancient successions.