is the number of semitones that separates one pitch from another, upward or downward.
An ordered pitch interval always includes a plus or minus sign.
By treating all octaves as being equivalent, pitch-classes contain less information (ex 'C') than pitches (ex: C3).
A more visual way to do this calculation is to place the pitch-classes on a clockface and measure the difference, always going clockwise (i.e. always ascending).
Because of symmetry, the smallest semitone interval between any two pitch-classes can only be an integer between 0 and 6.
The ordered one, also called directed interval, may be considered the measure upwards, which, since we are dealing with pitch classes, depends on whichever pitch is chosen as 0.