Beat Grid Calculator
Convert a beat number into its exact sample position within an audio file at a given BPM and sample rate. Indispensable when writing DJ software, DAW plugins, or beat-synced audio engines.
About this calculator
A beat grid maps musical time (beats and bars) to absolute sample positions in a digital audio file. The formula is: Sample Position = (Beat Number × 60 × Sample Rate) / BPM. Here, 60 converts BPM (beats per minute) into beats per second, and multiplying by the sample rate (in Hz, i.e. samples per second) gives the number of samples that have elapsed by the time the desired beat arrives. For example, at 120 BPM with a 44100 Hz sample rate, each beat spans exactly 22050 samples. Beat grids are critical for accurate loop quantisation, warp markers, and sync features in software like Serato, Rekordbox, and Ableton Live. Any drift in the BPM estimate causes sample positions to accumulate error, which is why precise grid calculation matters.
How to use
Say you are working with a track at 128 BPM, a sample rate of 44100 Hz, and you need the sample position of beat 16. Enter 128 in Track BPM, 16 in Beat Number, and 44100 in Sample Rate. The formula gives: (16 × 60 × 44100) / 128 = 42,336,000 / 128 = 330,750 samples. Dividing by the sample rate confirms the time: 330,750 / 44100 ≈ 7.5 seconds — exactly what you'd expect for 16 beats at 128 BPM (16 × 60/128 = 7.5 s).
Frequently asked questions
Why does beat grid accuracy matter when setting up DJ software?
Even a tiny BPM error compounds across hundreds of beats, causing the grid to drift visibly out of alignment with the audio waveform. This makes loop points land on the wrong transient, sync features stutter, and auto-mix transitions sound sloppy. Professional DJ software like Rekordbox and Serato allow manual beat grid editing precisely because automatic BPM detection is imperfect. Calculating exact sample positions mathematically lets you verify or hard-code grid points in custom software without relying on potentially inaccurate detection algorithms.
What sample rate should I use when calculating beat grid positions for music production?
The two most common sample rates in music production are 44100 Hz (CD standard, widely used in DJ software) and 48000 Hz (broadcast and video standard). If your project or exported audio file uses 48000 Hz, you must enter that value to get correct sample positions — using the wrong rate shifts every beat marker proportionally. High-resolution projects at 88200 or 96000 Hz simply double the sample counts. Always match the sample rate to the actual audio file rather than your DAW's project setting, since exported files are sometimes down-sampled.
How do I convert a sample position back into a timestamp in seconds?
Dividing the sample position by the sample rate gives you the elapsed time in seconds: Time (s) = Sample Position / Sample Rate. For example, sample 330,750 at 44100 Hz equals 330,750 / 44100 = 7.5 seconds. To convert to minutes and seconds, divide the total seconds by 60 for the minutes component and take the remainder as seconds. This reverse calculation is useful for displaying human-readable timestamps in custom audio players or verifying that your beat grid aligns with the visible waveform timeline.