Its not in the T-accounts, its in the Income Statement. Its the cost of making those goods available for sale. It includes cost of purchasing the goods, transport charges in bringing them to the premises and any other costs incurred in maintaining them in a sale-able form.
It is calculated by using this formula: COGS = Opening Inventory + Purchases – Closing Inventory