Average cost method

Under the average cost method, it is assumed that the cost of inventory is based on the average cost of the goods available for sale during the period.
The average cost is computed by dividing the total cost of goods available for sale by the total units available for sale. This gives a weighted-average unit cost that is applied to the units in the ending inventory. 
There are two commonly used average cost methods: Simple weighted-average cost method and perpetual weighted-average cost method.
Weighted average cost.
Weighted average cost is a method of calculating ending inventory cost. It can also be referred to as "WAVCO".
It takes cost of goods available for sale and divides it by the number of units available for sale (number of goods from beginning inventory + purchases/production). This gives a weighted average cost per unit. A physical count is then performed on the ending inventory to determine the number of goods left. Finally, this quantity is multiplied by weighted average cost per unit to give an estimate of ending inventory cost. The cost of goods sold valuation is the amount of goods sold times the weighted average cost per unit. The sum of these two amounts (less a rounding error) equals the total actual cost of all purchases and beginning inventory.
Moving-average cost.
Moving-average (unit) cost is a method of calculating ending inventory cost. 
Assume that both beginning inventory and beginning inventory cost are known. From them the "cost per unit of beginning inventory" can be calculated. During the year, multiple purchases are made. Each time, purchase costs are added to beginning inventory cost to get "cost of current inventory". Similarly, the number of units bought is added to beginning inventory to get "current goods available for sale". After each purchase, cost of current inventory is divided by current goods available for sale to get "current cost per unit on goods".
Also during the year, multiple sales happen. The Current goods available for sale is deducted by the amount of goods sold, and the cost of current inventory is deducted by the amount of goods sold times the latest (before this sale) current cost per unit on goods. This deducted amount is added to cost of goods sold.
At the end of the year, the last Cost per Unit on Goods, along with a physical count, is used to determine ending inventory cost.