We present a comparison of electron-phonon interaction in NbB 2 and MgB 2 , calculated using full-potential, density-functional-based methods in P6/mmm crystal structure. Our results, described in terms of (i) electronic structure, (ii) phonon density of states F(ω), (iii) Eliashberg function α 2 F(ω), and (iv) the solutions of the isotropic Eliashberg gap equation, clearly show significant differences in the electron-phonon interaction in NbB 2 and MgB 2 . We find that the average electron-phonon coupling constant λ is equal to 0.59 for MgB 2 and 0.43 for NbB 2 , leading to superconducting transition temperatures T c at around 22K for MgB 2 and 3K for NbB 2 .