We investigated the structural, elastic, vibrational, and electronic properties of the Nb5Si2B compound combining density functional theory (DFT) calculations and experimental methods. We compared our results with the parent compound Nb5Si3 with two non-equivalent Si sites namely Si(4a) and Si(8h). The analysis of elastic constants and phonon spectra indicate that Nb5Si2B is respectively mechanically and dynamically stable. Based on the phonon calculation we evaluate the theoretical constant volume lattice specific heat (CV) for different site occupancies and compare it with experimental specific heat (Cp) measurements. We found an excellent agreement between theoretical and experimental results for Nb5Si2B with the B at the Si(8h) site, which agrees with the calculated formation energy. In addition, we also performed DFT calculations aimed at showing and comparing the total DOS near the Fermi level (EF) for Nb5Si3 and Nb5Si2B. The XPS valence band (VB) of the Nb5Si2B is largely dominated by two characteristic peaks at − 8.7 and − 1.7 eV, respectively. Based on DFT calculations, it follows that the main sharp peak at − 1.7 eV comes as a contribution from Nb 4d states, while the smaller and broader one located at − 8.7 eV results mainly from Si 3s states weakly hybridized with Nb 4d states. In this connection, the majority contribution in the binding energy range from − 12 eV to the EF comes from Nb 4d states, while the contribution from Si and B atoms is very small in this region. The core levels of Nb 3d, Si 2s, 2p, and B 1s were also identified using the XPS technique.