It is shown that in the framework of analytical confinement, when quark and gluon propagators are induced by an vacuum selfdual gluon field with constant strength, the masses of meson with quantum numbers $Q=J^P$ and quark constituents $m_1,~m_2$ are described with reasonable accuracy by the formula $$ M_Q(m_1,m_2)=(m_1+m_2)[1+{A_Qover (m_1^2+1.13m_1m_2+m_2^2)^{0.625}}],$$ where a constant positive parameter $A_Q$ is unique for all mesons with quantum numbers $Q=J^P$. Sets of mesons $J^P=0^-,~1^-,~0^+,~1^+,~2^+,~3^-$ and different flavors constituent quarks $(u=d,~s,~,c~,b)$ are considered.