I'm a little confused on how to calculate COGS using the Average method. I wrote an ecommerce platform for my business and when an item is sold, the COGS for that item is saved in the sales record and that's what I use for as my COGS value (so it's like a real-time calculation, as opposed to some business' that calculate COGS quarterly, from what I've read).

Is the COGS for an item using the Average method = [(SUM purchased items costs)/(# items purchased)] * (# sold)?

I thought that made sense, until today when something confused me and I ran the below test, which shows that there's something wrong with the equation I'm using.

For example, supposed I purchase 50 widgets for $1.00/pc. I sell 10 widgets and the COGS = [($50)/(50)]*(10) = $10.

Now I purchase 50 widgets for $1.00/pc and then sell 10 more widgets. The COGS = [($100)/(100)]*(10) = $10.

Now I purchase 100 widgets for $0.50/pc and then sell 10 more widgets. The COGS = [($150)/(200)]*(10) = $7.5.

Now I sell the remaining 170. The COGS = [($150)/(200)]*(170) = $127.50.

Total paid for items: 150

Total calculated cogs: 155

What am I doing wrong?

Thanks for your help

Is the COGS for an item using the Average method = [(SUM purchased items costs)/(# items purchased)] * (# sold)?

I thought that made sense, until today when something confused me and I ran the below test, which shows that there's something wrong with the equation I'm using.

__Example 1:__For example, supposed I purchase 50 widgets for $1.00/pc. I sell 10 widgets and the COGS = [($50)/(50)]*(10) = $10.

__Example 2:__Now I purchase 50 widgets for $1.00/pc and then sell 10 more widgets. The COGS = [($100)/(100)]*(10) = $10.

__Example 3:__Now I purchase 100 widgets for $0.50/pc and then sell 10 more widgets. The COGS = [($150)/(200)]*(10) = $7.5.

__Example 4:__Now I sell the remaining 170. The COGS = [($150)/(200)]*(170) = $127.50.

__Summary:__Total paid for items: 150

Total calculated cogs: 155

What am I doing wrong?

Thanks for your help

Last edited: