A rare earth magnet , comprising: a main phase having a composition represented by, in molar ratio, R 1 2 T 14 B, where R 1 is one or more elements selected from the group consisting of Y and rare earth elements and T is one or more transition elements mandatorily containing one or more elements selected from the group consisting of Fe, Co and Ni, and a grain boundary phase present around the main phase , wherein: the main phase has a core part and a shell part present around the core part , the molar ratio of R 2 , where R 2 is one or more elements selected from the groups consisting of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, in the shell part is higher than the molar ratio of R 2 in the core part , the rare earth magnet satisfies the following relationships, denoting the abundances of R 2 and Ce occupying 4f site of the shell part as R 2 4f and Ce 4f , respectively, and denoting the abundances of R 2 and Ce occupying 4g site of the shell part as R 2 4g and Ce 4g , respectively: 0.44 ≤ R 2 4 g / R 2 4 f + R 2 4 g ≤ 0.70 , and 0.04 ≤ Ce 4 f + Ce 4 g / R 2 4 f + R 2 4 g , characterised in that the rare earth magnet has a secondary shell part between the core part and the shell part , and the molar ratio of R 4 , where R 4 is one or more elements selected from the group consisting of Pr, Nd, Pm, Sm and Eu, in the secondary shell part is higher than the molar ratio of R 4 in the core part . a main phase having a composition represented by, in molar ratio, R 1 2 T 14 B, where R 1 is one or more elements selected from the group consisting of Y and rare earth elements and T is one or more transition elements mandatorily containing one or more elements selected from the group consisting of Fe, Co and Ni, and a grain boundary phase present around the main phase , wherein: the main phase has a core part and a shell part present around the core part , the molar ratio of R 2 , where R 2 is one or more elements selected from the groups consisting of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, in the shell part is higher than the molar ratio of R 2 in the core part , the rare earth magnet satisfies the following relationships, denoting the abundances of R 2 and Ce occupying 4f site of the shell part as R 2 4f and Ce 4f , respectively, and denoting the abundances of R 2 and Ce occupying 4g site of the shell part as R 2 4g and Ce 4g , respectively: 0.44 ≤ R 2 4 g / R 2 4 f + R 2 4 g ≤ 0.70 , and 0.04 ≤ Ce 4 f + Ce 4 g / R 2 4 f + R 2 4 g , characterised in that the rare earth magnet has a secondary shell part between the core part and the shell part , and the molar ratio of R 4 , where R 4 is one or more elements selected from the group consisting of Pr, Nd, Pm, Sm and Eu, in the secondary shell part is higher than the molar ratio of R 4 in the core part . the main phase has a core part and a shell part present around the core part , the molar ratio of R 2 , where R 2 is one or more elements selected from the groups consisting of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, in the shell part is higher than the molar ratio of R 2 in the core part , the rare earth magnet satisfies the following relationships, denoting the abundances of R 2 and Ce occupying 4f site of the shell part as R 2 4f and Ce 4f , respectively, and denoting the abundances of R 2 and Ce occupying 4g site of the shell part as R 2 4g and Ce 4g , respectively: 0.44 ≤ R 2 4 g / R 2 4 f + R 2 4 g ≤ 0.70 , and 0.04 ≤ Ce 4 f + Ce 4 g / R 2 4 f + R 2 4 g , characterised in that the rare earth magnet has a secondary shell part between the core part and the shell part , and the molar ratio of R 4 , where R 4 is one or more elements selected from the group consisting of Pr, Nd, Pm, Sm and Eu, in the secondary shell part is higher than the molar ratio of R 4 in the core part . <EOS>