Your calorie targets are initially calculated based on your input data, such as weight, body fat percentage, and activity levels.
Then, based on your current body fat percentage and fitness goals & level of training experience, you will be recommended to lose a certain percentage of your body weight per week (for fat loss) or gain a certain amount of weight per month (for muscle building). You have the option to manually select the target weight change as well.
Based on the amount that you want to gain or lose, this will then correspond to your calorie deficit (fat loss) or surplus (muscle gain). The calorie target you then receive will be the number of calories you need to eat to achieve your goal.
For protein, the recommendations are set at a minimum of 0.8 g/lb (1.76 g/kg) of body weight. Depending on your body fat percentage and if you are a leaner individual, the protein recommendation will change to 1 g/lb (2.2 g/kg) of body weight (PMID: 28698222).