  The violation of the Mermin inequality (MI) for multipartite quantum states
guarantees the existence of nonlocality between either few or all parties. The
detection of optimal MI violation is fundamentally important, but current
methods only involve numerical optimizations, thus hard to find even for
three-qubit states. In this paper, we provide a simple and elegant analytical
method to achieve the upper bound of Mermin operator for arbitrary three-qubit
states. Also, the necessary and sufficient conditions for the tightness of the
bound for some class of tri-partite states has been stated. Finally, we suggest
an extension of this result for up to n qubits.
