Numerical micromagnetic calculations using finite-element techniques allow a quantitative treatment of the correlation between the microstructure and the basic magnetic properties of two-phase permanent magnets such as the remanence, the coercive field and the maximum energy product. For the investigation of (A) the role of the amount of the soft magnetic phase, and (B) the effect of grain shape, realistic three-dimensional grain arrangements have been used. The numerical results show that both short-range exchange and long-range magnetostatic interactions determine the magnetic properties. The optimal microstructure of an isotropic nanocrystalline permanent magnet was found to consist of soft magnetic particles with a large spontaneous magnetization embedded between hard magnetic grains. Exchange interactions than enhance the remanence of isotropic, composite magnets of Nd 2Fe 14B and α-Fe by about 60%. Because of exchange hardening the soft magnetic phase can be increased up to 50% without a significant loss of coercivity. A uniform grain structure suppresses strong demagnetizing fields and this increases coercivity by 30% as compared with irregular shaped particles.