⚖️

Frequency Ratio Calculator

Enter two frequencies and get the simplified ratio, the cents value, the nearest just-intonation interval, and the nearest 12-TET interval — with cents deviation for both, so you can see which tuning system your interval is closer to.

Input

Hz
Hz
Common intervals

Result

Simplified ratio
Cents (full)
Decimal ratio
Reduced to one octave
Nearest just interval
Nearest 12-TET interval
Which is closer?
Formulas
Ratio: r = f₂ / f₁
Cents: c = 1200 · log₂(r)
12-TET semitone: 21/12 ≈ 1.05946 = 100 cents
Just intonation: small integer ratios (3:2, 4:3, 5:4, …)
Cents axis (0–1200, reduced to one octave)
12-TET semitones (below baseline) Just intervals (above baseline) Your ratio

Share or embed this tool

Free to use on your own website — WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


About Frequency Ratios

This frequency ratio calculator expresses one tone in terms of another. Musical intervals are perceived logarithmically: the brain hears a 440 → 880 Hz step (ratio 2:1) and a 220 → 440 Hz step as the "same" interval — both octaves. The two tuning systems below organize music's vocabulary of ratios in different ways. The same mathematics applies whenever you need to compare any two pitched sounds — from instrument tuning to acoustic resonance analysis to synthesizer oscillator detuning.

Just intonation — small integer ratios

Just intonation (JI) defines intervals as small whole-number ratios: 2:1 octave, 3:2 fifth, 4:3 fourth, 5:4 major third, 6:5 minor third, etc. These ratios maximize "consonance" — the overtones of one note line up perfectly with those of the other, producing a beat-free sound. Pythagoras built tuning systems from just 2:1 and 3:2 (Pythagorean tuning); 5-limit just intonation adds 5:1 (the harmonic). Extended just intonation (7-limit, 11-limit) introduces ratios like 7:4 (the harmonic seventh) and 11:8, beloved in microtonal and spectral music. Drawback: only one key sounds perfect; transposing requires re-tuning.

12-tone equal temperament — geometric spacing

12-TET divides the octave into 12 equal logarithmic steps. Each semitone is 21/12 ≈ 1.05946 (exactly 100 cents). All keys sound equally (slightly) out of tune. Drawback: the major third in 12-TET (400 cents) is 14 cents sharper than the just 5:4 (386 cents), giving piano thirds their characteristic beating. Benefit: any key sounds the same, transposition is free. Other equal temperaments — 19-TET, 31-TET, 53-TET — are also in use among microtonalists; this calculator handles any ratio regardless of the underlying scale system.

Cents — the universal interval unit

One cent is 1/100 of a 12-TET semitone, or 1/1200 of an octave. Cents convert any ratio to a linear measurement: cents = 1200 · log₂(ratio). Most listeners can detect pitch differences down to ~5 cents in isolation, ~10-20 cents in musical context. Beat rates also help: a 7 cent deviation at 440 Hz gives ~1.8 beats per second. To explore the full overtone structure that makes JI intervals so consonant, the Harmonic Series Calculator shows every partial of a fundamental and how they map onto the interval lattice.

Why are pianos not perfectly in tune? Equal temperament vs just intonation

Equal temperament (ET) divides the octave into 12 equal semitones, each with a frequency ratio of 21/12 ≈ 1.0595 (exactly 100 cents). Every key sounds identical, so a piano can play in any key without re-tuning. The trade-off is that most intervals are slightly impure: the ET major third (400 cents) is about 14 cents sharper than the just 5:4 major third (386 cents), and the ET perfect fifth (700 cents) is roughly 2 cents flatter than the just 3:2 fifth (702 cents). Those small deviations create the audible beating that gives a piano its characteristic shimmer.

Just intonation (JI) uses simple whole-number ratios — 3:2 for the perfect fifth, 5:4 for the major third — that produce beat-free, "locked-in" sound. The cost is key-dependency: a JI tuning perfect for C major sounds noticeably off in D major. Ensembles with flexible pitch (choirs, string quartets) naturally drift toward JI ratios mid-performance. To hear the difference concretely, use the Chromatic Tuner to check where a played note lands in cents, then use the Interval Calculator to see how far that interval sits from the nearest pure JI ratio.

Continued-fraction approximation

This tool's "Best integer ratio" finds the simplest p:q with q ≤ 1000 closest to your decimal ratio, using continued fractions. For an exact 3:2 input (660/440 = 1.5), it returns 3:2 exactly. For a 12-TET fifth (440 × 27/12 ≈ 659.255 Hz), it returns 1.4983:1 — close to but not 3:2, illustrating the tuning gap. Continued-fraction reduction is also the algorithm behind Stern–Brocot tree approaches to ratio simplification, which rank fractions by harmonic complexity rather than size.

Frequently Asked Questions

