Empirical mode decomposition (EMD) and its improved EMD-based algorithms are adaptive and nonlinear methods that decompose a nonstationary signal into several intrinsic mode functions (IMFs) through the sifting process. When the EMD-based algorithms are applied to decompose a signal polluted with noise in some regions, the noise will spread into the clean region and introduce errors in the IMFs. During the real-time computation of an EMD-based algorithm, the signal is partitioned into a series of overlapping time windows. Points outside the window are discarded, they act as an error source and the error will spread into the window. We will prove that the above two problems are mathematically identical. Due to the complex nature of the sifting iteration, a mathematical theory for the error analysis of the boundary effect is still lacking. Previous studies mainly rely on simulations, and the results show that the error seems to be confined locally near the boundary. Beginning with one sifting iteration, which is the kernel of an EMD-based method, we will theoretically analyze the boundary effects completely based on the sifting process without any approximations, and prove that the error will propagate into the interior domain and may be amplified and thus obscure the meaning of an IMF. Then, we will prove a sufficient condition for the exponential decay of the error. When the error is amplified, we propose a method to resolve this problem. Finally, numerical experiments are conducted to analyze multiple siftings and IMFs.