Fully relativistic calculations within the local spin density approximation and the generalized gradient approximation were performed to determine the local spin and orbital magnetic moments, as well as the magnetocrystalline anisotropy energy of Y 3 Ni 13 B 2 , Y 3 Co 13 B 2 , and Y 3 Ni 10 Co 3 B 2 compounds. A weak in-plane magnetic anisotropy is determined for Y 3 Ni 13 B 2 , under the assumption of a crystallographic-like magnetic unit cell and collinear magnetic moments. The calculations predict considerable c-axis anisotropy for Y 3 Co 13 B 2 and Y 3 Ni 10 Co 3 B 2 , but smaller than that of YCo 5 . The values of the magnetocrystalline anisotropy energy correlate well with both the magnitude of the orbital magnetic moment and the orbital magnetic moment anisotropy. The mixing between Co or Ni 3d states and B 2p states, observable at the bottom of the valence band of the 3d metal having a boron atom nearest neighbor, decreases the 3d spin and especially, the 3d orbital magnetic moments. Y 3 Ni 13 B 2 and Y 3 Ni 10 Co 3 B 2 were also investigated by powder neutron diffraction experiments, at temperatures between 1.8 and 249 K. The Co and Ni site averaged magnetic moments calculated in the mixed compound are in fair agreement with the values obtained by the refinement of the magnetic contribution to the diffraction pattern. V C 2014 AIP Publishing LLC.