Garmin doesn't publish the exact formula, but reverse-engineering and confirmed inputs show it's a weighted blend of: HRV (heart rate variability) — the dominant signal; perceived stress (also Garmin-derived from HRV); sleep duration AND sleep architecture; activity load; passive recovery (low-stress periods during the day).
This is why Body Battery moves throughout the day, while HRV is essentially a one-shot overnight number. A long stressful meeting, even seated, can drop your Body Battery 15–25 points. A walk in the sun with no exercise can raise it 5–10 points.
Newer Garmin devices (Forerunner 265/955/965, Fenix 7/8, Epix) compute Body Battery with the latest Firstbeat algorithm and tend to be more accurate than older devices. Wrist contact and band tightness affect HRV detection — if your numbers seem off, check the strap fit before blaming the metric.