The 2-body problem
One of the more challenging things I’ve built in Excel is a 2-body orbital simulator. This used basic Newtonian physics, and a time skip differential.
The physics is simple:
- we have two objects in space, both of which exerting equal and opposite gravitational forces on each other
- the vector gravitational attraction acting on object A due to object B is given by:
- Thanks to good old Newton, we therefore can find out the the acceleration acting on both objects:
Then all that needs doing is building initial conditions and seeing what happens.

Having the initial position of each body and their masses allows us to find the initial acceleration. We then use time skips to find the change in each value. IE,
This then leads to the finished Excel, which has calculations as follows:

This works, but is incredibly inefficient. This is expected, considering the medium and the amount of cells being used.
Optimising this is a challenge for another time.