An investigation of the structure and the magnetic anisotropy of R2Co15Al2 (R = Y, Ce, Pr, Nd, Sm, Gd, Tb, Dy, Ho, Er, and Tm) compounds has been performed by means of x-ray diffraction and magnetization measurements. X-ray diffraction shows the prepared compounds to be single phase, having the hexagonal Th2Ni17-type structure for R = Y, Ho, Er, and Tm and the rhombohedral Th2Zn17-type structure for R = Ce, Pr, Nd, Gd, Tb, and Dy. Except for the Ce compound, the unit-cell volumes of R2Co15Al2 compounds decrease in accordance with the lanthanide contraction. Substitution of Al for Co in R2Co17 leads to a decrease of the saturation magnetization at 1.5 K and Curie temperature. The exchange-coupling constants J(Co-Co) and J(R-Co) have been calculated by using the method based on magnetic ordering temperature. It is found that the J(R-Co) has a small dependence on the R elements and is almost not affected by the Al substitution. The Ce compound is found to exhibit an anomalous lattice parameter and magnetic characteristic, which are relative to the mixed-valence behavior of the Ce ion. X-ray diffraction measurements on magnetically aligned R2Co15Al2 powders show that the compounds with R = Pr, Nd, Gd, Tb, Dy, and Ho have an easy-plane type of magnetic anisotropy, whereas the compounds with R = Y, Ce, Sm, Er, and Tm exhibit an easy-axis type of magnetic anisotropy at room temperature. The compounds R2Co15Al 2 with R = Pr and Ho exhibit a spin-reorientation transition and the spin-reorientation temperature is found to be 531 and 431 K, respectively. A strong uniaxial anisotropy is observed in Sm2Co15Al2 compound with a magnetocrystalline anisotropy field of 84 kOe at room temperature. (C) 1999 American Institute of Physics. [S0021-8979(99)05605-4].