The dictionary definition of COGS is the total cost incurred in the production and delivery of a product or service. Production and delivery can mean different things in different businesses, for example a SaaS company would consider hosting costs that support their website and cloud applications a COGS expense because they simply could not deliver their product without that paying that cost.
A retail clothing retail company on the other hand would include expenses such as raw materials, production, and shipping as COGS, but they would not consider their website hosting as COGS because they technically do not need the website to produce and deliver the goods. The website would likely be classified as a sales and marketing expense, which like other operations and overhead costs, would be excluded from COGS.
Expenses that are included in COGS differ primarily based on what type of product or service the company provides, and the largest differences are between physical and digital goods. Below you'll find some examples for each bucket:
COGS are important for many reasons and many of them have to do with the fact that COGS are used to calculate Gross Margin. The calculation for Gross Margin is simple in that it's simply Revenues - COGS, and it is often expressed as a percentage (i.e. 70% Gross Margin). This is an important metric that many investors and business leaders focus on because it's one of the principal measures of a company's profitability.