two women working with accounting data on table

Resources: Best Practices for Classifying COGS vs. OPEX

Correctly separating Cost of Goods Sold / Cost of Revenue from Operating Expenses is important because this designation can impact gross margin, operating income, pricing decisions, investor reporting, and management analysis. Whether a company sells physical products, software, services, or a combination of the three, the goal is to distinguish the direct cost of delivering revenue from the broader cost of operating the business.

General Rule

COGS / Cost of Revenue (sometimes used interchangeably) is deducted from revenue to calculate gross profit. It generally includes costs directly connected to delivering the product or service sold, such as inventory, materials, production labor, fulfillment costs, hosting infrastructure, third-party service costs, or other delivery-related expenses, depending on the business model.

Operating Expenses are the costs of running the business that are not included in COGS / Cost of Revenue. These typically include sales, marketing, administrative payroll, legal, accounting, recruiting, rent, internal software, product development, and other overhead.

Core Classification Framework

Usually COGS / Cost of RevenueUsually Operating Expenses
Directly tied to producing, acquiring, fulfilling, or delivering the product or service.Related to selling or marketing the product.
Variable with sales, customer usage, transactions, or order volume.Related to corporate administration.
Required to fulfill the company’s promise to the customer.Related to future product development.
Part of the product’s landed cost, production environment, or delivery infrastructure.Required to operate the company, but not directly required to deliver each sale.

In simple terms: COGS answers, “What did it cost us to deliver the revenue we just earned?” Operating expenses answer, “What did it cost us to run and grow the business?”

Example 1: Software / AI Startup

For a software or AI startup, COGS is usually called Cost of Revenue because the company is selling access to a service rather than physical inventory. Imagine an AI workflow automation platform where customers pay a subscription and use AI models to process documents or automate tasks.

Likely Cost of RevenueWhy
Cloud hosting for the production appRequired to deliver the live service.
GPU inference costsDirect cost of processing customer usage.
Third-party LLM or API feesDirect input into the customer-facing product.
Production databases, storage, and monitoringSupports uptime, availability, and customer workloads.
DevOps or infrastructure laborDirectly supports delivery of the live platform.
Implementation or support laborCOGS if required to deliver or maintain the contracted service.
Likely OPEXWhy
Product engineers building new featuresR&D for future product capability.
ML researchers experimenting with new modelsFuture development rather than current delivery.
Sales team salaries and commissionsCustomer acquisition.
Marketing campaignsDemand generation.
CEO, finance, HR, legal, and accountingCorporate administration.
Customer success focused on renewals and upsellsAccount management rather than service delivery – more like sales.

Key distinction: production usage costs generally belong in Cost of Revenue, while experimentation, future feature development, sales, marketing, and administration generally belong in OpEx.

Example 2: Ecommerce Company

For an ecommerce company, COGS is usually more straightforward because the company sells physical goods. Imagine a company that buys apparel from suppliers and sells it online.

Likely COGSWhy
Product inventory purchased for resaleDirect cost of the item sold.
Freight-in from suppliersPart of getting inventory ready for sale.
Import duties and tariffsDirectly tied to landed inventory cost.
Product-level packagingPart of the product sold.
Manufacturing or customization laborDirectly tied to preparing the product.
Likely OPEXWhy
Paid ads on Google, Meta, TikTok, etc.Customer acquisition.
Influencer campaignsMarketing.
Product photography and creativeSelling and merchandising.
Website design and brand workSales and marketing.
Finance, HR, legal, accounting, and executive salariesAdministration and corporate overhead.
Recruiting and office expensesGeneral business operations.

The key is consistency. A company should choose a defensible policy, document it, and apply it the same way each period.

Common Gray Areas

Shipping

Freight-in is usually COGS because it is part of acquiring inventory. Outbound shipping is more nuanced: some companies include it in Cost of Revenue, while others present it as fulfillment or operating expense.

Payroll

Classification depends on function. Production labor, implementation labor, infrastructure support, and customer support may belong in COGS if required to deliver the product or service. Sales, marketing, HR, finance, legal, executives, and product development usually belong in OpEx.

Software Tools

General business tools such as Slack, Notion, QuickBooks, Salesforce, and HR software are usually OpEx. Software, APIs, data, or infrastructure embedded directly into the customer-facing product may be COGS.

Customer Success

Customer success can be mixed. Support that helps customers use the product or resolve delivery issues may be Cost of Revenue. Renewals, upsells, account expansion, and relationship management are usually Sales & Marketing OpEx.

Bottom Line

  • Classify an expense as COGS / Cost of Revenue when it is directly required to deliver the product or service that generated revenue.
  • Classify an expense as Operating Expense when it supports selling, administration, product development, or general business operations.
  • For a software or AI startup, COGS usually includes hosting, production infrastructure, model inference, third-party APIs, implementation, and support tied to service delivery.
  • For an ecommerce company, COGS usually includes product inventory, freight-in, duties, and product-level packaging.
  • Everything else — sales, marketing, R&D, finance, HR, legal, executives, and general overhead — usually belongs in Operating Expenses.

Sources Consulted

IRS Publication 334, Tax Guide for Small Business — guidance on cost of goods sold and business expenses.

KPMG Inventory Handbook — accounting judgment and inventory principles under ASC 330.

SaaS Capital, “What Should Be Included in COGS for My SaaS Business?” — SaaS cost of revenue framework.·      

Amazon public filings — example of separating cost of sales, fulfillment, technology, sales and marketing, and G&A.

Leave a Reply

Spam-free subscription, we guarantee. This is just a friendly ping when new content is out.

← Back

Thank you for your response. ✨

Discover more from Blueprint Analytics LLC

Subscribe now to keep reading and get access to the full archive.

Continue reading