Calculate audio latency from buffer size and sample rate, solve missing audio settings, or estimate sound delay by distance and medium.

Delay of one buffer only, not total round-trip latency.

Starts at 48 kHz, a common default; change it to match your interface.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
One-buffer latencyFinds the delay that one audio buffer represents, in millisecondsRequires the buffer size in samples per channel and the sample rate, which starts at 48 kHz
Buffer size from delayFinds the number of samples that fills a given delayRequires the one-buffer delay in ms or s and the sample rate
Sample rate from delayFinds the sample rate at which a buffer lasts a given delayRequires the buffer size in samples per channel and the one-buffer delay
Sound travel delayFinds the time sound takes to travel a distance one way, for aligning delay speakers or microphonesRequires the travel distance in m or ft and the medium: air at 20 °C, air at 0 °C, fresh water or steel

The sample rate field accepts Hz or kHz and suggests 44.1, 48, 96 and 192 kHz. The three buffer functions also show how far sound travels through 20 °C air in the same time, which puts a buffer delay in physical terms: 10 ms is about 3.4 m.

Audio Latency Formulas

L = N ÷ fs × 1,000
LDelay of one buffer (ms)
NBuffer size (samples per channel)
fsSample rate (Hz, samples per second)

A buffer of N samples played at fs samples per second lasts N ÷ fs seconds. Multiplying by 1,000 gives milliseconds.

One-buffer latency

The main formula applies directly. A 256-sample buffer at 48,000 Hz lasts 256 ÷ 48,000 × 1,000 = 5.33 ms, and the same buffer at 96,000 Hz lasts half as long.

Buffer sizeAt 44.1 kHzAt 48 kHzAt 96 kHz
320.73 ms0.67 ms0.33 ms
641.45 ms1.33 ms0.67 ms
1282.90 ms2.67 ms1.33 ms
2565.80 ms5.33 ms2.67 ms
51211.61 ms10.67 ms5.33 ms
102423.22 ms21.33 ms10.67 ms
204846.44 ms42.67 ms21.33 ms

Buffer size from delay

N = L × fs ÷ 1,000

A 10 ms delay at 48,000 Hz is 480 samples. The answer can be fractional or fall between the sizes a device offers, so it is a target to round to a supported setting.

Sample rate from delay

fs = N × 1,000 ÷ L

A 441-sample buffer that lasts 10 ms implies a sample rate of 44,100 Hz.

Sound travel delay

t = d ÷ v × 1,000

t is the one-way travel time in ms, d is the distance in meters and v is the speed of sound in m/s. The air options use 343 m/s at 20 °C and 331 m/s at 0 °C, which match the temperature formula for air [1]. Fresh water uses 1,480 m/s and steel uses 5,960 m/s for a longitudinal wave. A delay speaker 34.3 m from the main speakers in 20 °C air needs 34.3 ÷ 343 × 1,000 = 100 ms. Distances in feet are converted at 0.3048 m per foot.

Limits of This Estimate

  • One-buffer latency is not round-trip latency. The delay from input to output also includes the input and output buffers, the converters, the driver and any plugins, so the measured figure is always larger.
  • A delay that suits one task can be too long for another. The result is a duration, not a rating of whether monitoring or live playing will feel responsive.
  • The speed of sound in air depends on temperature [1]. The water and steel figures are round reference values that shift with temperature, composition and wave type. These estimates are based on the best available data and estimations.

Sources

  1. U.S. National Weather Service, Speed of Sound: speed of sound in air as a function of air temperature
Audio Latency Calculator screenshot