How is average share price calculated

How do you compute the average price for a stock over time?