To convert Hz to a musical note, divide the frequency by the tuning reference for A4, take its base-two logarithm and multiply by 12. Add 69 to express the result on the MIDI note scale. The nearest integer gives the note number. The fractional part tells you how far the input sits above or below that note.
Work Through 300 Hz at A4 = 440 Hz
Use m = 69 + 12 × log₂(Hz ÷ A4 Hz). For 300 Hz this gives about 62.37. MIDI note 62 is D4, so the nearest note is D4. Compare the input with D4’s 293.66 Hz reference. The offset is about +36.95 cents. The 300 Hz value is best described as a slightly sharp D4 in this tuning.
Enter the same value in the Hz to musical note converter and compare the letter, octave and cents. Test the opposite direction with the note to frequency converter. The reverse lookup for D4 gives its tuned reference, 293.66 Hz. It cannot reproduce 300 Hz unless you also apply the offset.
Compare Ratios Before Rounding
A pitch interval depends on the ratio of two positive frequencies. An octave doubles frequency upward, so the difference in hertz between adjacent octaves doubles along with the pitches. The equal-tempered ratio for one semitone is about 1.05946. It works the same way near a bass note and near a treble note.
For 300 Hz, dividing by D4 at about 293.66 Hz gives a ratio just over 1.02. That is smaller than a full semitone ratio. If you divide by E-flat 4 instead, the result is below one, so its signed offset is negative.
You can check any result in the opposite direction. Divide the higher frequency by the lower frequency to confirm the interval’s size. Divide the measured frequency by a particular target instead when its position above or below that target matters. A ratio smaller than one gives a negative signed difference.
Copy the target and measured values to a temporary note before rounding. For applications that display integers, a small frequency change can cross a semitone boundary without making a large audible change. Use the signed cents or more precise Hz values to describe what happened, and give the whole note label along with them.
Check Values Near a Boundary
A nearest-note calculation compares positions on a logarithmic pitch scale. The halfway point lies 50 cents above the lower note and 50 cents below the higher one. Its frequency is the geometric mean of the adjacent reference frequencies. Averaging the two hertz numbers gives a slightly different value.
D4 and E-flat 4 meet at about 302.27 Hz in a 440 Hz reference. At 300 Hz the input sits on the D4 side. Near the boundary, compare the signed offsets from both labels and record the measured Hz even if the nearest name changes.
A display may show one label with +49 cents and another with −49 cents just above it. The input can have moved only two cents. The reported reference changed because the nearest label crossed into the next region. To compare against the same target throughout, keep that target fixed and compute its signed deviation both times.
At an exact midpoint a tool may apply a documented tie rule. It can also show both neighbors. A rounding convention changes the displayed label at that point. It leaves the underlying frequency the same. When checking numerical results, test just below and just above the midpoint using more precision than the final result shows.
Save a Result That Can Be Checked Again
Use a brief note with an input value, stated tuning, target label and signed offset. If you are recording several tests, save the original values and a separate display column rounded to the precision you actually need. This makes it easy to verify a result with another calculator or a printed reference.
For an equipment check, try 220, 440 and 880 Hz. You should get A3, A4 and A5 under the same reference. If all three are displaced similarly in cents, check the A4 setting before changing the formula.
For a mismatch, begin with the units and the octave. A reported value may be in kHz, a MIDI key number, or a frequency in Hz. Those formats require different starting points. A factor-of-two difference usually points toward a one-octave relationship, while a small consistent offset can come from another A4 reference.
If you retest after changing a setting, keep the old result and mark the change. That comparison is more informative than a single number from the new setup. The goal is to identify whether the difference came from pitch, calibration, rounding or naming, so each step should leave a value you can compare directly.
Read the Result Before You Copy It
A nearest label provides a musical description. A signed cent figure gives the remaining difference. Keep both when reporting a measured tone. The nearest-note rounding guide explains how the number can jump between adjacent note labels in one steady region. If you begin with recorded sound instead of a known frequency, first identify a reliable fundamental. The frequency, note and octave guide shows how to distinguish its frequency from the note label.
Further reading
UNSW Music Acoustics reference for note names, MIDI numbers and frequencies
Frequently Asked Questions
Can the formula accept 0 Hz?
The logarithm requires a positive frequency. Zero does not produce a musical note in this calculation. Check the unit and input before trying again.
Why is my frequency above D4 when the result still says D4?
D4 is the nearest reference pitch. The cents figure shows how far above it the input sits. An input can remain nearest to D4 up to the midpoint toward the next semitone.
Is the MIDI number always between 0 and 127?
A logarithmic calculation can extend further. Standard MIDI 1.0 note messages use integer note numbers from 0 to 127. A converter can show an out-of-range pitch separately or restrict the supported input.