When you calculate the FFT of 2n samples, you get a complex number for each of the 2n frequency bins. These frequency bins are symmetrical around the Nyquist frequency (sample frequency / 2), or symmetrical around the origin (i.e. negative frequencies). This means that you only need half of the frequency bins (because the other half is the same).

The magnitude is the distance between these complex numbers and the origin: Magnitude(a+bi) = sqrt(a²+b²).

The way the FFT works, it scales the result by the window size (2n).

So you have to divide the results by 2n to get the actual magnitude.

However, this also includes the negative frequencies, so it will be half of what you would expect. Solution: multiply by two again.

In short: actual magnitude of result (a+bi) = sqrt(a²+b²)/n

Interpretation: if you apply a sine wave with an amplitude of 1 to the input, the magnitude of the resulting frequency bin will be one as well. (Depending on the resolution, and only if the frequency of the sine wave is a natural multiple of the frequency resolution of the FFT, otherwise, it will be smeared out across neighboring bins as well.)

Note: when you're interested in the energy of each frequency bin, or if you want to express it in dB, calculating the square root is a complete waste of resources.

What is relation between ampltude and ADC in per bin?

How can i calculate ADC in per bin?

Parseval's theorem states that the energy in the time domain is the same as the energy in the frequency domain.

However, for a discrete Fourier transform (of which the FFT is an implementation) you have to scale it by a factor of n (or 2n, if you care about negative frequencies).