Under the FIFO method, the cost of the ending inventory is calculated by assuming that the units purchased first are sold first.
To calculate the cost of the ending inventory using FIFO, we need to determine the cost of the units sold first.
Since there are 380 units on hand and the first purchase was 330 units at $6 each, the cost of the units sold first is 330 units * $6 = $1980.
The remaining 50 units (380 units - 330 units) are from the second purchase, which was 430 units at $7 each. So, the cost of these units is 50 units * $7 = $350.
The cost of the ending inventory under FIFO is the cost of the remaining units, which is 210 units from the third purchase at $8 each. So, the cost of the ending inventory under FIFO is 210 units * $8 = $1680.
Now, let's calculate the cost of the ending inventory using the LIFO method.
Under LIFO, the cost of the ending inventory is calculated by assuming that the units purchased last are sold first.
Since there are 380 units on hand and the last purchase was 210 units at $8 each, the cost of the units sold first is 210 units * $8 = $1680.
The remaining 170 units (380 units - 210 units) are from the second purchase, which was 430 units at $7 each. So, the cost of these units is 170 units * $7 = $1190.
The cost of the ending inventory under LIFO is the cost of the remaining units, which is 330 units from the first purchase at $6 each. So, the cost of the ending inventory under LIFO is 330 units * $6 = $1980.
Therefore, the cost of the ending inventory under the FIFO method is $1680, and the cost of the ending inventory under the LIFO method is $1980.