Music TheoryPrintFree music theory tools and printable worksheets

Free online tool

BPM Finder - Find the Tempo and Key of a Song

BPM finder for audio files: drop an mp3, wav, m4a or ogg and get the tempo and an estimated key. The file is analysed in your browser and never uploaded.

No file chosen yet.

About the BPM Finder

BPM Finder is a free tool that estimates the tempo of an audio file in beats per minute (BPM), and it can also estimate the musical key. It runs in your web browser and needs no sign-up. You drop in a song, and it shows the tempo as a whole number, a more precise estimate, and a confidence level. It also works as a bpm key finder, reading the key of the track alongside the tempo. Use it to check the bpm of a song before a DJ set, a practice session, or a remix. Common formats such as MP3, WAV and M4A work, as long as your browser can play them. Because the key result is an estimate, read it as a guide, not a fact.

How to use the BPM Finder

  1. Drop an audio file onto the box marked “Drop an audio file here, or choose one”. You can also click the box and pick a file.
  2. Wait for the analysis to finish. The result appears on the page.
  3. Read the big BPM number. This is the tempo rounded to a whole number. Under it, check the Exact estimate (one decimal place), Half time and Double time.
  4. Check the Confidence line, which says High, Medium or Low.
  5. To analyse only part of a song, enter a start time in “Analyse from (seconds)” and a length in “For how long (seconds, 0 = to the end)”. A section must be at least 4 seconds long.
  6. Leave “Also estimate the key” ticked to see the key, or untick it to skip the key.
  7. Press “Analyse again” after you change any setting. It reruns with the new settings without decoding the file again.
  8. Press “Open in metronome” to hear the tempo, or “Not right? Tap it yourself” to tap the beat by hand.

You can also set the options in the address bar with ?start=SECONDS&length=SECONDS&key=0. The key=0 setting switches off the key estimate. For a song that speeds up or slows down, analyse each part on its own with the two section boxes.

How to find the bpm of a song#

To find the bpm of a song, the tool first turns the audio into a curve that peaks at each note attack. It mixes the audio to mono, cuts the section you chose, and lowers the sample rate to about 11 kHz. It then measures the onset strength in 512-sample frames taken every 128 samples, about 86 times per second. Each frequency bin is compressed on a log scale, and only the rises in energy are kept after a 0.5 second moving average is subtracted.

The tool then looks at the spectrum of that curve. For every tempo from 60.0 to 200.0 BPM, in steps of 0.05, it adds up the strength at one to six times that tempo’s beat frequency. A candidate that is half the true beat scores low, because half of its lines fall on empty space. The score is multiplied by a broad prior centred on 100 BPM. This prior only decides between a tempo and its exact double. The top peak is then refined with a parabola.

Tempo is measured in beats per minute, and the period in seconds is 60 divided by BPM. So 120 BPM means one beat every 0.5 seconds. The range is limited to 60 to 200 BPM. A true 60 BPM click track is reported as 120, and its half, 60, appears as Half time. The method assumes one steady tempo across the analysed span. Live music with rubato gives a smeared peak, so use the section boxes for songs that change tempo.

How to find the key of a song#

To find the key of a song, the tool builds a chromagram, which is a 12-value profile of how much each pitch class is present. It uses 8192-point frames, about 0.74 seconds long, taken every 4096 samples. It finds spectral peaks between 65 and 2100 Hz and interpolates each one to sharpen its pitch. Frames that are quieter than 2 percent of the loudest are skipped, and each remaining frame is normalised so its values sum to 1.

Tuning matters, so the tool estimates how far the peaks sit from the nearest semitone and corrects for that offset. A track tuned 30 cents sharp still reads as G major in the tests. The profile is then compared with the Krumhansl-Kessler major and minor profiles (Krumhansl and Kessler, 1982, Psychological Review 89(4), 334-368), rotated to all twelve tonics. Each comparison is a Pearson correlation, r. The best key and two runners-up are shown with their r values.

If the best r is below 0.5, the page says “No clear key found”. Major keys and their relative minors share most of their notes, so they are easily confused. Modulating songs and percussive audio also give weak results. The Camelot code, such as 8B for C major and 8A for A minor, is computed from the circle of fifths. It is a notation used by DJ software, not a standard of music theory.

What does the confidence level mean?#

The confidence level shows how much taller the best peak is than the average of the whole tempo curve. It is calculated as (peak divided by average, minus 1.5), divided by 4, and limited to a range of 0 to 1. A value of 0.66 or more is High, 0.33 or more is Medium, and anything lower is Low. A Low result comes with the message “no steady beat found, try tapping”.

Confidence depends on the music, not only on the file. White noise gives a confidence below 0.35 in the tests, which is what you want for input with no beat. Click tracks give High results; music with a strong, steady beat gives a taller peak than music played freely. If you see Low, check the section you chose, or tap the tempo yourself.

Frequently asked questions

Is my audio file uploaded?

No. The file is read in your browser with File.arrayBuffer() and analysed by a Web Worker. After you choose a file, the only network requests are the two script files the worker loads from the same site.

Is it free and does it need an account?

Yes, the tool is free and needs no sign-up. It sets no cookies and uses no browser storage.

Can I use it on a phone?

Yes. Open the page in your phone’s browser and choose a song from the phone’s files. Which formats work depends on what that browser can play, and the file stays on the phone.

Why does the result show double or half the tempo I counted?

Half time and Double time appear next to the main answer, so you can pick the one that matches the beat you hear. The tool also reports a 60 BPM click track as 120 BPM, so if your count is half the answer, check the Half time value.

What if the key result says "No clear key found"?

This means the best match is below r = 0.5. Try a section with a clear chord progression, or accept that the track may be percussive, atonal or changing key.

Why does the tempo change when I analyse a different section?

The tool assumes one steady tempo across the span it analyses. If the song changes tempo, analyse each part separately with the start and length boxes.

Which audio formats work?

Any format your browser can decode works. This includes MP3, WAV, M4A and AAC, OGG, FLAC and Opus, depending on the browser.