# Is there a way to convert a time delay into a sample delay?

I have been given a time delay of a signal and the sampling frequency, however, I am trying to calculate the delay in samples. My logic is: delay frequency divided by sampling frequency, however, this doesn't give integer answers, which is what I expected as this is the time at which each sample is taken. However, if I do sampling frequency divided by delay frequency it gives integers for the sampling delay, but this doesn't make sense to me.

Could anyone please explain the conversion between delay in time and delay in samples.

Thank you.

• Why are you talking about "delay frequency"? You have a delay (seconds) and a sampling frequency (samples / seconds). Just look at the units.
– Mat
Commented Nov 15, 2021 at 23:07
• So it's the sampling frequency divided by the delay time? @Mat Commented Nov 15, 2021 at 23:08
• What are the units for what you propose?
– Mat
Commented Nov 15, 2021 at 23:14
• sampling frequency is in Hz and time delay in seconds Commented Nov 15, 2021 at 23:15