From Newton's law of gravitation, F = G(m1m2)/r². The unit of G is $N \cdot m^2 / kg^2$. Substituting N with $kg \cdot m/s^2$, we get $(kg \cdot m/s^2) \cdot m^2 / kg^2$, which simplifies to $m^3 kg^{-1} s^{-2}$.