Intervals describe the distance in Pitch between 2 notes.   If the 2 notes are played at the same time then the interval is HARMONIC.   If the notes are played one after another then the interval is MELODIC.

The SIZE of an Interval is measured by the Number of Letter names contained between the bottom and top notes.

Intervals are measured by 2 parts, the SIZE and the QUALITY.   Quality is measured by the distance between 2 notes in SEMITONES and TONES.   A Semitone is the smallest distance between any 2 notes.   A Tone or WHOLE TONE is made up of 2 Semitones.   When we examine the Major Scale on a Piano we see a consistent pattern of Tones and Semitones, which is the same for all 15 Major Keys Signatures and Major Scales.

Tone - Tone - Semitone - Tone - Tone - Tone - Semitone

We have already seen how to measure the Size so to measure the Quality of an Interval for a Major Scale it would fall into 2 types;   Major or Perfect.

The following Chart shows the number of Semitones between the notes of a Major Scale.   If we change the Key the Intervals remain the exact same for all 15 Key Signatures since the number (#) of Semitones between each Scale Note remains the same.

Table Of Major Scale Intervals

Number of Semitones
  Perfect Unison
P Unison
  Major Second
Ma 2
  Major Third
Ma 3
  Perfect Fourth
P 4
  Perfect Fifth
P 5
  Major Sixth
Ma 6
  Major Seventh
Ma 7
  Perfect Octave
P Octave
Now if we alter a C Major Scale note with a Sharp, Double Sharp, Flat or Double Flat then the Quality of the Interval changes but the Size will remain the same since that is based on Letter Names only.   All of these accidentals raise or lower a C Major Scale note by either a Semitone or Tone (Whole Tone).

A Flat lowers a note by a Semitone while a Sharp raises a scale note by a semitone, which changes the Interval Quality.   Here are the NEW Interval Names when the note is altered by a Double Flat - Flat - Sharp or Double Sharp:

Double Flat
Double Sharp
  Double Diminished
  Double Augmented
Doub Dim 5
Dim 5
P 5
Aug 5
Doub Aug 5
  Double Augmented
Dim 3
Mi 3
Ma 3
Aug 3
Doub Aug 3

Remember, although we used a C Major Scale for this example a Key Signature with Flats that has a note with a will be raised by a Natural Sign since it cancels the Flat.   Thus, a scale note with a Flat, such as B becomes B since it would be raised by a semitone as a result of the Natural Sign.

Similarly, a Key and Scale notes with Sharps would have a note lowered by a Natural Sign by 1 semitone.