The electronic structures of a (001) surface of crystalline Dy(2)Fe(14)B and Nd(2)Fe(14)B have been studied and the crystal field parameters at the rare-earth sites have been estimated by using first principles calculations. It is shown that Dy or Nd ions at the surface exhibit an in-plane magnetic anisotropy and can be nucleation sites of magnetization reversal. (C) 2011 American Institute of Physics. [doi: 10.1063/1.3553935]