The Newtonian formulas for showing potential gravitational energy are well documented and various examples show. A good place to start is a good physics book. An example from my library is Chapter 5 ENERGY/POWER discussing POTENTIAL ENERGY. The Physics Problem Solver, 1987.
A good example of gravitational potential energy can be seen in M42 in Orion. Much gas matter, ~ 10^5 solar masses or more. Converting that potential energy into useful and meaningful work is another report