In order to avoid misunderstanding, let me make it clear that sweating is cooling and warming, which can be affected by environmental temperature, external energy, air circulation, clothing energy metabolism and so on. Many times, it can't be the same. Only in an ideal state can we say that the direct relationship between sweating amount and energy consumption is because it cannot avoid the influence from the first four factors.
By the way, to refute other answers, it is not that you need to exercise for 40 minutes to lose weight, nor that you can't lose weight in less than 40 minutes. This misunderstanding comes from an example of early physiology. It is said that it takes about 40 minutes of low-intensity exercise to achieve the most effective use of fat. The original words are jogging or forgetting something, and netizens directly ignore "the most efficient" and take it out of context. In fact, fat has been consumed, but the efficiency will gradually increase, reaching the highest in about 40 minutes. At the same time, netizens ignored another important factor, that is, the intensity of 20 minutes of hiit is far greater than that of 40 minutes of jogging, because the intensity cannot be adjusted by only one, so it is impossible to evaluate the consumption or amount of exercise. Not reliable, at least most of the answers I have seen are like this. I suggest you buy a book on exercise physiology to get a general understanding of the basic mode of energy metabolism. Exercise physiology will be much simpler and rougher than clinical practice. If you just learn a concept, you don't need a high degree.