Sound & Audio

MIDI Note, Frequency & Tuning Deviation Calculator

Identify the nearest twelve-tone equal-tempered note for a measured frequency and calculate a separate MIDI note frequency.

How the calculation works

continuous = 69+12*log(frequency/reference)/log(2). nearest = floor(continuous+0.5). Continuous equal-tempered note number = continuous . Nearest note number, without MIDI-range clamping = nearest . Nearest note name, scientific pitch notation = midi_name(nearest) . Nearest note target frequency = reference*2**((nearest-69)/12) Hz. Measured pitch offset from nearest note = 1200*log(frequency/(reference*2**((nearest-69)/12)))/log(2) cents. Selected MIDI note name = midi_name(note) . Selected MIDI note frequency = reference*2**((note-69)/12) Hz.

Worked example

Example inputs — Measured pitch frequency (Hz): 440; Reference A4 frequency (Hz): 440; MIDI note number for separate frequency lookup: 60. Expected results — Continuous equal-tempered note number: 69; Nearest note number, without MIDI-range clamping: 69; Nearest note name, scientific pitch notation: A4; Nearest note target frequency: 440 Hz; Measured pitch offset from nearest note: 0 cents; Selected MIDI note name: C4; Selected MIDI note frequency: 261.6255653 Hz.

Assumptions and limits

Twelve-tone equal temperament relative to the entered A4; MIDI note 69 denotes A4 and note 60 denotes C4 under scientific pitch notation. Some software labels octaves differently. Nearest note is not clamped to MIDI’s 0–127 range, while the separate lookup is limited to that range. This mathematical tuning reference does not detect pitch from audio or represent alternate temperaments.

Reference and further reading

Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.

Related calculators

Browse all 1000 calculators →

Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.