How to calculate the average price of shares

What formula is used to determine the average purchase price of your shares?