samples to ms
Samples to Milliseconds Calculator guide
Audio buffers, latency readouts, and editor selections often count frames instead of time. Enter the number of samples per channel and the sample rate of the device, file, or timeline that produced that count.
Play the instrument ↑- Example
- At 48,000 Hz, 480 samples take exactly 10 ms and 128 samples take about 2.666667 ms. At 44,100 Hz, 441 samples also take exactly 10 ms. A zero-length selection takes zero time.
Formula and units
Milliseconds = samples ÷ sample rate × 1,000. For multichannel audio, one frame contains a simultaneous sample for each channel. Use frame count or samples per channel; multiplying by the channel count inflates the answer.
Worked examples
At 48,000 Hz, 480 samples take exactly 10 ms and 128 samples take about 2.666667 ms. At 44,100 Hz, 441 samples also take exactly 10 ms. A zero-length selection takes zero time.
How to use the result
For driver latency, a buffer duration is one component of the signal path. Input and output buffering, converters, and plug-ins can add delay. Compare the calculation with a measured round trip when synchronizing recorded material.
BPM to Milliseconds Calculator → · GestureSynth music theory tools →
Translate a buffer size into a delay budget
An audio interface set to 128 samples at 48 kHz spends about 2.667 ms filling one buffer. A path with one comparable input buffer and one output buffer would account for about 5.333 ms in buffering alone. The observed round trip can be larger because converters, operating system buffering, plug-in lookahead, and safety offsets add time. A loopback measurement is the better source for aligning a recorded transient. Use the buffer conversion to understand why changing the driver setting affects the delay.
Compare 256 samples at 48 kHz with 256 at 96 kHz. The same count goes from about 5.333 ms to about 2.667 ms. Moving to the higher sample rate increases how many frames the device processes each second. An equivalent time window at 96 kHz needs twice the frame count. This explains why copying a buffer number between projects does not necessarily carry over its latency.
Work from an editor selection or an offset
In a 44.1 kHz waveform view, a selection starts at frame 22,050 and ends at frame 24,255 using an end-exclusive range. Subtract the start index from the end index to obtain 2,205 frames. Enter that difference and 44,100 Hz for a 50 ms selection. Use the duration field if your editor already computes frame count, especially if it treats the final marker as inclusive. A selection crossing a format or rate conversion boundary must use the timebase of the editor that produced the positions.
If a recorded click consistently lands 960 frames later than its reference at 48 kHz, the discrepancy is 20 ms. Keep the direction in your project notes. The calculator converts the magnitude, and the timeline operation determines whether you move the recorded material earlier or later. For phase alignment, retain the original frame count so the DAW can apply the exact offset without rounding milliseconds back to a different sample.
Avoid counting both stereo channels as elapsed time
Interleaved stereo alternates left and right sample values in memory. A buffer with 960 sample values contains 480 frames if every frame has two values. At 48 kHz that buffer is 10 ms long. The same number of interleaved values in a mono file would cover 20 ms. Read the field label in the source tool, since “sample count” sometimes means stored values and sometimes means frames.
For video alignment, keep the audio frame count separate from video frames. An audio count of 2,000 at 48 kHz is about 41.667 ms, which is one frame only at 24 video frames per second. At 25 fps a frame is 40 ms, and the required audio sample count is 1,920.
Answers before you play
Common questions
Which sample rate should I enter after resampling?
Use the rate that applies to the sample count you entered. If you counted frames in the exported file, use that file’s sample rate.
Why does a single frame give a fractional millisecond?
Even a low 8 kHz rate produces eight frames each millisecond. At 48 kHz one frame takes about 0.020833 ms. Small decimals are normal and can matter when aligning transients.
How do I turn milliseconds back into whole samples?
Multiply milliseconds by the sample rate and divide by 1,000. Round to a whole sample if the destination requires an integer, and keep the same rate in both directions.
Is 48 kHz entered as 48 or 48,000?
Enter 48000 because the field expects hertz. A kilohertz is one thousand hertz. At 48 kHz, 48 samples correspond to one millisecond.