How it works
Length in seconds is beats × (60 ÷ BPM), where the beat is defined by the time signature's lower number: an x/4 signature counts quarter notes, and an x/8 signature halves that to count eighth notes. Beats come from bars × the upper number, and the sample count is seconds × sample rate, rounded to the nearest whole sample. At 120 BPM in 4/4 that makes four bars exactly 8.0000 seconds, 8000 ms, and 384,000 samples at 48 kHz.
BPM and the bar count do the heavy lifting, with preset buttons for 1, 2, 4, 8, 16 and 32 bars and a bars field that accepts quarter-bar steps. The Bars and Beats fields stay synchronised in whichever direction you last typed, so editing beats back-calculates the bars. Sample rate, offered at 44.1, 48, 88.2, 96 and 192 kHz, changes only the sample column — pick the one your session actually runs at before trimming anything.
In 6/8, 9/8 and 12/8 the calculator counts eighth notes, which means a 12/8 bar at 120 BPM is twelve eighths of 0.25 seconds, or 3 seconds. If your DAW instead shows tempo in dotted-quarter pulses, you will be out by a factor of three. Everything also assumes one fixed tempo with no swing or tempo automation, and sample counts are rounded, so a tempo that does not divide evenly into the sample rate leaves a fractional sample at the loop point.
Frequently asked questions
How long is 4 bars at 120 BPM? +
Exactly 8 seconds in 4/4, which is 8000 ms and 384,000 samples at 48 kHz. Because 120 BPM gives a round half-second beat, every power-of-two bar count at that tempo lands on a whole number of seconds, which makes it a convenient tempo for loops.
How many samples is a one-bar loop at 140 BPM? +
At 44.1 kHz it is exactly 75,600 samples. At 48 kHz the same bar works out at 82,285.7, which the tool rounds to 82,286, so a trimmed loop is a fraction of a sample short and will drift very slightly over many repeats.
Does changing the sample rate change the loop length? +
Not in time, only in samples. The seconds and milliseconds figures depend purely on BPM, time signature and bar count. The sample column exists because samplers and audio editors often want a length in samples rather than a length in time.
How does the calculator handle 6/8 time? +
It treats the beat as an eighth note, so BPM is counted in eighths and a 6/8 bar is six of them. If you think of 6/8 as two dotted-quarter pulses per bar, group the eighths in threes, or enter three times your dotted-quarter tempo.
Can I calculate half or quarter bars? +
Yes. The Bars field steps in 0.25 and accepts any fractional value, and the reference table starts at a quarter bar. Alternatively type directly into the Beats field, and the bar count is recalculated for you by dividing by the time signature's upper number.
Bars to samples, and why it must be exact
Loop length in samples is bars × beats per bar × (60 ÷ BPM) × sample rate. The reason to work in samples rather than milliseconds is that a loop trimmed to the nearest millisecond is not sample-accurate, and a loop that is one sample long or short produces a click at every repeat and drifts out of sync over a long arrangement.
The sample rate must be the session's. A loop cut at 44.1 kHz and used in a 48 kHz session is the wrong length as well as the wrong pitch.
When the arithmetic does not land whole
Not every tempo produces a whole number of samples per bar, and the remainder has to go somewhere. At most tempos the rounding is inaudible in a single loop and accumulates across many repeats.
Tempos that divide cleanly into the sample rate avoid it entirely, which is one practical argument for choosing round tempos when a project is built heavily on loops. Where the tempo is fixed by something else, letting the DAW handle loop boundaries rather than rendering fixed-length audio sidesteps the problem.