My input numbers are close to 10, here is a sample of some:


I am using this PHP library thinkingmik/FastFourierTransformation

My peak numbers in response are about 500. A control which was done using another tool is 1-1.5

FFT is well over my head, so I am trying to read this library to get a bit of an idea, but can't figure this out. The interesting thing is the client says the chart seems to be correct, just numerical values are wrong.

  • 4
    $\begingroup$ Have you looked at the formula for the DFT? (The FFT is an algorithm that computes the DFT efficiently...so I would start with that and the answer should be very clear to you). And for your client just divide the answer by N where N is the length of the FFT and things should be as you expect. This is equivalent to averaging without doing the final divide. Same thing. $\endgroup$ Feb 7, 2020 at 14:49

1 Answer 1


As pointed out by Dan Boschen in a comment, these number aren't really surprising. Usually the DFT is defined as

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/N}\tag{1}$$

where $x[n]$ is the input sequence and $N$ is the DFT length. So bin zero, i.e., $X[0]$, is just the average value of your input sequence multiplied by the DFT length. The maximum value of $|X[k]|$ can be as large as the maximum value of $|x[n]|$ multiplied by the DFT length.

  • $\begingroup$ You are right, I guess Dan Boschen had the right answer, but he marked as a comment, so I could not mark it as accepted. I thank you both for the details and support. Thanks @danboschen and matt-l $\endgroup$
    – TDawg
    Feb 7, 2020 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.