Sample Loop Length Calculator
A tempo-locked loop has to be an exact length so it repeats seamlessly with no click or drift. That length depends on the tempo, how many bars and beats it spans, and the project sample rate. Enter those four values and this calculator returns the loop length in seconds, milliseconds, and audio samples, plus the value rounded to the nearest whole sample. Use it to set loop markers, trim sample files, and check that your loop lands exactly on the bar.
Loop length formula
total beats = bars * beats per bar
seconds = total beats * (60 / BPM)
samples = seconds * sample rate
milliseconds = seconds * 1000
A real audio file holds a whole number of samples, so the rounded value is what you trim to. Pick a sample count divisible by your audio block size for the cleanest loop.
Loop lengths at 120 BPM, 4/4, 44,100 Hz
- 1 bar: 2 seconds, 88,200 samples.
- 2 bars: 4 seconds, 176,400 samples.
- 4 bars: 8 seconds, 352,800 samples.
- 8 bars: 16 seconds, 705,600 samples.
- At 48,000 Hz, multiply the sample counts by 48,000 / 44,100.
Sample loop length: frequently asked questions
How long is a loop in samples?
First find the loop time in seconds: number of bars times beats per bar times (60 divided by BPM). Then multiply by the sample rate in samples per second. For example, a 4-bar 4/4 loop at 120 BPM is 8 seconds, which at 44,100 Hz is 352,800 samples.
Why does a loop need to be an exact number of samples?
A seamless loop must start and end on the same point in the bar. If the loop length is not a whole number of samples, the loop point drifts and you hear a click or timing slip. Rounding to the nearest whole sample, and ideally to a sample count divisible by your audio block size, keeps loops tight.
What sample rate should I use?
Use the project sample rate of your session. Common values are 44,100 Hz (CD and most streaming), 48,000 Hz (video and broadcast), and 96,000 Hz (high-resolution work). The sample rate is user-editable here so the figure always matches your project.
Does the loop length come out to a whole number?
Not always. At some tempos the exact sample count is fractional. This calculator shows both the exact value and the value rounded to the nearest whole sample, since a real audio file must contain a whole number of samples.
Sources and definitions
- Loop length follows from tempo arithmetic (seconds per beat = 60 / BPM) and the definition of sample rate (samples per second). These are standard definitions.
- National Institute of Standards and Technology: SI units reference (time, frequency).
Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.