Recent investigations in R2Fe17 intermetallic compounds have evidenced that these materials present a moderate magnetocaloric effect (MCE) near room temperature. A series of accurate magnetization measurements was carried out to show that the value of the demagnetizing factor has a significant influence on the absolute MCE value of Er2Fe17. In addition, the critical exponents determined from heat capacity and magnetization measurements allow us to describe the field dependence of the observed MCE around the Curie temperature.