how to calculate weighted average costs?
To calculate the weighted average cost, divide the total cost of goods purchased by the number of units available for sale. To find the cost of goods available for sale, you'll need the total amount of beginning inventory and recent purchases.