The equation
Mifflin–St Jeor estimates resting burn from weight, height, age, and a male or female constant. That resting number is then multiplied by an activity factor from 1.2 (sedentary) to 1.9 (very active). The factor is a guess. Two people with the same job can burn very different amounts.
The log
If your weight changes, the energy in that tissue had to come from somewhere. This page uses 7,700 kcal per kilogram, about 3,500 kcal per pound. Expenditure is your average intake, minus the energy stored per day (or plus the energy released, if you lost weight).
The blend
For the first 14 days the weight stays on the equation, because a short swing is mostly water. From day 15 to day 28 the log takes a growing share. After 28 days the estimate is the log, and the equation remains beside it so you can see the gap.
This is not medical advice and not a diet prescription. Under-logging makes the result too low. A fast swing on the scale is often water, glycogen, or a heavy meal, not tissue. If you have a medical condition or a prescribed intake, use that instead of this page.