If you want to ask how do you calculate the gravity well of a planet to start a hyperspace travel without getting damaged:
There is no need to calculate anything.
Ther gravity well of every planet is shown at the sublight-travel-map. It's the red backgrounded areas around the planet.
The current game prevents you from starting a hyperspace flight when you are within a gravity well. Just leave the gravity well with the sublight travel, then start your hyperspace travel.