We theoretically compute the coupling constant C between two emission modes of an extended cavity laser with a multiple quantum-well active layer. We use an optimized Monte Carlo model based on the Markov chain that describes the elementary events of carriers and photons over time. This model allows us to evaluate the influence on C of the transition from a class A laser to a class B laser and illustrates that the best stability of dual-mode lasers is obtained with the former. In addition, an extension of the model makes it possible to evaluate the influence of different mode profiles in the cavity as well as the spatial diffusion of the carriers and/or the inhomogeneity of the temperature. These results are in very good agreement with previous experimental results, showing the independence of C with respect to the beating frequency and its evolution versus the spatial mode splitting in the gain medium.