COMMON TERMS

COGS (Cost of Goods Sold)

The direct costs of delivering your product or service

What is COGS?

Cost of Goods Sold (COGS) represents the direct costs of producing or delivering the goods or services a company sells. These are the costs that vary directly with the volume of products or services delivered to customers.

COGS is a critical metric because it determines gross profit and gross margin—key indicators of a company's fundamental economics.

The Core Formula

Gross Profit = Revenue - COGS

Gross Margin % = (Revenue - COGS) ÷ Revenue × 100%

Example: $1M revenue - $300K COGS = $700K gross profit (70% gross margin)

What Goes Into COGS?

The key principle: COGS only includes costs directly tied to delivering the product or service. If a cost scales with customer volume, it's likely COGS.

Includes in COGS

For Manufacturing:

  • Raw materials
  • Direct labor (assembly workers)
  • Factory overhead (utilities, equipment)
  • Shipping & logistics

For SaaS/Cloud Companies:

  • Cloud infrastructure (Azure, AWS, GCP)
  • Third-party API costs that scale with users
  • Payment processing fees
  • Customer support (direct delivery)
  • Hosting & bandwidth
  • Database & storage costs

For Professional Services:

  • Consultant/engineer billable hours
  • Subcontractor costs
  • Project-specific tools/licenses

NOT in COGS

These are Operating Expenses (OpEx), not COGS:

Sales & Marketing:

  • Sales team salaries
  • Marketing campaigns
  • Trade shows & events

Research & Development:

  • Software engineers building features
  • Dev/test environments
  • Development tools & licenses

General & Administrative:

  • Office rent
  • HR, Legal, Finance teams
  • Executive salaries
  • Corporate IT infrastructure

Cloud Infrastructure as COGS: The SaaS Model

Why Azure/AWS Costs Are COGS, Not IT Expense

For SaaS companies, cloud infrastructure is directly required to deliver the service to customers. If you have zero customers, you need minimal infrastructure. As customers grow, infrastructure costs grow proportionally.

Illustrative Example: SaaS Company

This is a hypothetical, illustrative example for teaching purposes, not an actual case study.

Cost Category Monthly Cost Classification
Production Azure VMs (serving customers) $80,000 COGS
Production databases (Azure SQL) $45,000 COGS
Storage & CDN (customer data) $15,000 COGS
Monitoring & security (prod environments) $10,000 COGS
Subtotal - Production Infrastructure: $150,000 COGS
Operating Expenses (R&D):
Dev/Test environments $30,000 R&D OpEx
Engineering team salaries ($150K × 20 engineers) $250,000 R&D OpEx
Development tools (GitHub, IDEs, etc.) $5,000 R&D OpEx

Key Distinction: Production infrastructure = COGS (required to deliver service). Development infrastructure & engineers building features = R&D OpEx (improving the product, not delivering it).

Why This Classification Matters

Gross Margin Calculation:

  • Monthly Revenue: $600,000
  • COGS (production Azure): $150,000
  • Gross Profit: $450,000
  • Gross Margin: 75% ← This is what investors look at!

A 75% gross margin is excellent for SaaS. If you classified dev environments in COGS, you'd show 70% margin—still good, but not as strong. Proper classification matters for valuation.

COGS Across Different Business Models

Pure SaaS

75-85%

Typical Gross Margin

COGS Includes: Cloud infrastructure, third-party APIs, payment processing, customer-facing support

Low COGS = high margins. Software scales beautifully.

E-commerce

25-50%

Typical Gross Margin

COGS Includes: Product inventory costs, fulfillment, shipping, packaging, payment processing

Physical goods = higher COGS, lower margins than pure software.

Manufacturing

30-60%

Typical Gross Margin

COGS Includes: Raw materials, direct labor, factory overhead, equipment depreciation, shipping

Heavy physical production = significant COGS.

Professional Services

40-60%

Typical Gross Margin

COGS Includes: Billable consultant time, subcontractors, project-specific expenses

People-based delivery = COGS tied to labor hours.

How Cloud Engineers Impact COGS

As a cloud engineer, you have direct control over the largest component of COGS for SaaS companies: infrastructure costs.

Your Actions Directly Improve Gross Margin:

Architecture Optimization

  • Use PaaS instead of IaaS (lower management overhead)
  • Implement caching (reduce database load)
  • Optimize queries (fewer compute resources needed)
  • Use CDN for static content (reduce origin traffic)

Cost Management

  • Right-size VMs based on actual usage
  • Use reserved instances for stable workloads
  • Implement auto-scaling (pay for what you use)
  • Delete unused resources promptly

Efficiency at Scale

  • Implement multi-tenancy (share infrastructure)
  • Optimize data storage tiers
  • Batch processing during off-peak hours
  • Containerization for better density

Visibility & Monitoring

  • Tag resources by customer/product
  • Track cost per customer
  • Set up cost anomaly alerts
  • Review utilization metrics monthly

Illustrative Impact Example

This is a hypothetical, illustrative example for teaching purposes, not an actual case study.

Scenario: Your optimization work reduces production Azure costs by 20% ($30K/month savings on $150K spend)

  • Financial Impact: COGS drops from $150K to $120K
  • Gross Margin Improvement: 75% → 80% (5 point improvement!)
  • Annual Savings: $360K to bottom line
  • Valuation Impact: At 10x EBITDA/profit multiple, you just added $3.6M in company value

For Cloud Engineers

Understanding COGS transforms how you think about your work:

  • You impact the P&L directly: Lower COGS = higher gross margin = more profitable company
  • Speak the CFO's language: Present optimizations as "COGS reduction initiatives"
  • Understand business priorities: CFO wants COGS at 20-25% of revenue for healthy SaaS margins
  • Measure your impact: Track how your work improves gross margin percentage quarter-over-quarter
  • Justify investments: "This architecture change reduces COGS by 15%" is more compelling than "This saves us some money"

Career Insight: Cloud engineers who understand COGS and can articulate their impact on gross margin become strategic business partners, not just technical resources. This understanding opens doors to architecture leadership, FinOps roles, and executive conversations.

Ready for the Next Topic?

Continue your learning journey