Production, Synthesis, and Audio Math
How long is this many samples?
Declare a sample rate and either a sample count or a duration in milliseconds. This tool converts in either direction. A duration-first result keeps any fractional sample count visible rather than silently rounding it away, since that fraction can matter for exact alignment work.
Answer
Want to learn more? Frequency, Sampling, Nyquist, and Spectra
Understand
A sample rate states how many discrete samples represent one second of audio, so converting between a sample count and a duration is simple division or multiplication by that rate. The fractional part matters more than it might seem: a plugin's stated latency or a sample-accurate edit point often lands between whole samples, and rounding too early can compound into an audible misalignment over many operations.
Worked examples
At 48,000 Hz, exactly 48 samples last 1 millisecond. Converting a duration to a sample count and back to a duration always returns the original duration, confirming the two directions are true inverses of each other at any sample rate.
Method and limitations
Milliseconds equal 1000 times the sample count divided by the sample rate; the inverse multiplies milliseconds by the sample rate and divides by 1000. This tool shows the exact (possibly fractional) sample count when converting from a duration, and only rounds to a whole sample index when that specific use case is explicitly requested, since a duration conversion and a discrete sample-index lookup are genuinely different questions with different correct answers.
A higher sample rate packs more samples into the same duration, so the same millisecond value corresponds to a larger sample count at 192,000 Hz than at 44,100 Hz, roughly 4.35 times as many; this is exactly why a buffer size or plugin latency figure stated in samples needs the project's own sample rate to compare meaningfully against one stated in milliseconds.
A common source of confusion is comparing a sample count from one project's sample rate against a millisecond figure computed at another; the same 512 samples represents about 11.6 ms at 44,100 Hz but only about 2.7 ms at 192,000 Hz, a meaningfully different amount of actual time despite the identical sample count. Always converting through this shared rate keeps such comparisons honest.