UTILS.
Private by default
⏱️

Song Length — Bars ↔ Time Calculator

Convert between bars and time both ways: get a song's length from a bar count and tempo, or the number of bars that fit a target duration.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

Work out how long an arrangement runs or how many bars you need to fill a slot, converting freely in both directions. Pick a mode, enter the tempo and beats per bar, then either a bar count or a target duration — all in your browser with nothing uploaded.

The core relationship is duration (seconds) = bars × beatsPerBar × (60 ÷ BPM); one bar lasts beatsPerBar × (60 ÷ BPM) seconds. Reversed, bars = duration ÷ (beatsPerBar × 60 ÷ BPM). For example 32 bars of 4/4 at 120 BPM run 32 × 4 × 0.5 = 64 seconds, or 1:04, and 128 total beats. Time-from-bars mode prints the length as mm:ss plus raw seconds and total beats; bars-from-time mode prints the bar count (which can be fractional) and total beats.

This is ideal for arrangers, film and game composers, and producers building loops — set the tempo, then read off exactly how many bars fill a scene or how long your section will play. Results recalculate live as you edit any field.

Frequently asked questions

How is bar length calculated?
One bar lasts beatsPerBar × (60 ÷ BPM) seconds. Multiply by the number of bars for total time, or divide a target time by it to get the number of bars.
Why is my bar count a decimal?
A fixed duration rarely divides into whole bars. A result like 24.5 means your time spans twenty-four and a half bars; round to the nearest bar if you need a clean loop point.
What is 'total beats'?
It is bars × beats-per-bar — the running total of individual beats. It is useful for sample counts, click tracks and lining up events on a beat grid.
Does the time signature's lower number matter here?
No. This tool models each bar as a plain count of beats at the given BPM, so you only set beats-per-bar. For explicit note-value scaling use the Time Signature & Bar Duration calculator.

More tools