Magnetic properties and bonding analyses of perovskite structure Co4N nitride have been investigated within density functional theory using both pseudo potential and all electron methods. In the same time, the structural and magnetic stability of pure cobalt in hexagonal close packed (HCP), face centered cubic (FCC) and body centered cubic (BCC) structures are reviewed. At equilibrium, non-spin polarized (NSP) and spin polarized (SP) calculations of the energy versus volume show that the ground state is ferromagnetic in both materials. HCP-Co is found to be more stable than the cubic ones. Magnetic moments of Co atoms in Co4N nitride respectively belonging to two different crystallographic sites are studied over a wide range of the cubic lattice constant, and a comparison with the FCC-cobalt one is given. The volume expansion in the nitride indicates that the corner Co I atoms show localized magnetism while face center Co II atoms exhibit an itinerant behavior. Like in FCC-Fe/Fe4N, a "low volume-low moment" and "large volume-high moment" behavior is observed for FCC-Co/Co4N. The density of states of the Co4N ferromagnetic ground state is interpreted within the rigid band model. The different bonding characters of Co I -N versus Co II -N are shown with help of electron localization fucntion ELF plots and spin resolved chemical bonding criteria.