# Calculating COGS

Hey I started using manager a couple months ago n everything is great so far thanks for creating such a great software. I only had one issue which is calculating cogs. The way I calculate it is opening stock +purchases -closing stock but I don’t know how to automatically get the opening and closing stock figure generated. Also I only do cash purchase of inventory in which I first enter the items in inventory then buy them by spending from my bank…this doesnt generate a purchases figure at all.

So basically I want to know how to set up my chart of accounts so cogs is calculated as opening stock+purchases-closing stock?

I dont know if this can solve your problem, but this is what i do.

1. create ` inventory` items for purchased goods and sold goods
2. create a ` purchase invoice` for what you buy, which includes the inventory details.
3. make a `goods receipt` for the items
4. create a `production order`
5. make a `sale invoice`
6. make a `delivery note.`
the items would show up properly
`inventory on hand` under Assets would come up,
`inventory sales` and `inventory cost` would show up in P/L
you can create a separate account group “Cost Of Goods Sold” as an expense and then move the “`inventory - cost`” account under it,
and a “operating income” group to move ` inventory sales` under it

If you are creating inventory items, it does not matter whether you record their purchases with a purchase invoice or cash payment. The asset value of inventory purchases first appears in Inventory on hand. When you sell it, its cost is automatically transferred to Inventory - cost and the associated income to Inventory - sales. If you want to see cost of goods sold with that name, you can do as @spandan888 suggested, adding a group, or just rename the Inventory - cost account. Whatever it is called, and however it is displayed, Inventory - cost is the cost of goods sold.

1 Like

You can’t have it automatically. The closing stock figure comes from a valuation of a physical stocktake count, this closing stock valuation then becomes the opening stock figure.

Besides, what you have describe above is conflicting processes - you can’t have:

1. “opening stock +purchases -closing stock” and 2) “I first enter the items in inventory”

For (1) you don’t create/use inventory items and for (2) you don’t have purchases or opening/closing stock.

Therefore - as to your question “I want to know how to set up my chart of accounts so cogs is calculated as opening stock+purchases-closing stock?”

You CAN"T set up any chart of accounts that way IF you are going to be using Inventory Items.
Opening stock + purchases - closing stock is only applicable when you AREN’T using Inventory Items.