remove zero padding effect crosscorrealation
so let's say the length of your FFT is $N$.  let's say that you fill half of the buffer with your signal and fill the other half with zeros.

$$ x[n] = 0 \quad \text{  for  } \tfrac{N}2 \le n &lt; N  $$

the DFT of $x[n]$ is $X[k]$.  then magnitude-square and inverse DFT:

$$ R_x[n] = \mathcal{iDFT}\bigg\{ \bigg|X[k]\bigg|^2 \bigg\} $$

in the time domain, this comes out as

$$ R_x[\ell] = \sum\limits_{n=0}^{\tfrac{N}2 - 1 - \ell} x[n] x[n+\ell] $$

we call $\ell$ the "lag" of the autocorrelation.

now suppose $x[n]$ is periodic with some period $P$ which is much smaller than $\frac{N}2$.

$$ x[n+P] = x[n] \quad \text{for } 0 \le n &lt; n+P &lt; \tfrac{N}2  $$

with a lag of zero

$$ R_x[0] = \sum\limits_{n=0}^{\tfrac{N}2 - 1} (x[n])^2 $$

which, if we apply a little bit of statistical sleight-of-hand, we might expect is $\tfrac{N}2$ times the expected power $\overline{x^2}$.  in the limit with $P \ll \tfrac{N}2 $we can sorta do this with periodic $x[n]$.

$$\begin{align} 
R_x[0] &amp;= \sum\limits_{n=0}^{\tfrac{N}2 - 1} (x[n])^2 \\
       &amp;\approx \sum\limits_{n=0}^{\tfrac{N}2 - 1} \overline{x^2} \\
       &amp;= \frac{N}2 \overline{x^2}
\end{align} $$

now with a lag of $mP$ where $m&gt;0$ is an integer: 

$$\begin{align} 
R_x[mP] &amp;= \sum\limits_{n=0}^{\tfrac{N}2 - 1 - mP} x[n] x[n+mP] \\
       &amp;= \sum\limits_{n=0}^{\tfrac{N}2 - 1 - mP} x[n] x[n] \\
       &amp;= \sum\limits_{n=0}^{\tfrac{N}2 - 1 - mP} (x[n])^2 \\
       &amp;\approx \sum\limits_{n=0}^{\tfrac{N}2-1 - mP} \overline{x^2} \\
       &amp;= \left( \frac{N}2 - mP \right) \overline{x^2} \\
\end{align} $$

eliminating $\overline{x^2}$ we have

$$ R_x[mP] \approx \left( 1 - \frac{2mP}N \right) R_x[0]  $$

for $P \ll \tfrac{N}2$.

this suggests an envelope on the autocorrelation of

$$ \big| R_x[\ell] \big| \le \left( 1 - \frac{2 |\ell|}N \right) R_x[0]  $$

this is for the rectangular window.  it can be generalized for other windows.  the envelope results from the two windows having less area in common as the lag $\ell$ increases.