Music Theory: Harmonic and Melodic Intervals
Educating yourself on music theory will only help you be a better musician. If you want to be a better musician, make sure you familiarize yourself with intervals. The following two types of intervals exist:

A harmonic interval is what you get when you play two notes at the same time.

A melodic interval is what you get when you play two notes separately in time, one after the other.
The identity of an interval, and this goes for both harmonic and melodic intervals, is determined by two things:

Quantity

Quality
Quantity: Counting lines and spaces
The first step in naming an interval is finding the distance between the notes as they’re written on the staff. The quantity, or number size, of an interval is based on the number of lines and spaces contained by the interval on the music staff. Musicians and composers use different names to indicate the quantity of intervals:

Unison (or prime)

Second

Third

Fourth

Fifth

Sixth

Seventh

Octave
You determine an interval’s quantity by simply adding up the lines and spaces included in the interval. You must count every line and every space between the notes as well as the lines or spaces that the notes are on. Accidentals don’t matter when counting interval quantity.
It is very easy to determine an interval’s quantity. If you start on either the top or bottom note and count all the lines and spaces contained in the interval, including the lines or spaces that contain both notes, you end up with the number five. Therefore, this interval has the quantity, or number size, of five, or a fifth. Because the notes are written together to be played at the same time, it’s a harmonic fifth.
Here’s a melodic second. Note that the sharp accidental on the F does absolutely nothing to the quantity of the interval. Interval quantity is only a matter of counting the lines and spaces.
Now, check out interval quantities from unison (the two notes are the same) to octave (the two notes are exactly an octave apart) and all the intervals in between. Sharps and flats are thrown in for fun, but remember, they don’t matter when it comes to interval quantity.
What if an interval spans more than one octave? In that case, it’s called a compound interval. As with all interval quantities, you just count the lines and spaces for a compound interval. This example has the quantity of ten and is therefore called a tenth.
Quality: Considering half steps
Interval quality is based on the number of half steps from one note to another. Unlike in interval quantity, accidentals (sharps and flats), which raise or lower a pitch by a half step, do matter in interval quality. Interval quality gives an interval its distinct sound.
Each of the intervals you see here has exactly the same quantity, but they sound different because each one has a different quality.
Listen to hear the differences between the intervals that have the same quantity (fifth) but different qualities.
The terms used to describe quality, and their abbreviations, are as follows:

Major (M): Contains two half steps between notes

Minor (m): Contains a half step less than a major interval, or one half step between notes

Perfect (P): Refers to the harmonic quality of unisons, octaves, fourths, and fifths

Diminished (dim or d): Contains a half step less than a minor or perfect interval

Augmented (aug or A): Contains a half step more than a major or perfect interval
Naming intervals
Every interval gets its full name from the combination of both the quantity and the quality of the interval. For example, you may encounter a major third or a perfect fifth. Here are the possible combinations that you use when describing intervals:

Perfect (P) can only be used with unisons, fourths, fifths, and octaves.

Major (M) and minor (m) can only be used with seconds, thirds, sixths, and sevenths.

Diminished (dim) can be used with any interval, with the exception of unisons.

Augmented (aug) can be used with any interval.