The impact of ferromagnetism and equation of state of iron at 0 K is calculated using first principles method. Compared with the experimental data, it is found that GGA is more suitable to describe equation of state of iron under high temperature and pressure. On this basis, liquid iron under the conditions of outer core is simulated by first principles molecular dynamics at the temperature from 5 000 K to 7 000 K. The calculated result of core density deficit at ICB is 8.9% at 5 000 K, while the value is 7.0% at 7 000 K. The density deficit within the outer core is calculated, it changes with pressure and the value at CMB is slightly higher than that at ICB.