Each bin in the DFT output corresponds to a particular frequency. We can determine the frequency of a given bin using the following equation,
k × (sampling_rate / N) Where N is the number of samples in the input signal
Recall that the sampling rate used in our last few examples is 8Hz. This means that the frequencies of the output bins for our examples are 0Hz, 1Hz, 2Hz, 3Hz, 4Hz, 5Hz, 6Hz, and 7Hz. Play around with the following visualization to see how the bin frequencies are laid out as the number of samples in the input (N) changes.
Figure 1. Frequency Layout of DFT Bins
Sampling Rate is assumed to be 8Hz
Notice that the bins are always evenly distributed across the frequency spectrum from 0Hz up to the sampling rate. Notice too, that the bins are always harmonically related. In other words, all bin frequencies are multiples of the second bin frequency (the bin right after the DC bin). You can think of this frequency as the fundamental frequency of the DFT, and calculate it as (sampling rate / N) hertz.