Work out exactly how long a musical loop should be in seconds and samples, based on tempo and bar count (assumes 4/4 time).
The Loop Length Calculator tells you exactly how long a loop of N bars is at a given tempo — in seconds, milliseconds and samples — so loops line up with a grid and repeat without drift. Producers use it to trim samples to length, game audio designers to set loop points and DJs to plan phrase lengths.
The sample-count card shows whether the loop is a whole number of samples (it will repeat perfectly) or needs rounding, with the error.
Beats = bars × beats-per-bar. Length = beats × 60 ÷ BPM seconds; samples = length × sample rate. For example 4 bars of 4/4 at 120 BPM is 16 beats = 8.000 s = 352,800 samples at 44.1 kHz. At 128 BPM the same loop is 7.5 s = 330,750 samples.
Trim a loop to the exact length.
Set loop points in samples.
Phrase length planning.
Fit music to a time.
| Meters | 2–12 beats per bar |
|---|---|
| Output | Seconds, ms, samples, bars, beats |
8 seconds.
352,800 at 44.1 kHz; 384,000 at 48 kHz.
A loop that's off by even one sample from an exact bar length will drift out of time when repeated many times — producers building seamless loops need this precision.
This tool runs entirely in your browser using the Web Audio API. Nothing is uploaded, stored or shared — there is no server to send your file to, so it works offline once the page has loaded.
Be the first to share your experience with this tool — your feedback helps others.