To derive an interval, you need to determine it's number and it's quality.
Identifying the number of an interval
1) Look at the two notes in a stave system and count up lines and spaces between them. Count including the bottom and the top note.
2) Add up lines and spaces that you counted.
There are Spaces and Lines between the two notes in the picture to the right. Because , the Interval to the right is a seventh.
Identifying the quality of an Interval
After having determined the number, you can determine the quality of the interval.
One way of determining the quality of an Interval is counting semitones.
Using this table, you can determine the quality of the Interval you are looking at by comparing the number of the Interval to the number of half steps between the two notes.
The Interval to the right is a sixth.
There are semitones between G♯ and E, which means that the interval is a minor sixth.
Number of Semitones