Why does helium make your voice sound squeaky?
Not by raising the pitch of your voice, which is the usual explanation and is wrong. Helium changes which frequencies your vocal tract amplifies, altering the timbre while leaving the underlying pitch essentially unchanged.
Your voice starts at the vocal folds, which vibrate at a rate set by their length, tension and mass. That rate determines pitch, and helium does not change any of those physical properties — so the fundamental frequency stays where it was. If you sing a note on helium, it is the same note.
What helium changes is the cavity above the folds. The throat, mouth and nasal passages act as a resonator, reinforcing some frequencies in the raw buzz and damping others. The reinforced bands are called formants, and they are what make an "ee" sound different from an "oh", and one person's voice recognisable from another's.
The frequencies a cavity resonates at depend on the speed of sound in the gas filling it. Sound travels roughly three times faster in helium than in air, because helium atoms are far lighter. So every formant shifts sharply upward, while the fundamental stays put. Your ear interprets that unfamiliar combination — normal pitch, wildly elevated resonance — as thin, quacking and comic.
The reverse experiment confirms it. Breathing sulphur hexafluoride, which is much denser than air, lowers the speed of sound and drops the formants, producing a booming voice without lowering the actual pitch.
One genuine caution: helium displaces oxygen, and inhaling it directly from a pressurised cylinder has caused serious injury and deaths. The physics is interesting; the party trick is not risk-free.