The in-plane nearest-neighbor Heisenberg magnetic coupling constant, J, of La 2 CuO 4 , Nd 2 CuO 4 , Sr 2 CuO 2 Cl 2 , YBa 2 Cu 3 O 6 , and undoped HgBa 2 Ca n21 Cu n O 2n121d (n 1, 2, 3) is calculated from accurate ab initio configuration interaction calculations. For the first four compounds, the theoretical J values are in quantitative agreement with experiment. For the Hg-based compounds the predicted values are 2135 meV (n 1) and ϳ2160 meV (n 2, 3), the latter being much larger than in previous cases and, for n 3, increasing with pressure. Nevertheless, the physics governing J in all these layered cuprates appears to be the same. Moreover, calculations suggest a possible relationship between J and T c . PACS numbers: 74.25.Jb, 74.25.Ha, 75.30.Et More than ten years have passed since the discovery of the high-T c superconductivity in several cuprate compounds and, up to now, there has been no agreement on a complete theory capable of explaining their anomalous physical properties [1]. The layered crystal structure, the strong antiferromagnetic coupling between neighbor Cu 21 ions in these layers, and the strongly correlated nature of their electronic structure have been pointed out to play a very important role in the fundamental mechanisms of superconductivity [1,2]. The high-T c superconductors are produced by moderate doping of "parent compounds" such as La 2 CuO 4 , Nd 2 CuO 4 , or YBa 2 Cu 3 O 6 . It is widely accepted that proximity to the insulating phase and the interaction of dopant carriers with magnetic degrees of freedom are fundamental aspects for the existence of high-T c superconductivity. Recent theories strongly suggest that magnetic coupling is at the very origin of the superconducting state [2]. Thus, the magnetic coupling constants defining the magnetic structure of these compounds are key magnitudes in establishing trends and theories based on model Hamiltonians.Recently, several families of layered cuprates, containing Bi, Tl, or Hg, have been synthesized. The HgBa 2 Ca n21 Cu n O 2n121d (n 1, 2, 3) family [3][4][5] includes HgBa 2 Ca 2 Cu 3 O 81d , the compound with the highest transition temperature observed to date (133 K at ambient pressure and 164 K under 31 GPa) [4,6,7]. The difficult synthesis and the layered structure of those materials limits the capability of obtaining pure crystals large enough to perform accurate measurements of their magnetic properties. This restricts the theoretical understanding due to the difficulty to obtain reliable estimates of the model Hamiltonian parameters. Modern theoretical approaches to electronic structure could provide accurate values of these parameters, such as the nearest-neighbor Heisenberg magnetic coupling constant J, thus providing a more detailed description of these materials.Unfortunately, because of the strong correlated nature of the electronic structure and the antiferromagnetic insulating character of these cuprates, band structure calculations based on the local density approximation (LDA) or on the generalized gradient app...