The Fe 5 PB 2 compound offers tunable magnetic properties via the possibility of various combinations of substitutions on the Fe and P-sites. Here, we present a combined computational and experimental study of the magnetic properties of (Fe 1−x Cox) 5 PB 2 . Computationally, we are able to explore the full concentration range, while the real samples were only obtained for 0 ≤ x ≤ 0.7. The calculated magnetic moments, Curie temperatures, and magnetocrystalline anisotropy energies (MAEs) are found to decrease with increasing Co concentration. Co substitution allows for tuning the Curie temperature in a wide range of values, from about six hundred to zero kelvins. As the MAE depends on the electronic structure in the vicinity of Fermi energy, the geometry of the Fermi surface of Fe 5 PB 2 and the k-resolved contributions to the MAE are discussed. Low temperature measurements of an effective anisotropy constant for a series of (Fe 1−x Cox) 5 PB 2 samples determined the highest value of 0.94 MJ m −3 for the terminal Fe 5 PB 2 composition, which then decreases with increasing Co concentration, thus confirming the computational result that Co alloying of Fe 5 PB 2 is not a good strategy to increase the MAE of the system. However, the relativistic version of the fixed spin moment method reveals that a reduction in the magnetic moment of Fe 5 PB 2 , by about 25%, produces a fourfold increase of the MAE. Furthermore, calculations for (Fe 0.95 X 0.05 ) 5 PB 2 (X = 5d element) indicate that 5% doping of Fe 5 PB 2 with W or Re should double the MAE. These are results of high interest for, e.g., permanent magnet applications, where a large MAE is crucial.