Loop Length Calculator

Work out exactly how long a musical loop should be in seconds and samples, based on tempo and bar count (assumes 4/4 time).

How to use the Loop Length Calculator

  1. Enter your valuesEnter the tempo, the number of bars, beats per bar and your sample rate.
  2. Read the results instantlyThe loop length appears in seconds, milliseconds and exact samples, with a check that the sample count is a whole number.
  3. Copy or sharePress the copy icon on any result card, or use Copy link to these values — the page URL stores your inputs so you can bookmark or send the exact calculation.

About the Loop Length Calculator

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.

How the Loop Length Calculator works

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.

length (s) = bars × beats-per-bar × 60 ÷ BPM

What people use it for

Sampling

Trim a loop to the exact length.

Game audio

Set loop points in samples.

DJ sets

Phrase length planning.

Scoring

Fit music to a time.

Tips for the best results

  • Odd tempos like 127.3 BPM rarely give whole-sample loops; round or time-stretch.
  • Use 48 kHz for video; the sample count changes with sample rate.
  • Combine with the Audio Loop Maker for a seamless seam.

Common problems & fixes

The loop drifts in my DAWThe sample count is not an integer; use the nearest whole number or a different tempo.
My bar count is fractionalUse 0.25-bar steps for partial bars.

Quick facts

Meters2–12 beats per bar
OutputSeconds, ms, samples, bars, beats

Frequently asked questions

How long is a 4-bar loop at 120 BPM?

8 seconds.

How many samples?

352,800 at 44.1 kHz; 384,000 at 48 kHz.

Why does exact sample length matter for loops?

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.

Your audio never leaves your device

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.

← Browse all free audio tools

User Reviews

–
No ratings yet
Write a review
Your rating *

Your email is never published. Reviews are moderated, and links aren't allowed.

What users are saying

No reviews yet

Be the first to share your experience with this tool — your feedback helps others.