What is COGS (Cost of Goods Sold)?
The direct cost of the products you sold in a period.
COGS is what it cost you to produce or buy the things you sold: materials, stock, and direct production costs. It does not include overheads like rent or software.
Revenue minus COGS gives your gross profit, and dividing that by revenue gives your gross margin. Knowing COGS accurately is the first step to knowing what each sale made.