calculate average unit cost
When using the weighted average method, divide the cost of goods available for sale by the number of units available for sale, which yields the weighted-average cost per unit. In this calculation, the cost of goods available for sale is the sum of beginning inventory and net purchases.