Structural and magnetic properties of rare-earth iron garnets (RIG), which contain 160 atoms per unit cell, are systematically investigated for rare-earth elements varying from La to Lu (and including Y), by performing spin polarized density-functional calculations. The effects of 4f electrons (as core or as valence electrons) on the lattice constant, internal coordinates and bond lengths are found to be rather small, with these predicted structural properties agreeing rather well with available experiments. On the other hand, treating such electrons as valence electrons is essential to interpret the total magnetization measured in some RIG at low temperature, the different orientation and magnitude of the magnetizations that Fe and rare-earth ions can adopt and to also explain why some RIG have a compensation temperature while others do not. The magnetic exchange couplings and orbital-projected density of states are also reported for two representative materials, namely Gd3Fe5O12 and Nd3Fe5O12, when accounting for their 4f electrons.