I am struggling with units in dB on the vertical axis (y-axis) in the calculated spectrum in Audacity (say for a rectangular window). In my opinion the relevant formula for calculation is
20 * log10( [(2*Delta^2/T)|FFT|^2]^1/2) where Delta is the sampling interval (e.g. Delta = 1/fs = 1/44100) and T is the time of the segment of the FFT.
(I know that the real formula is more complicated due to averaging of neighbouring segments and windows etc).
My concern/question is about the constant since I am not able to reproduce the results by (say) MATLAB. I am obtaining the same shape of the spectrum but about 22 dB larger than Audacity (with 44100Hz and size 4096)
So my question is only about the norming 2Delta^2/T = 2/(fsN) (in this representation fs is the sampling rate, eg fs=44100Hz, and N is the number of data, eg N=4096).
Can please someone let me know what constant has been used in Audacity. Thank you very much. Kind regards.