An ordinal is a mathematical designation of position or ordering.
Ordinals differ from cardinals in that cardinals denote size or cadinality (there are 5 apples) while ordinals denote position or ordering (this is the fifth apple). Both are concepts are closely related to the natural numbers as well as programming, particularly with regard to the implementation of data structures (e.g. determining the size of a collection of the position of a specific element).