'How is the average burnup and average burndown calculated?

I would like to know how the "average burndown" and "average burnup" are completed. Also, what is the formula for these metrics? I added the standard burnup and burndown charts in my dashboard.

Burndown and Burnup Chart



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source