SmCo5 is an important hard magnetic material, due to its large magnetic anisotropy energy (MAE). We have studied the magnetic properties of SmCo5 using density functional theory (DFT) calculations where the Sm f -bands, which are difficult to include in DFT calculations, have been treated within the LDA+U formalism. The large MAE comes mostly from the Sm f -shell anisotropy, stemming from an interplay between the crystal field and the spin-orbit coupling. We found that both are of similar strengths, unlike some other Sm compounds, leading to a partial quenching of the orbital moment (f -states cannot be described as either pure lattice harmonics or pure complex harmonics), an optimal situation for enhanced MAE. A smaller portion of the MAE can be associated with the Co-d band anisotropy, related to the peak in the density of states at the Fermi energy. Our result for the MAE of SmCo5, 21.6 meV/f.u., agrees reasonably with the experimental value of 13-16 meV/f.u., and the calculated magnetic moment (including the orbital component) of 9.4µB agrees with the experimental value of 8.9µB .The permanent magnet intermetallic compound SmCo 5 has been studied extensively experimentally 1,2 and theoretically [3][4][5][6][7][8][9][10][11] . The interest in these materials is fueled by their large magnetic anisotropy energy (MAE), which is defined as the difference between the groundstate energies due to rotation of the magnetic field (magnetization direction). It is generally understood that the main source of the large MAE in SmCo 5 and other SmCo magnets is large magnetic single-site anisotropy of the Sm f -shell 9,12-14 . In simple terms, this means the strong spin-orbit coupling tries to align the Sm f -shell with the magnetic field, causing the f -shell to rotate with the field. Sm atoms in a lattice interact with the crystal field, and the energy of this interaction depends on the orientation of the Sm f -shell in the lattice. This is the leading contribution to the MAE. Note that if the crystal field is too small, the f -shell rotates freely with the magnetic field, producing no MAE, while if the spin-orbit is too small, the orbital moment is quenched and again no MAE appears. We will see below that in SmCo 5 both interactions are comparable, producing a large MAE.This basic understanding has existed for long time, and has been the basis of several model calculations, where atomic calculations for Sm have been combined with the crystal field parameters derived from first principles calculations 15 . However, first principles calculations which could provide a quantitative analysis of different components of MAE in SmCo 5 are still missing, to the best of our knowledge. In this paper we report such calculations, using an all-electron, full-potential, relativistic linearized augmented plane wave (FLAPW) method with an LDA+U extension to account for Coulomb correlations in the f -shell.Our analysis is organized as follows: We start by looking at the "Co part" of the MAE, the part not related to the Sm single-site aniso...