Newton's law of gravitation: ##F=\frac{GMm}{r^2}##

As acceleration of a small mass on earth (small compared to the mass of earth) and if we ignore the direction, this can be simplified to ##a=\frac{GM}{r^2}## where G is the gravitational constant, M is some big mass and r is the distance to the center of this mass.

Moon and sun are not just attracting your small mass, they are attracting earth as well. If earth and the small mass are accelerated in the same way, you do not see this (on earth), so the difference between the acceleration of earth and the acceleration of your mass is relevant. If the object is just over your head:

##\Delta a=\frac{GM}{r^2} - a=\frac{GM}{(r+r_e)^2}## where r

_{e} is the radius of earth (it is possible to simplify the formula a bit, if necessary). You can use the known parameters of the solar system to estimate those numbers for moon and sun. I did the same a few weeks ago

here, where the second list is relevant.