Easier, first determine your body fat percentage and weight. Next determine your maintenance calories. Finally use my calculator to determine the maximum safe caloric deficit you can have based on your body fat percentage. Typically the higher your body fat percentage, the larger your caloric deficit can be. A morbidly person lived a full year without eating anything, but then if someone is relatively lean they might only have a few weeks before their body begins eating muscle.
Note, your maintenance calories requires a different calculator to determine: https://tdeecalculator.net/
Your maintenance calories is based on knowing your total energy expenditure, which at best is just an estimate based on your resting metabolic rate and usual activity level. In a sense you can estimate your rmr via trial and error, or get a precise measurement, but your TDEE changes from day to day, so once you figure out you are staying at the same weight eating a specific amount of calories that is your current maintenance. In simple, eat less, move more, and take your vitamins, result is weight loss for 100% of people.
References
https://github.com/TheDarkLightX/MaxCaloricDeficitCalc
http://www.businessinsider.com/angus-barbieri-382-days-without-food-scotsman-fasting-starvation-obesity-2016-10
i was trying to keep it dead simple for people who don't want to bother too much with technicalities but your way is surely better for taking it a step further