The net force on an object moving in an elliptical path is the gravitational force. The force vector always points towards the object being orbited by the object following the elliptical orbit. In the case of the sun and earth, the force vector will always point towards the sun
The exact magnitude of the force is given by Newton's law of universal gravitation. The formula to calculate the magnitude of this force is ,
![F=(GMm)/(r^2).](https://img.qammunity.org/2019/formulas/physics/college/j0jn2zd33wjdrkpbyou9usoeag3okw5on1.png)
In this formula
is the universal gravitational constant,
is the distance between the two objects,
each represent the masses of the central object and the object orbiting it. As a consequence we can tell that closer to the central object, the magnitude of the force will be larger than further away from the object.