Convert audio samples to seconds or milliseconds at any sample rate, or turn a duration back into a sample count, with clock time and PCM data size.

Convert a frame count or total interleaved sample values to time.

Changing basis reinterprets the entered count; it does not convert the number.

Fractional counts are timing equivalents, not complete sample frames.

Default: 44.1 kHz per channel.

Default: 2 channels. Used for interleaved counts and PCM size.

PCM size settings
Uses stored container bits: packed 16/24-bit or 32-bit sample data. Excludes headers and compression.

Samples To Seconds Formula

The following formula calculates block duration in seconds from the number of frames, or samples per channel.

S = N / R

Variables:

  • S is the duration of the audio clip in seconds (s)
  • N is the number of frames, or samples per channel; divide a total interleaved sample-value count by the channel count first.
  • R is the per-channel frame rate in Hz (frames per second); multiply a rate in kHz by 1,000.

Divide the frame count per channel by the rate in Hz to obtain seconds. In the reverse direction, frames = seconds ร— rate; total interleaved sample values = frames ร— channels. Stored PCM sample-data bytes = frames ร— channels ร— stored bits per sample รท 8. This excludes headers, metadata, padding and compression; 24 valid bits stored in a 32-bit container use 32 stored bits.

Samples to Seconds Conversion (Fs = 44.1 kHz)
Samples Seconds (s)
640.001
1280.003
2560.006
4410.010
5120.012
10000.023
10240.023
20480.046
40960.093
50000.113
81920.186
100000.227
163840.372
220500.500
327680.743
441001.000
655361.486
882002.000
1323003.000
1764004.000
* Rounded to 3 decimals. Assumes sample rate Fs = 44,100 Hz (1 sample โ‰ˆ 22.676 ฮผs). Formula: seconds = samples รท 44,100.

What is Samples To Seconds?

Samples to Seconds is a conversion method used in digital audio processing. It refers to the process of converting the number of samples in a digital audio file to the equivalent duration in seconds. This conversion is crucial in audio editing and processing as it helps in determining the exact length of an audio clip. The conversion rate depends on the sample rate of the audio file, which is typically measured in samples per second (Hz). For example, at 44.1 kHz (44,100 frames per second), 44,100 frames per channel span 1 second. A stereo interleaved block for that second contains 88,200 sample values.

How to Calculate Samples To Seconds?

The following steps outline how to calculate the Samples To Seconds.


  1. First, determine the frame count per channel (N). For a total interleaved count, divide by the channel count.
  2. Next, determine the per-channel sample rate (R) in Hz; 44.1 kHz means 44,100 Hz.
  3. Next, gather the formula from above: S = N / R.
  4. Finally, calculate the duration of the audio clip in seconds (S).
  5. After inserting the variables and calculating the result, check your answer with the calculator above.

Example Problem : 

Use the following variables as an example problem to test your knowledge.

frames / samples per channel (N) = 5000

per-channel sample rate (R) = 44,100 Hz; S = 5000 รท 44,100 โ‰ˆ 0.113379 seconds.