The structure, magnetic and magnetocaloric properties of Nd2Fe17−xCox (x = 0; 1; 2; 3, 4) and Gd2Fe17-xCux (x = 0, 0.5, 1 and 1.5) solid solutions have been studied. For this purpose, these samples were prepared by arc melting and subsequent annealing at 1073 K for a 7 days. Structural analysis by Rietveld method on X-ray diffraction (XRD) have determined that these alloys crystallize in the rhombohedral Th2Zn17-type structure (Space group R¯3 m) and the substitution of iron by nickel and copper leads to a decrease in the unit cell volume. The Curie temperature (TC) of the prepared samples depends on the nickel and copper content. Based on the Arrott plot, these analyses show that Nd2Fe17-xCox exhibits a second-order ferromagnetic to paramagnetic phase transition around the Curie temperature. These curves were also used to determine the magnetic entropy change ∆SMax and the relative cooling power. For an applied field of 1.5 T, ∆SMax increase from 3.35 J/kg. K for x = 0 to 5.83 J/kg. K for x = 2. In addition the RCP increases monotonously. This is due to an important temperature range for the magnetic phase transition, contributing to a large ∆SMax shape. Gd2Fe17-xCux solid solution has a reduction of the ferromagnetic phase transition temperature from 475 K (for x = 0) to 460 K (for x = 1.5) is due to the substitution of the magnetic element (Fe) by non-magnetic atoms (Cu). The magnetocaloric effect was determined in the vicinity of the Curie temperature TC. By increasing the Cu content, an increase in the values of magnetic entropy (∆SMax) in a low applied field is observed.