  We present the first measurement of the mass function of free-floating
planets (FFP) or very wide orbit planets down to an Earth mass, from the MOA-II
microlensing survey in 2006-2014. Six events are likely to be due to planets
with Einstein radius crossing times, $t_{\rm E}<0.5$days, and the shortest has
$t_{\rm E} = 0.057\pm 0.016$days and an angular Einstein radius of $\theta_{\rm
E} = 0.90\pm 0.14\mu$as. We measure the detection efficiency depending on both
$t_{\rm E}$ and $\theta_{\rm E}$ with image level simulations for the first
time. These short events are well modeled by a power-law mass function,
$dN_4/d\log M = (2.18^{+0.52}_{-1.40})\times (M/8\,M_\oplus)^{-\alpha_4}$
dex$^{-1}$star$^{-1}$ with $\alpha_4 = 0.96^{+0.47}_{-0.27}$ for $M/M_\odot <
0.02$. This implies a total of $f= 21^{+23}_{-13}$ FFP or very wide orbit
planets of mass $0.33<M/M_\oplus < 6660$ per star, with a total mass of
$80^{+73}_{-47} M_\oplus$ per star. The number of FFPs is $19_{-13}^{+23}$
times the number of planets in wide orbits (beyond the snow line), while the
total masses are of the same order. This suggests that the FFPs have been
ejected from bound planetary systems that may have had an initial mass function
with a power-law index of $\alpha\sim 0.9$, which would imply a total mass of
$171_{-52}^{+80} M_\oplus$ star$^{-1}$. This model predicts that Roman Space
Telescope will detect $988^{+1848}_{-566}$ FFPs with masses down to that of
Mars (including $575^{+1733}_{ -424}$ with $0.1 \le M/M_\oplus \le 1$). The
Sumi(2011) large Jupiter-mass FFP population is excluded.
