According to Newton's Law of Gravity

F_{earth}=(GMm/d^{2}) where

M = Mass of Earth

G = Gravitational Constant = 6.674×10^{−11} N⋅m^{2}/kg^{2}

m = mass of other object

d = distance between the object's center and the earth's center

Now we can re-write

m.g = (GMm/d^{2}) OR g = GM/d^{2}

At Earth's surface d = radius of Earth = 6.371 x 10^{6} m

Now in equation g = GM/d^{2}

Put G = 6.674×10^{−11} N⋅m^{2}kg^{-2}

M = 5.972×10^{24 }kg

d = 6.371 x 10^{6} m

all we get is gravitational force g = 9.81 m/s^{2}