A rare earth magnet comprising: a main phase; and a particle boundary phase present around the main phase, wherein: an overall composition in terms of a molar ratio is represented by a formula, (R 2 (1-x) R 1 x) y Fe (100-y-w-z-v) Co w B z M 1 v ·(R 3 (1-p)M 2 p) q ·(R 4 (1-s)M 3 s) t, where R 1 is one or more elements selected from the group consisting of Ce, La, Y, and Sc; R 2 and R 3 are one or more elements selected from the group consisting of Nd and Pr; R 4 is a rare earth element at least including one or more elements selected from the group consisting of Gd, Tb, Dy, and Ho; M 1 is one or more elements selected from the group consisting of Ga, Al, Cu, Au, Ag, Zn, In, and Mn, and an unavoidable impurity element; M 2 is a metal element other than rare earth elements, which is alloyed with R 3, and an unavoidable impurity element; and M 3 is a metal element other than rare earth elements, that is alloyed with R 4, and an unavoidable impurity element; and the followings are satisfied, 0.1 ≤ x ≤ 1.0, 12.0 ≤ y ≤ 20.0, 5.0 ≤ z ≤ 20.0, 0 ≤ w ≤ 8.0, 0 ≤ v ≤ 2.0, 0.05 ≤ p ≤ 0.40, 0.1 ≤ q ≤ 15.0, 0.05 ≤ s ≤ 0.40, and 0.1 ≤ t ≤ 5.0; the main phase has a crystal structure of an R 2 Fe 14 B type, where R is a rare earth element; an average particle size of the main phase is 0.1 μm to 20 μm; the main phase has a core portion, a first shell portion present around the core portion, and a second shell portion present around the first shell portion; a total of molar ratios of Nd and Pr in the first shell portion is higher than a total of molar ratios of Nd and Pr in the core portion; a total of molar ratios of Nd and Pr in the second shell portion is lower than a total of molar ratios of Nd and Pr in the first shell portion; the second shell portion contains one or more elements selected from the group consisting of Gd, Tb, Dy, and Ho; a total of molar ratios of Gd, Tb, Dy, and Ho in the second shell portion is higher than a total of molar ratios of Gd, Tb, Dy, and Ho in the core portion; and a total of molar ratios of Gd, Tb, Dy, and Ho in the second shell portion is higher than a total of molar ratios of Gd, Tb, Dy, and Ho in the first shell portion. an overall composition in terms of a molar ratio is represented by a formula, (R 2 (1-x) R 1 x) y Fe (100-y-w-z-v) Co w B z M 1 v ·(R 3 (1-p)M 2 p) q ·(R 4 (1-s)M 3 s) t, where R 1 is one or more elements selected from the group consisting of Ce, La, Y, and Sc; R 2 and R 3 are one or more elements selected from the group consisting of Nd and Pr; R 4 is a rare earth element at least including one or more elements selected from the group consisting of Gd, Tb, Dy, and Ho; M 1 is one or more elements selected from the group consisting of Ga, Al, Cu, Au, Ag, Zn, In, and Mn, and an unavoidable impurity element; M 2 is a metal element other than rare earth elements, which is alloyed with R 3, and an unavoidable impurity element; and M 3 is a metal element other than rare earth elements, that is alloyed with R 4, and an unavoidable impurity element; and the followings are satisfied, 0.1 ≤ x ≤ 1.0, 12.0 ≤ y ≤ 20.0, 5.0 ≤ z ≤ 20.0, 0 ≤ w ≤ 8.0, 0 ≤ v ≤ 2.0, 0.05 ≤ p ≤ 0.40, 0.1 ≤ q ≤ 15.0, 0.05 ≤ s ≤ 0.40, and 0.1 ≤ t ≤ 5.0; the main phase has a crystal structure of an R 2 Fe 14 B type, where R is a rare earth element; an average particle size of the main phase is 0.1 μm to 20 μm; the main phase has a core portion, a first shell portion present around the core portion, and a second shell portion present around the first shell portion; a total of molar ratios of Nd and Pr in the first shell portion is higher than a total of molar ratios of Nd and Pr in the core portion; a total of molar ratios of Nd and Pr in the second shell portion is lower than a total of molar ratios of Nd and Pr in the first shell portion; the second shell portion contains one or more elements selected from the group consisting of Gd, Tb, Dy, and Ho; a total of molar ratios of Gd, Tb, Dy, and Ho in the second shell portion is higher than a total of molar ratios of Gd, Tb, Dy, and Ho in the core portion; and a total of molar ratios of Gd, Tb, Dy, and Ho in the second shell portion is higher than a total of molar ratios of Gd, Tb, Dy, and Ho in the first shell portion.