Audio Buffer Size Calculator
A buffer of 256 samples at 48,000 Hz lasts about 5.33 ms.
Quick answer: Divide the buffer size by the sample rate, then multiply by 1,000. For example, 256 samples at 48,000 Hz is 5.333 ms, 128 samples at 44,100 Hz is 2.902 ms and 512 samples at 96,000 Hz is 5.333 ms.
The audio buffer size formula
Buffer length in milliseconds equals the buffer size in samples divided by the sample rate in hertz, times 1,000.
The sample rate says how many samples pass each second.
Take 256 samples at 48,000 Hz. 256 ÷ 48,000 × 1,000 gives 5.333 ms.
Take 128 samples at 44,100 Hz. 128 ÷ 44,100 × 1,000 gives 2.902 ms.
Why a buffer adds delay
Audio latency is the time from when a signal enters a system until it leaves. It comes from converters, drivers, the sample rate, the buffer size and any delay in effects (MathWorks: Measure audio latency).
A buffer holds a block of samples, so its length in time is the number of samples divided by the samples per second.
How to convert audio buffer size step by step
- Read the buffer size in samples from your audio settings.
- Read the sample rate in hertz.
- Divide the samples by the rate and multiply by 1,000.
- Read how many buffers pass each second in the last column.
Example 1: 256 samples at 48,000 Hz
- Start with 256 samples at 48,000 Hz.
- 256 ÷ 48,000 × 1,000 = 5.333.
- The buffer length is 5.333 ms.
256 samples at 48,000 Hz = 5.333 ms
Example 2: 128 samples at 44,100 Hz
- Start with 128 samples at 44,100 Hz.
- 128 ÷ 44,100 × 1,000 = 2.902.
- The buffer length is 2.902 ms.
128 samples at 44,100 Hz = 2.902 ms
Example 3: 512 samples at 96,000 Hz
- Start with 512 samples at 96,000 Hz.
- 512 ÷ 96,000 × 1,000 = 5.333.
- The buffer length is 5.333 ms.
512 samples at 96,000 Hz = 5.333 ms
The three examples below use common sizes.
Each one shows the sum in full.
audio buffer size conversion table
| Buffer and sample rate | Buffer length (ms) | Buffers per second |
|---|---|---|
| 32 samples at 48,000 Hz | 0.6667 ms | 1,500 per second |
| 64 samples at 48,000 Hz | 1.333 ms | 750 per second |
| 128 samples at 48,000 Hz | 2.667 ms | 375 per second |
| 256 samples at 48,000 Hz | 5.333 ms | 187.5 per second |
| 512 samples at 48,000 Hz | 10.667 ms | 93.75 per second |
| 1,024 samples at 48,000 Hz | 21.333 ms | 46.875 per second |
| 128 samples at 44,100 Hz | 2.902 ms | 344.53 per second |
| 256 samples at 44,100 Hz | 5.805 ms | 172.27 per second |
| 512 samples at 44,100 Hz | 11.61 ms | 86.133 per second |
| 64 samples at 96,000 Hz | 0.6667 ms | 1,500 per second |
| 256 samples at 96,000 Hz | 2.667 ms | 375 per second |
| 512 samples at 96,000 Hz | 5.333 ms | 187.5 per second |
The highlighted row is the default of the calculator. The last column gives per second.
A quick mental shortcut for audio buffer size
At 48,000 Hz, every 48 samples last 1 ms. So 480 samples last 10 ms.
Double the buffer and the length doubles. Double the sample rate and the length halves.
Higher rates give shorter buffers
The same number of samples lasts less time at a higher sample rate. A buffer of 256 samples lasts about 5.805 ms at 44,100 Hz, about 5.333 ms at 48,000 Hz and about 2.667 ms at 96,000 Hz.
Generally, latency is lower for higher sampling rates (MathWorks: Measure audio latency).
Worked examples
A buffer of 64 samples at 48,000 Hz lasts about 1.333 ms. A buffer of 128 samples lasts about 2.667 ms.
A buffer of 512 samples lasts about 10.67 ms, and a buffer of 1,024 samples lasts about 21.33 ms.
Choosing a size
A small buffer gives low delay but gives the computer less time to finish each block, so clicks and dropouts can happen.
A large buffer is safer for heavy projects but adds delay. Pick the smallest size that stays clean.
One buffer is not the full delay
This page gives the length of one buffer only. Converters, drivers and effects add more delay on top.
The audio latency page shows how several buffers add up.
Quick conversion answers
| Conversion | Result |
|---|---|
| 256 samples at 48,000 Hz | 5.333 ms |
| 128 samples at 44,100 Hz | 2.902 ms |
| 512 samples at 96,000 Hz | 5.333 ms |
| 64 samples at 48,000 Hz | 1.333 ms |
Where this conversion is used
Musicians and engineers check how long a buffer setting lasts.
Students link samples to time.
Common mistakes to avoid
- Forgetting the 1,000. The answer would be in seconds, not ms.
- Using the wrong sample rate. Check the project and the interface.
- Treating one buffer as total latency. Other delays add on.
- Dividing the rate by the samples without noting units. That gives buffers per second.
Related converters
More buffer sizes and rates
48 samples at 48,000 Hz is 1 ms. 96 samples at 48,000 Hz is 2 ms. 192 samples at 48,000 Hz is 4 ms.
384 samples at 48,000 Hz is 8 ms. 768 samples at 48,000 Hz is 16 ms. 2,048 samples at 48,000 Hz is 42.67 ms.
300 samples at 44,100 Hz is 6.803 ms. 1,024 samples at 96,000 Hz is 10.67 ms. 2,048 samples at 96,000 Hz is 21.33 ms.
Doubling the first number
96 samples at 48,000 Hz is 2 ms. 192 samples at 48,000 Hz is 4 ms. 384 samples at 48,000 Hz is 8 ms.
768 samples at 48,000 Hz is 16 ms. 1,536 samples at 48,000 Hz is 32 ms. 4,096 samples at 48,000 Hz is 85.33 ms.
600 samples at 44,100 Hz is 13.61 ms. 2,048 samples at 96,000 Hz is 21.33 ms. 4,096 samples at 96,000 Hz is 42.67 ms.
Frequently asked questions
How do I convert buffer size to ms?
Divide the samples by the sample rate and multiply by 1,000.
How long is 256 samples at 48 kHz?
About 5.333 ms.
How long is 64 samples at 48 kHz?
About 1.333 ms.
Does a higher sample rate lower the delay?
Yes, for the same number of samples.
Is this the full latency?
No. Converters and drivers add more.
What size should I use?
The smallest size that plays without clicks.
Sources
- MathWorks: Measure audio latency (mathworks.com)
