Energy balance
Energy balance refers to the balance between energy expenditure and energy intake. It is often measured daily, but it is probably more reasonable to measure it over a period of several days or weeks. When energy intake exceeds energy expenditure, the energy balance is positive and weight gain will occur. When energy intake is below energy expenditure, energy balance is negative and will result in weight loss. Athletes are generally good at maintaining body weight and thus are in energy balance most of the time.
In the long run, energy balance is maintained in individuals with a stable weight, although this balance can be positive or negative on a daily basis. People who want to lose weight should increase energy expenditure relative to energy intake.

A calorie is a unit of energy equivalent to 4.184 joules. In the popular press and food labeling in the United States, a calorie in a food actually refers to a kilocalorie, or 1,000 calories. One food calorie is equal to 1kcal or the amount of energy required to heat water by 1oC from 15 to 16oC. According to the first law of thermodynamics, energy can neither be created nor destroyed, only transformed, and therefore, from a thermodynamic point of view, a calorie is a calorie. However, the human body is not a perfect engine and therefore the thermodynamics may not be so clean. The energy released by burning food is not identical to the energy that will be available to the body after consuming that food. This is the concept of metabolizable energy: the difference between the gross energy of food, as measured by a bomb calorimeter, and the energy contained in feces and urine (also measured by a bomb calorimeter). Scientists in Germany and the USA (Atwater) have studied this metabolizable energy in different foods and found that the average available energy from carbohydrates is 4 kcal per gram, from protein 4 kcal per gram, and for fat this number is approximately 9 kcal per gram. gram (Jeukendrup & Gleeson, 2018). It's important to understand that these are averages, and these numbers will depend on the type of carbohydrates, the type of fat, and the type of protein being consumed. The exact numbers depend on the composition of the food and in particular the amount of fiber in the food (Buchholz & Schoeller, 2004). Although the body is not a perfect system, and although the averages that are often used are not always 100% representative of the energy consumed through food, this does not call into question the thermodynamics of a calorie is a calorie (Buchholz & Schoeller, 2004).
There is another factor that complicates the discussion. When foods are eaten, they change the energy expended (often called the thermic effect of food, or TEF), and different meals can lead to different TEFs. There are a number of components to energy expenditure. The first is resting metabolism: the amount of energy needed for basic metabolic functions, the amount of energy expended when we are not doing any physical activity. The second component is the thermic effect of food. Increase in energy expenditure as a result of a chemical process for digesting, absorbing, storing and metabolizing food ingredients. Finally, there is the physical activity component or the thermic effect of exercise. This is the most variable component. Small effects of protein on sleep metabolic rate and on TEF have been described. The effects of carbohydrates and fats are less and not much different from each other. In all cases, however, these effects are not very significant. Studies show that replacing carbohydrates with fat will not change total energy expenditure. Adding protein may slightly increase energy expenditure (approximately 70 kcal per day on a 2500 kcal diet when protein is increased from 15 to 35%).
Now we read very often that a calorie of fat is different from a calorie of carbohydrates and that the laws of thermodynamics do not apply. The fact that food ingestion alters metabolizable energy as well as energy expenditure is used as evidence. But that doesn't mean a calorie isn't a calorie. Metabolizable energy can be overestimated by 3-7%, especially when the fiber content of the food is high. However, such differences are small and from a practical point of view may not be so important. The differences we are talking about would translate into 200-600 grams of weight loss if dietary fiber increased by 21 grams. The difference in energy intake can be fully explained by the energy found in feces and urine. In this way, no energy is destroyed or lost. Different diets may work, but they don't because a calorie of one macronutrient is different than a calorie of another. This is a myth that is kept alive by followers of a particular diet that they believe in.
Weight management is all about shifting energy balance in the right direction. If we want to lose weight, we must make sure that the energy intake is lower than the expenditure. We can achieve this by reducing intake or by increasing expenditure or ideally by a combination of both. There are other aspects that are important. We need to make sure that the feeling of hunger is controlled. We should not ignore the social context either. We rarely eat to maintain energy balance. We usually eat because we are with friends, because we are sad, because we are bored, and for many other reasons unrelated to energy balance. Therefore, we need to make sure we manage this part of the equation as well as the energy balance. In fact, much of the initial success of various diets may be due to the fact that we raise awareness and thereby reduce or eliminate binge eating and other forms of mindless eating.