Why does the 12-TET major third sound "out of tune" compared to JI?
Because it IS — by about 14 cents. The just major third is 5:4 = 1.25 (386 cents); 12-TET is 24/12 = 1.2599 (400 cents). At 440 Hz, just 3rd lands at 550 Hz, 12-TET at 554.37 Hz. The overtone series of the lower note has its 5th harmonic at 5·f, which clashes with the 12-TET upper note's fundamental. Result: audible beating, mostly tolerable but noticeably "less locked in" than just thirds. Choirs and string quartets without fixed pitch tend to drift toward JI for harmonic clarity.
What does "small integer ratio" mean for consonance?
When two tones have a small-integer ratio like 3:2, their harmonic series align: the upper note's fundamental equals the lower note's 2nd harmonic; the upper's 2nd harmonic equals the lower's 3rd; etc. This creates many coincident harmonics → beat-free sound → maximum perceptual consonance (Helmholtz, Plomp). Complex ratios like 17:13 don't align nicely → multiple beat frequencies → dissonance. The brain seems to "prefer" simple ratios because they produce simpler combined waveforms.
What's the difference between just and Pythagorean intervals?
Pythagorean tuning uses only 2:1 (octave) and 3:2 (fifth) to derive everything. Major third in Pythagorean = (3:2)4 reduced by two octaves = 81:64 = 408 cents — actually sharper than 12-TET! The "just" 5:4 = 386 cents comes from adding 5 as a permitted prime. So just intonation = Pythagorean + 5-limit. Higher-limit JI (7, 11, 13…) brings in more exotic intervals; the Harmonic Seventh (7:4 = 969 cents) is a famous example, distinctly different from 12-TET's minor seventh at 1000 cents.
Can two different ratios produce the same cents value?
In principle no — each ratio maps to a unique cents value via 1200·log₂(r). In practice the cents value can be the same to within rounding for very close ratios (e.g., 16:9 vs 9:5 both round to ~1000 cents). The tool uses the actual decimal ratio for matching, not rounded cents. Different ratios with the same cents are mathematically impossible since the log is bijective on positive reals.
How does this relate to beat frequencies?
Beats are produced when two tones are close in frequency but not identical. Beat rate = |f₂ − f₁|. A 12-TET fifth (659.255 Hz) above 440 Hz beats against the 3rd harmonic of 440 (= 1320 Hz, but 2·659.255 = 1318.51 Hz, so 1.49 Hz beat). A just fifth (660 Hz) has 2·660 = 1320 Hz exactly — zero beats. This is the audible test for "in tune". Trained ears use beat-counting to tune to just intervals.
Why are octaves not slightly different in JI vs 12-TET?
Because both systems use 2:1 as the octave. The octave is the ONE interval that's identical in JI and 12-TET — by definition. The other 11 intervals diverge by various small amounts. Cuts both ways: pianos can be tuned with "stretched octaves" (slightly wider than 2:1) to compensate for inharmonicity of real strings, but that's a separate compromise involving physics of stiff strings.
How do I use frequency ratios for vocal harmony or instrument tuning?
Enter the two pitches you want to sing or play together — for example, the root note and the desired harmony note — and the tool tells you which just-intonation interval is closest and by how many cents. Vocalists and string players naturally drift toward the just ratio because it eliminates beating; a result near 0 cents deviation from JI confirms the interval is "locked in." For instrument tuning, compare the open string (or fret/pipe) frequency against a reference: a deviation greater than ±5 cents is clearly audible. For advanced practice with a range of JI intervals and their ratios side by side, the Just Intonation Calculator provides a complete 5-limit lattice reference.
What is the harmonic seventh (7:4) and why doesn't it appear in 12-TET?
The harmonic seventh is the seventh partial of the overtone series: 7 times the fundamental, reduced by two octaves gives the ratio 7:4 = 969 cents. It sits 31 cents below the 12-TET minor seventh (1000 cents) and sounds distinctly flatter and "bluer" — the basis of the blues seventh and the "barbershop seventh." Because 12-TET uses only integer multiples of 100 cents, 7:4 cannot be represented exactly; the nearest step (1000 cents) is a poor approximation. Extended just intonation and 31-TET capture it accurately. Enter 1:1 as f₁ and 1.75 as f₂ (in any common unit) to see 7:4 plotted on the cents axis above.
How do compound intervals (beyond an octave) work in this calculator?
A compound interval spans more than one octave — a major tenth (two octaves plus a major third) has ratio 5:2 = 2.5. The calculator reports the full cents value (1586 cents for 5:2) and also reduces it to within one octave (386 cents, the just major third) in the "Reduced to one octave" field. The JI and 12-TET matching always operates on the octave-reduced interval, because the perceptual quality of an interval (its consonance or dissonance) is the same regardless of which octave it spans — 5:2 and 5:4 are both major thirds in different registers. If you work in non-12-TET scales, the Microtonal Scale Generator lets you build arbitrary equal-temperament divisions and output their ratios for comparison here.