milliseconds to samples calculator
Milliseconds to Samples Calculator guide
Milliseconds describe elapsed time. Sample positions describe the integer grid of an audio file or DAW. The calculator gives both the fractional position and its nearest whole sample so you can decide what to enter.
Play the instrument ↑- Input and result
- Turn a time offset into an exact sample count and the nearest whole frame at your sample rate.
Formula and units
Multiply milliseconds by the sample rate in hertz and divide by 1,000. A sample rate of 48,000 Hz means 48 sample frames every millisecond. Stereo channels share the same frame positions.
Worked examples
2.5 ms at 44,100 Hz is 110.25 samples, rounded to 110. At 48,000 Hz the same duration is exactly 120 samples. In a 96 kHz project it is 240 samples.
You measured a recorded click landing 8.1 ms behind its reference in a 48 kHz project. The exact shift is 388.8 frames, so start by moving the recording 389 samples earlier. Check the alignment on the original waveform. If you are entering an audio delay instead of moving the recording, you would delay the earlier source by the same magnitude.
Measure the offset from two known positions
If the reference transient starts at sample 12,000 and the test transient starts at 12,144, the offset is 144 frames. At 48 kHz that equals 3 ms. Enter 3 ms and confirm the inverse result before applying the shift. Then move the late event earlier and inspect whether the two transients align. Compare using the same transient feature in both signals. The initial rise and the peak may occupy different sample positions when the sources have different shapes.
Some hardware measures latency by playing a pulse through an output and recording it at an input. That measurement can include the time from both buffers and both converters. The conversion from milliseconds to samples gives the total measured offset in the project's frame units. It cannot distinguish which part came from output, input, or acoustic travel. Run separate measurements if you need to understand each part of the signal path.
Use the device's actual sample clock
A setting labeled 48 kHz is usually a nominal rate. Two devices recording independently can drift relative to one another even when both are set to that rate. A single offset measured near the start fixes that point, while a growing error later can require resampling or clock synchronization. Measure an event near the start and another near the end before applying one fixed shift to a long recording.
For a short cue, the integer result generally belongs on the target timeline. At 44.1 kHz, a request for exactly one millisecond falls between frames 44 and 45. Moving 44 frames is about 0.9977 ms, and 45 frames is about 1.0204 ms. That difference is tiny for an edit cue, but important when comparing two coherent signals. Keep the original requested time in documentation if the effect will be moved to another rate.
When building an edit list, convert each absolute time independently to avoid accumulating rounding across many small offsets. For example, repeated 2.5 ms steps at 44.1 kHz alternate between gaps of 110 and 111 frames if each boundary is rounded from its absolute position. Advancing by 110 frames every time would eventually drift away from the requested cue grid.
Answers before you play
Common questions
Can I enter a negative offset?
Enter its magnitude and apply the sign in your editor. A shift earlier on a timeline and a delay applied to the earlier signal are separate operations.
Why keep the decimal output after rounding?
It records what the time request meant at the selected sample rate. If the DAW can interpolate fractional offsets, the decimal is usable directly. If the DAW works on the integer sample grid, the rounded whole result is the editable position.
Does rounding always move a position later?
No. Rounding can move a fractional position earlier or later. In the half-frame case this calculator chooses the higher integer.
What is one sample at 48 kHz?
It is approximately 0.0208333 ms per channel. One millisecond corresponds to 48 frames.