If you display a 7 day report, the average works out to the total shown divided by 7 (including the current day). I just tried it.
As for the widget, if I take my total for the last 12 months and divide by the average displayed in the widget, I personally come to 363.5 days which isn't perfect but it's pretty close.