teoria.com uses cookies. By using our site you agree to the use of cookies. Read our privacy policy for more information. Close

What are cents in music?

José Rodríguez Alvira

From logarithms to cents

In the previous section, we almost got to Ellis's formula for calculating cents. Here we will follow the process in more detail and arrive at the final formula.

Let's find the base 2 logarithms of the frequencies of two notes (C4 and C5) at the distance of one octave:

Note

Frequency

Logarithm base 2

Power

C4

260 Hz.

log_{2} (260) = 8.022367813028454

2^{8.022367813028454} = 260

C5

520 Hz.

log_{2} (520) = 9.022367813028454

2^{9.022367813028454} = 520

How do we calculate logarithms base 2?

Your calculator probably does not have the option of calculating base 2 logarithms. Programs like Excel, Numbers or Google Sheets can do it with the following formula:

=log(value, base)

where value is the number you want to get the logarithm of and base is the base you want to use (2 in our case).

Or you can use our calculator:

Base 2 Logarithm Calculator

Enter some number and click Calculate log _{ 2 } to calculate the base logarithm 2:

You must write a valid number.

If we subtract the numbers of the base 2 logarithms of the frequencies of C4 and C5 we obtain:

9.022367813028454 - 8.022367813028454 = 1

The difference between the base 2 logarithms of the frequencies of the notes of an octave results in 1 (if they were two octaves, the result would be 2). Ellis proposes multiplying this number by 1200 to obtain the cents. Why 1200? Because the octave is divided into 12 notes and 1200 assigns 100 cents to each semitone.

We need to multiply by 1200 in our formula:

\[ cents = (log_2(f_2) - log_2(f_1)) * 1200 \]

Note: You must subtract the logarithms first and then multiply by 1200.