In order to investigate electronic and magnetic properties of Fe16X2 (X=B, C, N) ferromagnet, we have performed electronic structure calculations employing the total energy self-consistent local density functional linearized muffin tin orbital (LMTO) band method. Large enhancement of the magnetic moment is observed in FeII and FeIII, which are located farther from X than FeI. This suggests that the local environment plays a very important role in determining Fe magnetic moments in these compounds. Orbital contribution to the magnetic moment in Fe atoms of Fe16N2 is minor, total of approximately 0.6 mu(B) in the unit cell. We have obtained the average magnetic moments per Fe atom, 2.30, 2.40, and 2.50 mu(B) in Fe16B2, Fe16C2, and Fe16N2, respectively.