ThisCalculator

Everyday

Pitch to Frequency Calculator: Convert Notes to Hz

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This calculator converts a musical pitch (a note name like A4 or C#5) into its frequency in Hertz (Hz), the standard unit of sound frequency. You enter the note name and octave, and the calculator returns the exact frequency based on the equal-tempered tuning system used by most modern instruments. It also shows the MIDI note number and the wavelength of the sound at standard temperature, giving you a complete picture of the pitch’s physical properties.

Formula

The core formula for converting a note to frequency in equal temperament is:

f = 440 × 2(n − 69) / 12

Where:

  • f = frequency in Hertz (Hz)
  • n = MIDI note number (A4 = 69, C4 = 60, etc.)
  • 440 = the reference frequency of A4 in Hz (the standard concert pitch)
  • 12 = the number of semitones in an octave

In this calculator, the note name (e.g., A, C#, F) is converted to a semitone offset from C (C = 0, C# = 1, D = 2, …, B = 11). The octave number is then used to compute the MIDI number with the formula: MIDI = (octave + 1) × 12 + semitone_offset. For example, A4 has semitone offset 9 (A is the 9th semitone from C), so MIDI = (4+1)×12 + 9 = 69.

Worked Example

Using the default values from the calculator: Note = A4, Octave = 4.

  1. Semitone offset for A = 9.
  2. MIDI number = (4 + 1) × 12 + 9 = 60 + 9 = 69.
  3. Frequency = 440 × 2(69 − 69) / 12 = 440 × 20 = 440 Hz.
  4. Wavelength at 20°C = speed of sound (343 m/s = 34300 cm/s) divided by frequency = 34300 / 440 ≈ 77.95 cm.

The calculator displays: Frequency = 440.00 Hz, MIDI = 69, Wavelength = 77.95 cm.

Why Equal Temperament?

Equal temperament is the tuning system that divides the octave into 12 equal logarithmic steps. It was developed in the 16th–17th centuries and became the standard for Western music because it allows instruments to play in any key without retuning. Before equal temperament, systems like just intonation or meantone temperament gave pure intervals in specific keys but were unusable in others. Today, virtually all digital synthesizers, pianos, and orchestral instruments use equal temperament, making it the universal reference for pitch-to-frequency conversion.

One important consequence: the ratio between adjacent semitones is exactly 21/12 ≈ 1.059463. This means each semitone is about 5.95% higher in frequency than the previous one. If you know one frequency, you can find the next semitone by multiplying by that ratio.

How to Use the Calculator

Enter a note name (using letters A–G, with optional # for sharp or b for flat) and an octave number. The calculator accepts standard notation like C4, F#3, or Bb5. If you enter a flat (like Bb), it is treated as the same pitch as its sharp equivalent (A#). The octave numbering follows scientific pitch notation where middle C is C4 (MIDI 60) and A above middle C is A4 (440 Hz).

The results give you:

  • Frequency – the fundamental frequency in Hz, which is what a tuner measures.
  • MIDI number – useful for MIDI programming and digital audio workstations.
  • Wavelength – the physical length of one sound wave at 20°C, useful for acoustics and speaker placement.

Note that the wavelength calculation assumes air temperature of 20°C (68°F). At different temperatures, the speed of sound changes (about 0.6 m/s per °C), so the wavelength shifts slightly.

Common Mistakes and Misconceptions

One frequent error is confusing octave numbering systems. Some older systems label middle C as C3 (MIDI 48) or C5 (MIDI 72). Always check which convention you are using. This calculator uses scientific pitch notation (C4 = middle C), which is the most common in music software and academic settings.

Another mistake is assuming that a sharp and flat are different pitches. In equal temperament, C# and Db are exactly the same frequency. This is not true in other tuning systems, but for this calculator they are identical.

Finally, remember that the calculator gives the fundamental frequency. Real instruments produce overtones (multiples of the fundamental), and the perceived pitch can be affected by those harmonics. For example, a note with a weak fundamental may still be perceived as that pitch because the brain reconstructs it from the overtones.

Alternatives and Related Conversions

If you need to convert frequency to pitch (the reverse operation), you can use the inverse formula: n = 69 + 12 × log2(f / 440). Many tuner apps do this automatically. You might also want to calculate the frequency of a specific interval, such as a perfect fifth (multiply by 1.5) or a major third (multiply by 24/12 ≈ 1.2599).

For those working with non-standard tunings, you can adjust the reference frequency (e.g., some orchestras tune to 442 Hz or 443 Hz). The formula still works, just replace 440 with the desired reference. However, this calculator is fixed to 440 Hz, which is the international standard (ISO 16).

If you need to convert between frequency and wavelength directly, use the formula: wavelength = speed of sound / frequency. At 20°C, speed of sound is 343 m/s. This is useful for audio engineering and room acoustics.

Limitations of the Calculator

This calculator is designed for pure tones and assumes ideal conditions. It does not account for:

  • Temperature and humidity – these affect the speed of sound and thus the wavelength.
  • Instrument-specific tuning – some instruments (like a piano) use stretched tuning, where octaves are slightly wider than perfect.
  • Non-equal temperament – if you are working with historical tunings, the frequencies will differ.
  • Human perception – the perceived pitch can be influenced by loudness and duration, though the physical frequency remains the same.

For most practical purposes—tuning an instrument, setting up a synthesizer, or analyzing audio—the equal-tempered values are exactly what you need.

Frequently Asked Questions

What is the frequency of middle C (C4)?

Middle C (C4) has a frequency of 261.63 Hz in equal temperament. This is because C4 is 9 semitones below A4 (440 Hz), so the calculation is 440 × 2(60−69)/12 = 440 × 2−0.75 ≈ 261.63 Hz.

How do I convert a frequency back to a note?

Use the inverse formula: n = 69 + 12 × log2(f / 440). This gives you the MIDI note number, which you can then convert to a note name. For example, 261.63 Hz gives n = 69 + 12 × log2(261.63/440) = 69 − 9 = 60, which is C4.

Why is A4 exactly 440 Hz?

440 Hz was adopted as the standard tuning pitch in 1939 by the International Organization for Standardization (ISO 16). Before that, different countries used different standards, ranging from 415 Hz to 450 Hz. The choice of 440 was a compromise that balanced brightness and practicality, though some ensembles still tune to 442 or 443 for a slightly brighter sound.

What is the difference between a sharp and a flat in equal temperament?

In equal temperament, there is no difference—C# and Db are exactly the same frequency. The choice of spelling is purely a matter of musical context and notation. The calculator treats them as identical.

Does the calculator work for any note, including double sharps or flats?

Yes, you can enter notes like C## (double sharp) or Ebb (double flat). The calculator interprets them as the equivalent semitone offset. For example, C## is the same as D, and Ebb is the same as D. This is consistent with standard music theory.

Why does the wavelength change with temperature?

The speed of sound in air increases with temperature (approximately 0.6 m/s per °C). Since wavelength = speed / frequency, a higher speed means a longer wavelength for the same frequency. At 20°C, the speed is 343 m/s; at 0°C it’s about 331 m/s, so the wavelength would be about 3.5% shorter.

Related

Formula used
in note | Note name (e.g., A4, C#5) | - | A4 | 0
in octave | Octave number | - | 4 | 0
out freq | Frequency | Hz | 440 * pow(2, (note_val + (octave - 4) * 12 - 9) / 12) | 2
out midi | MIDI note number | - | note_val + (octave + 1) * 12 | 0
out wavelength | Wavelength (at 20°C) | cm | 34300 / (440 * pow(2, (note_val + (octave - 4) * 12 - 9) / 12)) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.