Mach-Zehnder interferometer is a common device in quantum phase estimation and the photon losses in it are an important issue for achieving a high phase accuracy. Here we thoroughly discuss the precision limit of the phase in the Mach-Zehnder interferometer with a coherent state and a superposition of coherent states as input states. By providing a general analytical expression of quantum Fisher information, the phase-matching condition and optimal initial parity are given. Especially, in the photon loss scenario, the sensitivity behaviors are analyzed and specific strategies are provided to restore the phase accuracies for symmetric and asymmetric losses.