The Mach-Zehnder interferometric setup quantitatively characterizing the wave-particle duality implements in fact a joint measurement of two unsharp observables. We present a necessary and sufficient condition for such a pair of unsharp observables to be jointly measurable. The condition is shown to be equivalent to a duality inequality, which for the optimal strategy of extracting the which-path information is more stringent than the Jaeger-Shimony-Vaidman-Englert inequality.