We consider the situation when the signal propagating through each arm of an interferometer has a complicated multi-mode structure. We find the relation between the particle-entanglement and the possibility to surpass the shot-noise limit of the phase estimation. Our results are general---they apply to pure and mixed states of identical and distinguishable particles (or combinations of both), for a fixed and fluctuating number of particles. We also show that the method for detecting the entanglement often used in two-mode system can give misleading results when applied to the multi-mode case.